:root {
    --bg-color: #F8F9FA;
    --sidebar-bg: #FFFFFF;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --accent-color: #0984E3;
    
    /* Condition Colors */
    --mono-bg: #E8F5E9;
    --mono-accent: #2E7D32;
    --ri-bg: #E3F2FD;
    --ri-accent: #1565C0;
    
    /* Status Colors */
    --warning: #FFB300;
    --danger: #D32F2F;
    --success: #388E3C;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: 320px;
    background: var(--sidebar-bg);
    border-right: 1px solid #E9ECEF;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #E9ECEF;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    padding-left: 40px;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.client-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.client-item {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.client-item:hover {
    background: #F1F3F5;
}

.client-item.active {
    background: #EBF5FF;
    border-color: #D1E9FF;
}

.client-item h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.client-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #E9ECEF;
}

.btn-add {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: #0773C5;
    transform: translateY(-1px);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    padding: 20px 40px;
    background: white;
    border-bottom: 1px solid #E9ECEF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-info-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.month-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 40px;
    background: white;
    border-bottom: 1px solid #E9ECEF;
    overflow-x: auto;
}

.month-tab {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.month-tab:hover {
    background: #F1F3F5;
}

.month-tab.active {
    background: var(--accent-color);
    color: white;
}

.dashboard {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    align-content: start;
}

/* Tax Card Styles */
.tax-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #E9ECEF;
    position: relative;
    overflow: hidden;
}

.tax-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.condition-mono .tax-card { background-color: var(--mono-bg); border-color: #C8E6C9; }
.condition-mono .tax-card::before { background: var(--mono-accent); }

.condition-ri .tax-card { background-color: var(--ri-bg); border-color: #BBDEFB; }
.condition-ri .tax-card::before { background: var(--ri-accent); }

.tax-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tax-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.tax-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.input-group input {
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.8);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.status-alert {
    grid-column: span 2;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

.status-warning { background: #FFF9C4; color: #F57F17; border: 1px solid #FFF176; }
.status-danger { background: #FFCDD2; color: #B71C1C; border: 1px solid #E57373; }

.interest-fields {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    margin-top: 8px;
    animation: slideDown 0.3s ease;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    background: #F8F9FA;
    border-bottom: 1px solid #E9ECEF;
    display: flex;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E9ECEF;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #E9ECEF;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A0AEC0; }
