/* ============================================
   Admin Dashboard Styles — Full CRUD
   ============================================ */

/* Premium Login Interface */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), url('../assets/images/hero-profile.jpeg') center/cover no-repeat fixed;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.admin-login::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.login-card {
    position: relative;
    z-index: 2;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    padding: 3px;
    background: var(--bg-card);
}

.login-header h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.login-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.login-form-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.login-form-view.active {
    display: block;
}

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

.login-card .form-group {
    margin-bottom: 1.25rem;
}

.login-card .form-label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.login-card .form-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
}

.login-card .form-input:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.login-card .btn--primary {
    border-radius: 12px;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.login-card .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.login-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.login-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Dashboard Layout */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-xl);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text-heading);
    border-bottom: 1px solid var(--border-primary);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-sm) 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-xl);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.05);
    border-left-color: var(--accent-primary);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: var(--text-sm);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-primary);
    margin: var(--space-sm) var(--space-xl);
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: var(--space-sm) var(--space-xl) 4px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-primary);
    padding: var(--space-sm) 0;
}

.badge {
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-2xl);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-page-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-heading);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.admin-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-sm);
}

.admin-content {
    padding: var(--space-2xl);
}

/* Admin Cards */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.admin-card + .admin-card {
    margin-top: var(--space-lg);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.admin-card-header h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-heading);
}

.admin-card-body {
    padding: var(--space-xl);
    color: var(--text-secondary);
    line-height: 1.8;
}

.admin-error {
    padding: var(--space-xl);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-xl);
    color: #ef4444;
    text-align: center;
    font-size: var(--text-sm);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.stat-card-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--accent-primary);
}

.stat-card-icon {
    float: right;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-lg);
}

/* Data Tables */
.admin-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 12px var(--space-xl);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-glass);
    white-space: nowrap;
}

.data-table td {
    font-size: var(--text-sm);
    color: var(--text-primary);
    padding: 12px var(--space-xl);
    border-bottom: 1px solid var(--border-primary);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-glass-hover);
}

.empty-state {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

.action-cell {
    white-space: nowrap;
}

/* Action Buttons */
.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    transition: all var(--transition-fast);
    margin-right: 4px;
}

.action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.08);
}

.action-btn--danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.action-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: var(--text-sm);
}

.action-link:hover {
    text-decoration: underline;
}

/* Status Badges */
.status-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-block;
}

.status-badge--unread {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-primary);
}

.status-badge--read {
    background: var(--bg-glass);
    color: var(--text-muted);
}

/* ============================================
   MODAL — CRUD Forms
   ============================================ */
.modal-content--large {
    max-width: 720px;
}

.modal-body {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* CRUD Form */
.crud-form .form-group {
    margin-bottom: var(--space-lg);
}

.crud-form .form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.crud-form .form-input,
.crud-form .form-textarea,
.crud-form select.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.crud-form select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.crud-form .form-input:focus,
.crud-form .form-textarea:focus,
.crud-form select.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.crud-form .form-textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

.crud-form .form-input::placeholder,
.crud-form .form-textarea::placeholder {
    color: var(--text-muted);
}

/* Checkbox */
.form-group--checkbox {
    margin-top: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    background: var(--bg-glass);
}

.checkbox-label input:checked + .checkbox-mark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-label input:checked + .checkbox-mark::after {
    content: '✓';
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Range Slider */
.form-range {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    outline: none;
    margin-top: 8px;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 212, 170, 0.4);
    transition: transform var(--transition-fast);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: 600;
}

/* File Upload */
.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.03);
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    pointer-events: none;
}

.file-upload-label i {
    font-size: var(--text-2xl);
    color: var(--accent-primary);
    display: block;
    margin-bottom: var(--space-sm);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.file-preview img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-preview a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* Modal Form Actions */
.modal-form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-primary);
    margin-top: var(--space-xl);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
        min-width: 220px;
    }
    .admin-main {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 56px;
        min-width: 56px;
    }
    
    .sidebar-brand span:last-child,
    .sidebar-link span,
    .sidebar-section-title {
        display: none;
    }
    
    .sidebar-link {
        justify-content: center;
        padding: 12px;
    }
    
    .sidebar-link i {
        font-size: var(--text-lg);
        width: auto;
    }
    
    .admin-main {
        margin-left: 56px;
    }
    
    .admin-content {
        padding: var(--space-lg);
    }
    
    .badge { display: none; }
    
    .modal-content--large {
        max-width: 100%;
        margin: var(--space-md);
        max-height: 95vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-form-actions {
        flex-direction: column;
    }
}

/* ============================================
   BUDGET MODULE STYLES
   ============================================ */

/* PIN Entry */
.budget-pin-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: var(--space-xl);
}

.budget-pin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.budget-pin-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.budget-pin-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.budget-pin-subtitle {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 1.5rem;
}

.pin-label {
    display: block;
    text-align: left;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pin-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1rem;
}

.pin-box {
    width: 48px;
    height: 56px;
    background: var(--bg-glass);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.pin-box:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.pin-box--otp {
    letter-spacing: 0;
    font-family: var(--font-mono, monospace);
}

/* PIN shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* PIN feedback */
.pin-feedback {
    min-height: 24px;
    font-size: var(--text-sm);
    margin-top: 4px;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.pin-feedback--loading { color: var(--text-muted); }
.pin-feedback--success { color: #10b981; }
.pin-feedback--error { color: #ef4444; }

.budget-link-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.budget-link-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    text-decoration: underline;
}

/* Budget Dashboard Header */
.budget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.budget-month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.budget-nav-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.budget-nav-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.budget-month-label {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-heading);
    min-width: 180px;
    text-align: center;
}

.budget-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.budget-eye-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.budget-eye-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.budget-eye-btn--hidden {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.budget-eye-btn--hidden:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: #ef4444;
}

/* Summary Cards */
.budget-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.budget-summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.budget-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.budget-card--income {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.04));
    border-color: rgba(16, 185, 129, 0.2);
}

.budget-card--expense {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.04));
    border-color: rgba(239, 68, 68, 0.2);
}

.budget-card--balance {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border-color: rgba(99, 102, 241, 0.2);
}

.budget-card--positive .budget-card-value { color: #10b981; }
.budget-card--negative .budget-card-value { color: #ef4444; }

.budget-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.budget-card--income .budget-card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.budget-card--expense .budget-card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.budget-card--balance .budget-card-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.budget-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.budget-card-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.budget-card-value {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-heading);
}

/* Category Breakdown */
.budget-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.budget-category-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-primary);
}

.budget-category-row:last-child {
    border-bottom: none;
}

.budget-cat-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 130px;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.budget-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.budget-cat-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.budget-cat-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    min-width: 2px;
}

.budget-cat-amount {
    min-width: 110px;
    text-align: right;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.budget-cat-amount small {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.7rem;
}

/* Filter Tabs */
.budget-filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    padding: 3px;
}

.budget-filter-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.budget-filter-btn.active,
.budget-filter-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Entry Type Badges */
.budget-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.budget-type--income {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.budget-type--expense {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* Amount styling */
.budget-amount {
    font-weight: 700;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.budget-amount--income { color: #10b981; }
.budget-amount--expense { color: #ef4444; }

/* Loading */
.budget-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Settings Grid */
.budget-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Category List */
.budget-cat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-primary);
    font-size: var(--text-sm);
}

.budget-cat-list-item:last-child {
    border-bottom: none;
}

/* Color Picker */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent-primary);
    transform: scale(1.15);
}

/* Icon Picker */
.icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    max-height: 120px;
    overflow-y: auto;
}

.icon-swatch {
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    transition: all 0.2s;
}

.icon-swatch:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.icon-swatch.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* Responsive Budget */
@media (max-width: 768px) {
    .budget-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .budget-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .budget-breakdown-grid {
        grid-template-columns: 1fr;
    }
    
    .pin-box {
        width: 40px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .budget-cat-info {
        min-width: 100px;
    }
    
    .budget-cat-amount {
        min-width: 80px;
    }
}
