:root {
    --ric-bg-card: #fff;
    --ric-border-card: #eef2f6;
    --ric-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 40px -8px rgba(0, 0, 0, 0.05);
    --ric-header-bg: linear-gradient(90deg, #10b981, #14b8a6);
    --ric-text-title: #0f172a;
    --ric-text-secondary: #64748b;
    --ric-text-primary: #1e293b;
    --ric-bg-input-section: #f8fafc;
    --ric-border-input-section: #f1f5f9;
    --ric-bg-input: #fff;
    --ric-text-input: #1e293b;
    --ric-border-input: transparent;
    --ric-focus-border: #10b981;
    --ric-focus-ring: rgba(16, 185, 129, 0.15);
    --ric-icon-color: #10b981;
    --ric-bg-result: #fff;
    --ric-border-result: #eef2f6;
    --ric-text-result-value: #0f172a;
    --ric-text-result-label: #94a3b8;
    --ric-bg-bar: #f1f5f9;
    --ric-bg-bar-fill: #10b981;
    --ric-text-bar: #64748b;
    --ric-bg-badge: #d1fae5;
    --ric-text-badge: #059669;
    --ric-bg-button: #0f172a;
    --ric-text-button: #fff;
    --ric-bg-button-hover: #1e293b;
    --ric-highlight-color: #10b981;
}

.theme-dark {
    --ric-bg-card: #0f172a;
    --ric-border-card: rgba(255, 255, 255, 0.05);
    --ric-text-title: #f8fafc;
    --ric-text-secondary: #94a3b8;
    --ric-text-primary: #f8fafc;
    --ric-bg-input-section: rgba(30, 41, 59, 0.5);
    --ric-border-input-section: rgba(255, 255, 255, 0.05);
    --ric-bg-input: #1e293b;
    --ric-text-input: #f8fafc;
    --ric-border-input: #334155;
    --ric-focus-border: #10b981;
    --ric-focus-ring: rgba(16, 185, 129, 0.15);
    --ric-icon-color: #34d399;
    --ric-bg-result: #1e293b;
    --ric-border-result: rgba(255, 255, 255, 0.05);
    --ric-text-result-value: #f8fafc;
    --ric-text-result-label: #94a3b8;
    --ric-bg-bar: #1e293b;
    --ric-bg-bar-fill: #10b981;
    --ric-text-bar: #cbd5e1;
    --ric-bg-badge: rgba(16, 185, 129, 0.1);
    --ric-text-badge: #6ee7b7;
    --ric-bg-button: #10b981;
    --ric-text-button: #fff;
    --ric-bg-button-hover: #059669;
    --ric-highlight-color: #34d399;
}

[data-theme='dark'] {
    --ric-bg-card: #0f172a;
    --ric-border-card: rgba(255, 255, 255, 0.05);
    --ric-text-title: #f8fafc;
    --ric-text-secondary: #94a3b8;
    --ric-text-primary: #f8fafc;
    --ric-bg-input-section: rgba(30, 41, 59, 0.5);
    --ric-border-input-section: rgba(255, 255, 255, 0.05);
    --ric-bg-input: #1e293b;
    --ric-text-input: #f8fafc;
    --ric-border-input: #334155;
    --ric-focus-border: #10b981;
    --ric-focus-ring: rgba(16, 185, 129, 0.15);
    --ric-icon-color: #34d399;
    --ric-bg-result: #1e293b;
    --ric-border-result: rgba(255, 255, 255, 0.05);
    --ric-text-result-value: #f8fafc;
    --ric-text-result-label: #94a3b8;
    --ric-bg-bar: #1e293b;
    --ric-bg-bar-fill: #10b981;
    --ric-text-bar: #cbd5e1;
    --ric-bg-badge: rgba(16, 185, 129, 0.1);
    --ric-text-badge: #6ee7b7;
    --ric-bg-button: #10b981;
    --ric-text-button: #fff;
    --ric-bg-button-hover: #059669;
    --ric-highlight-color: #34d399;
}

.ric-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    perspective: 1000px;
    padding: 2rem 1rem;
}

.ric-card {
    background: var(--ric-bg-card);
    border: 1px solid var(--ric-border-card);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--ric-shadow-card);
    position: relative;
    overflow: hidden;
    color-scheme: light;
}

.theme-dark .ric-card,
[data-theme='dark'] .ric-card {
    color-scheme: dark;
}

.ric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--ric-header-bg);
}

.ric-header {
    text-align: left;
    margin-bottom: 3rem;
}

.ric-header h3 {
    font-size: 2.25rem;
    font-weight: 950;
    color: var(--ric-text-title);
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.ric-header p {
    color: var(--ric-text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
}

.ric-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ric-inputs-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ric-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ric-input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ric-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ric-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ric-input-wrapper input,
.ric-input-wrapper select {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 1rem;
    border: 1px solid var(--ric-border-input);
    border-radius: 12px;
    background: var(--ric-bg-input);
    color: var(--ric-text-input);
    font-size: 1rem;
    transition: all 0.2s;
}

.ric-input-wrapper input:focus,
.ric-input-wrapper select:focus {
    outline: none;
    border-color: var(--ric-focus-border);
    box-shadow: 0 0 0 3px var(--ric-focus-ring);
}

.ric-input-unit {
    position: absolute;
    right: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ric-text-secondary);
    pointer-events: none;
}

.ric-results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ric-result-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ric-result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ric-text-result-label);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ric-result-main-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ric-text-result-value);
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

.ric-comparison-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ric-bar-base {
    width: 100%;
    height: 24px;
    background: var(--ric-bg-bar);
    border-radius: 12px;
    overflow: hidden;
}

.ric-bar-fill {
    height: 100%;
    background: var(--ric-bg-bar-fill);
    transition: width 0.3s ease;
}

.ric-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ric-text-bar);
}

.ric-summary-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ric-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--ric-bg-result);
    border: 1px solid var(--ric-border-result);
    border-radius: 12px;
}

.ric-detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ric-text-result-label);
    text-transform: uppercase;
}

.ric-detail-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ric-text-result-value);
}

.ric-highlight {
    color: var(--ric-highlight-color);
}

.ric-info-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--ric-border-card);
    gap: 1rem;
}

.ric-legal-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--ric-bg-badge);
    color: var(--ric-text-badge);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.ric-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: var(--ric-bg-button);
    color: var(--ric-text-button);
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ric-action-btn:hover {
    background: var(--ric-bg-button-hover);
    transform: translateY(-2px);
}

.ric-results-section.ric-hidden {
    display: none;
}

.ric-input-group.ric-hidden {
    display: none;
}

@media (max-width: 768px) {
    .ric-layout {
        grid-template-columns: 1fr;
    }

    .ric-header h3 {
        font-size: 1.75rem;
    }

    .ric-result-main-value {
        font-size: 2rem;
    }

    .ric-info-footer {
        flex-direction: column;
    }

    .ric-action-btn {
        width: 100%;
        justify-content: center;
    }

    .ric-legal-badge {
        width: 100%;
        justify-content: center;
    }
}