/* ==========================================================================
   CONTROL DE ENVASES COOPERATIVA - MODERN STYLESHEET
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --primary-border: #a7f3d0;
    
    --retirada-color: #059669;
    --retirada-bg: #f0fdf4;
    --retirada-border: #86efac;

    --entrega-color: #2563eb;
    --entrega-bg: #eff6ff;
    --entrega-border: #93c5fd;

    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-focus: #10b981;
    
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;

    /* Radius & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);

    /* Fonts & Transitions */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 70px; /* Offset for bottom nav on mobile */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 20px;
    }
}

/* Layout Containers */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 16px 20px;
    margin: 0 -16px 20px -16px;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .app-header {
        margin: 16px 0 24px 0;
        border-radius: var(--radius-lg);
    }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    background: transparent;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo-img, .login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}


.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.brand-sub {
    font-size: 0.8rem;
    color: #a7f3d0;
}

.header-stats {
    display: none;
    gap: 12px;
}

@media (min-width: 640px) {
    .header-stats {
        display: flex;
    }
}

.stat-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.stat-label {
    color: #cbd5e1;
}

.stat-val {
    font-weight: 700;
    color: #34d399;
}

/* User Menu & Dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar-btn:hover, .user-avatar-btn:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #34d399;
    color: #34d399;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    padding: 8px 0;
    z-index: 1000;
    animation: fadeInDown 0.15s ease-out;
}

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

.user-dropdown-header {
    padding: 10px 16px;
}

.user-dropdown-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
}

.user-dropdown-email {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
    word-break: break-all;
    margin-top: 2px;
}

.user-dropdown-divider {
    height: 1px;
    background-color: #334155;
    margin: 6px 0;
}

.user-dropdown-item {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-dropdown-logout {
    color: #fca5a5;
}

.btn-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}


/* Login Modal */
.login-card {
    border-top: 4px solid var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.login-logo-circle {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 12px auto;
}

.login-alert {
    background: var(--danger-bg);
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 14px;
}


.btn-install-pwa {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-install-pwa:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Navigation Tabs */
.app-nav {
    display: flex;
    gap: 6px;
    background: #ffffff;
    padding: 6px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

/* Mobile Fixed Bottom Nav */
@media (max-width: 767px) {
    .app-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin-bottom: 0;
        border-radius: 0;
        border-top: 1px solid var(--border-color);
        z-index: 100;
        justify-content: space-around;
        padding: 8px 4px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-tab {
        flex-direction: column;
        gap: 4px;
        font-size: 0.72rem;
        padding: 6px 8px;
        flex: 1;
        text-align: center;
    }
}

/* Soporte para iPhones con barra de inicio inferior (Safe Area Insets) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 767px) {
        body {
            padding-bottom: calc(75px + env(safe-area-inset-bottom));
        }
        .app-nav {
            padding-bottom: calc(8px + env(safe-area-inset-bottom));
        }
    }
}


.nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-tab.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Main Content Area */
.tab-content {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Panel Cards */
.panel-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.main-control-panel {
    border-top: 4px solid var(--primary);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.header-with-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

.panel-grid-2col > * {
    min-width: 0;
}

@media (min-width: 900px) {
    .panel-grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}


/* Forms & Inputs */
.control-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .form-row {
        flex-direction: row;
    }
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label-sm {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.label-number {
    background: var(--primary);
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    background: #ffffff;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-input-sm {
    padding: 8px 12px;
    font-size: 0.88rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 42px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Autocomplete Dropdown */
.socio-select-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
}

.autocomplete-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

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

.autocomplete-item:hover, .autocomplete-item.active {
    background: var(--primary-light);
}

.item-socio-num {
    font-weight: 700;
    color: var(--primary);
}

.item-socio-name {
    font-weight: 500;
    color: var(--text-main);
}

.item-socio-bal {
    font-size: 0.82rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #e2e8f0;
    color: var(--text-main);
}

/* Selected Socio Card */
.selected-socio-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid var(--primary-border);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.socio-card-num {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

.socio-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #064e3b;
}

.balance-title {
    font-size: 0.78rem;
    color: #047857;
    display: block;
}

.balance-badge {
    font-weight: 700;
    font-size: 0.95rem;
    color: #064e3b;
}

/* Movement Type Toggles */
.movement-toggle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .movement-toggle-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.movement-option {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    position: relative;
    user-select: none;
}

.movement-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.option-icon {
    font-size: 2rem;
    line-height: 1;
}

.option-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.option-text span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.effect-tag {
    margin-top: 4px;
    font-weight: 600;
    font-size: 0.75rem !important;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block !important;
}

.effect-plus {
    background: #dcfce7;
    color: #15803d !important;
}

.effect-minus {
    background: #dbeafe;
    color: #1e40af !important;
}

/* Selected Movement Option States */
.movement-option.option-retirada.selected {
    border-color: var(--retirada-color);
    background: var(--retirada-bg);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.movement-option.option-entrega.selected {
    border-color: var(--entrega-color);
    background: var(--entrega-bg);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Quantity Control & Quick Buttons */
.quantity-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 260px;
}

.btn-step {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-step:hover {
    background: var(--bg-page);
    border-color: var(--primary);
    color: var(--primary);
}

.quantity-input {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 8px;
}

.quick-add-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-quick {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-quick:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
}

/* Live Preview Calculation Box */
.live-preview-box {
    background: #f8fafc;
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.preview-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.preview-math {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.preview-value.highlight {
    font-size: 1.3rem;
    color: var(--primary);
}

.preview-op {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-page);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

/* Tables & Data Displays */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
}

.checkbox-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: block;
}

.table-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}


.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.data-table th {
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.data-table tbody tr:hover {
    background: #f8fafc;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-orange { color: #d97706; font-weight: 700; }
.text-blue { color: #2563eb; font-weight: 700; }
.text-emerald { color: #059669; font-weight: 700; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-retirada {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-entrega {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-zero {
    background: #f1f5f9;
    color: #64748b;
}

.badge-pending {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.badge-anulado {
    background: #fef2f2;
    color: #b91c1c;
    text-decoration: line-through;
}

.annulment-reason-tag {
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.82rem;
    background: #fef2f2;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid #fca5a5;
    margin-top: 4px;
    display: inline-block;
}


/* Seed & Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

.demo-seed-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.demo-seed-box h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.demo-seed-box p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-sm {
    max-width: 440px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: center;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark-card);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1100;
    font-size: 0.92rem;
    font-weight: 500;
    animation: slideUp 0.3s ease-out;
}

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

/* Helpers */
.hidden { display: none !important; }
.mt-3 { margin-top: 12px; }
.text-muted { color: var(--text-muted); }
