/* styles/style.css — Intelino Premium Design System */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2236;
    --text-main: #f1f5f9;
    --text-muted: #8896b3;
    --text-dim: #5c6b8a;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-soft: rgba(99, 102, 241, 0.12);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --info: #0ea5e9;
    --info-soft: rgba(14, 165, 233, 0.12);
    --glass-bg: rgba(17, 24, 39, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
    --shadow-accent: 0 4px 16px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════
   LIGHT MODE THEME
   ═══════════════════════════════════════════ */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf0;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --text-dim: #718096;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --accent-soft: rgba(99, 102, 241, 0.08);
    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.08);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.08);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.08);
    --info: #0284c7;
    --info-soft: rgba(2, 132, 199, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 4px 16px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] body {
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
    color: var(--text-main);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .nav-item {
    color: var(--text-muted);
}
[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}
[data-theme="light"] .nav-item .nav-badge {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-dim);
}

[data-theme="light"] .search-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--glass-border);
}
[data-theme="light"] .search-input:focus {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--glass-border);
    color: var(--text-main);
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus {
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] select option {
    background: var(--bg-secondary);
    color: var(--text-main);
}

[data-theme="light"] .data-table thead {
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .data-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .empty-state {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .badge-info {
    background: var(--info-soft);
    color: #0369a1;
    border-color: rgba(2, 132, 199, 0.15);
}
[data-theme="light"] .badge-success,
[data-theme="light"] .badge-active {
    background: var(--success-soft);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.15);
}
[data-theme="light"] .badge-warning {
    background: var(--warning-soft);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.15);
}
[data-theme="light"] .badge-error {
    background: var(--danger-soft);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.15);
}
[data-theme="light"] .badge-expired {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-dim);
    border-color: var(--glass-border);
}

[data-theme="light"] .filter-chip {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--glass-border);
    color: var(--text-muted);
}
[data-theme="light"] .filter-chip:hover {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .filter-chip.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border-color: var(--glass-border);
}
[data-theme="light"] .btn-secondary:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.2);
}
[data-theme="light"] .btn-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.2);
}

[data-theme="light"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--glass-border);
}
[data-theme="light"] .modal-close {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

[data-theme="light"] .toast-success {
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border-color: rgba(5, 150, 105, 0.2);
    color: #065f46;
}
[data-theme="light"] .toast-error {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    border-color: rgba(220, 38, 38, 0.2);
    color: #991b1b;
}
[data-theme="light"] .toast-info {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border-color: rgba(99, 102, 241, 0.2);
    color: #1e3a8a;
}

[data-theme="light"] .login-container,
[data-theme="light"] #login {
    background: linear-gradient(135deg, #e8ecf0 0%, #f0f2f5 100%);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 60%);
}
[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}
[data-theme="light"] .login-header h1 {
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .contrato-card .valor-destaque {
    color: var(--text-main);
}
[data-theme="light"] .contrato-card .valor-destaque small {
    color: var(--text-dim);
}

[data-theme="light"] .progress-bar-container {
    background: rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
    width: 270px;
    min-width: 270px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    z-index: 10;
    transition: var(--transition);
}

.logo-container {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-icon svg {
    flex-shrink: 0;
}

.logo-icon-lg {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    padding: 11px 16px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    user-select: none;
}

.nav-item .nav-icon {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item .nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-item .nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
    box-shadow: var(--shadow-accent);
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Mobile menu toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

/* ─── Main Content ─── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    min-width: 0;
}

/* ─── Header ─── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.header-left h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.header-left .header-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:active:not(:disabled) { transform: scale(0.96); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-hover);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-soft);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.btn-warning:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.2);
}

.btn-danger {
    background: var(--danger-soft);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
}

.btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.w-full { width: 100%; }

/* ═══════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.stat-accent::before { background: linear-gradient(90deg, var(--accent), #a855f7); }
.stat-card.stat-success::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.stat-danger::before { background: linear-gradient(90deg, var(--danger), #fb7185); }
.stat-card.stat-info::before { background: linear-gradient(90deg, var(--info), #38bdf8); }

.stat-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-accent .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-success .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-warning .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-info .stat-icon { background: var(--info-soft); color: var(--info); }

.stat-info-text { display: flex; flex-direction: column; gap: 2px; }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════
   VIEWS & SECTIONS
   ═══════════════════════════════════════════ */
.view-section {
    display: none;
    animation: fadeInUp 0.4s ease forwards;
}

.view-section.active { display: block; }

.section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .title-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 10px;
    border-radius: 20px;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 320px;
    flex: 1;
}

.search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.search-container .search-icon svg {
    width: 15px;
    height: 15px;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 13px;
    transition: var(--transition);
}

.search-input::placeholder { color: var(--text-dim); }

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 0, 0, 0.3);
}

/* Filter Chips */
.filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    transition: var(--transition);
    user-select: none;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.filter-chip.active {
    background: var(--accent-soft);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.filter-chip.active[data-filter="pago"] {
    background: var(--success-soft);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}
.filter-chip.active[data-filter="pendente"] {
    background: var(--warning-soft);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
.filter-chip.active[data-filter="atrasado"] {
    background: var(--danger-soft);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════
   COLLAPSIBLE FORM PANEL
   ═══════════════════════════════════════════ */
.form-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
}

.form-panel:hover { border-color: var(--glass-border-hover); }

.form-panel-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.form-panel-header:hover { background: rgba(255, 255, 255, 0.02); }

.form-panel-header h2 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-panel-header .toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.form-panel-header .toggle-icon svg {
    width: 14px;
    height: 14px;
}

.form-panel-header h2 svg {
    width: 16px;
    height: 16px;
}

.form-panel.open .form-panel-header .toggle-icon {
    transform: rotate(180deg);
}

.form-panel-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-panel.open .form-panel-body {
    max-height: 500px;
}

.form-panel-body-inner {
    padding: 0 1.5rem 1.5rem;
}

/* Action Panel (for cobranças batch actions) */
.action-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-panel-info h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-panel-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.action-panel-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   CARDS & GRID
   ═══════════════════════════════════════════ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body p svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-dim);
}

.card-body p strong,
.card-body p .label {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 12px;
    min-width: fit-content;
}

.card-body p .value {
    color: var(--text-main);
    font-weight: 500;
}

.card-actions {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    gap: 8px;
}

/* ─── Inquilino Card with Avatar ─── */
.inquilino-card .card-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inquilino-name {
    flex: 1;
    min-width: 0;
}

.inquilino-name h3 {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inquilino-name .inquilino-id {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}

/* ─── Contrato Card ─── */
.contrato-card .valor-destaque {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.5rem 0;
    letter-spacing: -0.5px;
}

.contrato-card .valor-destaque small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--accent), #a855f7);
}

.progress-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

/* ═══════════════════════════════════════════
   COBRANCA TABLE
   ═══════════════════════════════════════════ */
.table-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: hidden;
}

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

.data-table thead {
    background: rgba(0, 0, 0, 0.2);
}

.data-table th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.data-table .td-value {
    font-weight: 600;
    color: var(--text-main);
}

.data-table .td-encargos {
    font-size: 11px;
    color: var(--danger);
    font-weight: 500;
}

.data-table .td-action {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group { flex: 1; }

input,
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 13px;
    transition: var(--transition);
}

input::placeholder,
select::placeholder { color: var(--text-dim); }

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 0, 0, 0.35);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238896b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select option {
    background: var(--bg-secondary);
    color: var(--text-main);
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge svg {
    width: 12px;
    height: 12px;
}

.badge-info {
    background: var(--info-soft);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.badge-success {
    background: var(--success-soft);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: var(--warning-soft);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: var(--danger-soft);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-active {
    background: var(--success-soft);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-expired {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid var(--glass-border);
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.badge-error { animation: pulse-badge 2s ease-in-out infinite; }

/* ═══════════════════════════════════════════
   STATES
   ═══════════════════════════════════════════ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 4rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
    font-size: 14px;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s ease-in-out infinite;
}

.spinner.small { width: 16px; height: 16px; border-width: 2px; }
.spinner.white { border-top-color: white; }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    border: 1px dashed rgba(255, 255, 255, 0.06);
}

.empty-state-icon {
    margin-bottom: 1rem;
    opacity: 0.4;
    display: flex;
    justify-content: center;
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
}

.empty-state-text {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.empty-state-sub {
    font-size: 13px;
    color: var(--text-dim);
}

.error-state {
    grid-column: 1 / -1;
    padding: 1.25rem;
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-radius: var(--radius);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-state svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* ═══════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    max-width: 380px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    animation: toast-progress 4s linear forwards;
}

.toast-success {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}
.toast-success .toast-progress { background: var(--success); }

.toast-error {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fecaca;
}
.toast-error .toast-progress { background: var(--danger); }

.toast-info {
    background: linear-gradient(135deg, #1e3a5f, #1e3a8a);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #bfdbfe;
}
.toast-info .toast-progress { background: var(--accent); }

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* ═══════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════ */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* ═══════════════════════════════════════════
   ICON UTILITIES (Lucide SVG)
   ═══════════════════════════════════════════ */

/* Base: all inline SVG icons inherit color from parent */
svg {
    flex-shrink: 0;
    vertical-align: middle;
}

/* Sizing helpers */
.icon-sm svg { width: 14px; height: 14px; }
.icon-md svg { width: 18px; height: 18px; }
.icon-lg svg { width: 24px; height: 24px; }
.icon-xl svg { width: 32px; height: 32px; }

/* ═══════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════ */
#login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    background-attachment: fixed;
    z-index: 1000;
}

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    background-attachment: fixed;
    z-index: 1000;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.login-header .logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#login-form .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#login-form .form-group input {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition);
}

#login-form .form-group input::placeholder {
    color: var(--text-dim);
}

#login-form .form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#login-form .btn {
    margin-top: 0.5rem;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .main-content { padding: 1.5rem; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .sidebar-toggle { display: flex; }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 50;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.open { left: 0; }
    
    .main-content { padding: 1.25rem; padding-top: 4rem; }
    
    .header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; }
    
    .stats-bar { grid-template-columns: 1fr 1fr; }
    
    .form-row { flex-direction: column; gap: 0; }
    
    .section-toolbar { flex-direction: column; align-items: flex-start; }
    
    .action-panel { flex-direction: column; align-items: flex-start; }
    .action-panel-buttons { width: 100%; }
    .action-panel-buttons .btn { flex: 1; }
    
    .grid { grid-template-columns: 1fr; }
    
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 10px 12px; }

    .filter-bar { width: 100%; }
}

@media (max-width: 480px) {
    .stats-bar { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 20px; }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}
.sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════════════
   TOOLBAR ACTIONS
   ═══════════════════════════════════════════ */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.export-dropdown {
    display: flex;
    gap: 4px;
}

.optional {
    font-weight: 400;
    color: var(--text-dim);
    text-transform: none;
    font-size: 11px;
}

/* ═══════════════════════════════════════════
   CONFIG MODAL TABS
   ═══════════════════════════════════════════ */
.modal-lg {
    max-width: 580px;
}

.config-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0;
}

.config-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-tab svg {
    width: 14px;
    height: 14px;
}

.config-tab:hover {
    color: var(--text-main);
}

.config-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.config-tab-panel {
    display: none;
}

.config-tab-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease forwards;
}

/* ═══════════════════════════════════════════
   DELETE MODAL
   ═══════════════════════════════════════════ */
.delete-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.delete-modal-overlay.open {
    opacity: 1;
}

.delete-modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;

    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.delete-step {
    display: none;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease forwards;
}

.delete-step.active {
    display: block;
}

.delete-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.delete-modal-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.delete-modal-icon svg {
    width: 28px;
    height: 28px;
}

.delete-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.delete-modal-body {
    margin-bottom: 1.5rem;
}

.delete-target {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.delete-target strong {
    color: var(--text-main);
    font-weight: 600;
    display: block;
    font-size: 15px;
    margin-top: 4px;
}

.delete-target-id {
    color: var(--text-dim);
    font-size: 11px;
    font-family: monospace;
}

.delete-impacts {
    margin-bottom: 1.25rem;
}

.delete-impacts h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 6px;
}

.delete-impacts h4 svg {
    width: 14px;
    height: 14px;
}

.delete-impacts ul {
    list-style: none;
    padding: 0;
}

.delete-impacts li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-impacts li::before {
    content: '•';
    color: var(--danger);
    font-weight: bold;
}

.delete-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delete-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.delete-option:hover {
    border-color: var(--glass-border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.delete-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.delete-option[data-type="hard"].selected {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.delete-option input[type="radio"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.delete-option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delete-option-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-recommended {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--success-soft);
    color: var(--success);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.delete-option-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.delete-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.delete-modal-actions .btn {
    min-width: 130px;
}

/* Step 2: Confirm */
.delete-confirm-content {
    padding: 1rem;
}

.delete-confirm-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    padding: 1rem;
    background: var(--success-soft);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.delete-confirm-danger {
    font-size: 14px;
    color: #f87171;
    line-height: 1.8;
    padding: 1rem;
    background: var(--danger-soft);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.15);
    margin-bottom: 1rem;
}

.delete-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 10px;
}

.delete-checkbox input[type="checkbox"] {
    width: auto;
    accent-color: var(--danger);
}

/* Step 3: Result */
.delete-result {
    padding: 1rem;
}

.delete-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 13px;
}

.delete-result-item:last-child {
    border-bottom: none;
}

.delete-result-label {
    color: var(--text-dim);
    font-weight: 500;
}

.delete-result-note {
    margin-top: 1rem;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
}

/* ═══════════════════════════════════════════
   STORAGE DASHBOARD
   ═══════════════════════════════════════════ */
.storage-header {
    margin-bottom: 1.5rem;
}

.storage-header h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.storage-overview {
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.storage-usage-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.storage-usage-values {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.storage-used {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.storage-separator {
    font-size: 13px;
    color: var(--text-dim);
}

.storage-total {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.storage-percent {
    font-size: 20px;
    font-weight: 700;
}

.storage-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.storage-available {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
}

.storage-distribution {
    margin-bottom: 1.5rem;
}

.storage-distribution h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.storage-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.storage-item:hover {
    background: rgba(0, 0, 0, 0.15);
}

.storage-item-deleted {
    border: 1px dashed rgba(239, 68, 68, 0.2);
}

.storage-item-icon {
    flex-shrink: 0;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.storage-item-icon svg {
    width: 20px;
    height: 20px;
}

.storage-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.storage-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.storage-item-count {
    font-size: 11px;
    color: var(--text-dim);
}

.storage-item-size {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.storage-item-percent {
    font-size: 12px;
    color: var(--text-dim);
    min-width: 35px;
    text-align: right;
}

.storage-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.storage-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--info-soft);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(14, 165, 233, 0.15);
    font-size: 13px;
    color: var(--text-muted);
    width: 100%;
}

.storage-tip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.storage-tip-icon svg {
    width: 18px;
    height: 18px;
}

.storage-tip-text {
    line-height: 1.6;
}

.storage-tip-text strong {
    color: var(--text-main);
}

/* ═══════════════════════════════════════════
   LIGHT MODE: NEW COMPONENTS
   ═══════════════════════════════════════════ */
[data-theme="light"] .delete-modal-container {
    background: var(--bg-secondary);
}
[data-theme="light"] .delete-target {
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .delete-option:hover {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .storage-overview {
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .storage-bar-track {
    background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .storage-item {
    background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .storage-item:hover {
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .delete-confirm-text {
    color: #065f46;
}