/* ===========================
   Smart Lekhapal — Admin Panel CSS
   Premium Light-Mode
   =========================== */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #f1f5f9;
    --bg-card-hover: #e2e8f0;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-green: #059669;
    --accent-gold: #d97706;
    --accent-red: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.08);
    --glow-blue: rgba(37, 99, 235, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Login Screen ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-card>p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    text-align: center;
    letter-spacing: 2px;
    transition: border-color 0.2s;
}

.login-form input:focus {
    border-color: var(--accent-blue);
}

.login-form input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0;
}

.login-form button {
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-form button:hover {
    box-shadow: 0 8px 24px var(--glow-blue);
    transform: translateY(-1px);
}

.login-error {
    color: var(--accent-red);
    font-size: 0.85rem;
    margin-top: 12px;
    min-height: 20px;
}

/* ===== Admin Header ===== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo {
    font-size: 1.5rem;
}

.admin-header-left h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-purple);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    vertical-align: middle;
    margin-left: 4px;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(220, 38, 38, 0.08);
    color: var(--accent-red);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* ===== Stats Row ===== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.08);
}

.stat-icon.green {
    background: rgba(5, 150, 105, 0.08);
}

.stat-icon.gold {
    background: rgba(217, 119, 6, 0.08);
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.08);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Tabs ===== */
.admin-tabs {
    display: flex;
    gap: 4px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 14px 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
    padding: 24px 32px;
}

.tab-content.active {
    display: block;
}

/* ===== Generate Code Form ===== */
.generate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 800px;
}

.generate-card h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.generate-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-secondary);
}

.btn-generate {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-generate:hover {
    box-shadow: 0 8px 24px var(--glow-blue);
    transform: translateY(-1px);
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Generated Code Display */
.generated-code-box {
    margin-top: 24px;
    padding: 24px;
    background: rgba(5, 150, 105, 0.06);
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: var(--radius);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.code-display span {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    color: var(--accent-green);
}

.btn-copy {
    padding: 8px 14px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(5, 150, 105, 0.18);
}

.code-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-whatsapp {
    padding: 10px 24px;
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
}

/* ===== Tables ===== */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.table-header h3 {
    font-size: 1.2rem;
}

.table-filters {
    display: flex;
    gap: 10px;
}

.table-filters select {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
}

.table-filters select option {
    background: var(--bg-secondary);
}

.table-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-table th {
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.admin-table tbody tr {
    transition: background 0.15s;
}

.admin-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.admin-table .code-cell {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px !important;
    font-style: italic;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.pending {
    background: rgba(217, 119, 6, 0.08);
    color: var(--accent-gold);
}

.badge.redeemed {
    background: rgba(5, 150, 105, 0.08);
    color: var(--accent-green);
}

.badge.expired {
    background: rgba(220, 38, 38, 0.08);
    color: var(--accent-red);
}

.badge.advance {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
}

.badge.professional {
    background: rgba(124, 58, 237, 0.08);
    color: var(--accent-purple);
}

.badge.active {
    background: rgba(5, 150, 105, 0.08);
    color: var(--accent-green);
}

/* Action buttons */
.btn-action {
    padding: 5px 10px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-action:hover {
    background: rgba(37, 99, 235, 0.15);
}

.btn-action.delete {
    background: rgba(220, 38, 38, 0.08);
    color: var(--accent-red);
    border-color: rgba(220, 38, 38, 0.15);
}

.btn-action.delete:hover {
    background: rgba(220, 38, 38, 0.15);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 300;
    animation: fadeIn 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

.toast-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #059669;
}

.toast-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }

    .admin-tabs {
        padding: 0 16px;
        overflow-x: auto;
    }

    .tab-content {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-header {
        padding: 12px 16px;
    }

    .generate-card {
        padding: 20px;
    }

    .code-display span {
        font-size: 1.4rem;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ===== Users Tab — Expandable Rows ===== */
.owner-row {
    cursor: pointer;
    transition: background 0.2s;
}

.owner-row:hover {
    background: var(--bg-card-hover);
}

.staff-row {
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--accent-purple);
}

.staff-row td:first-child {
    color: var(--text-secondary);
}

.expand-btn {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-blue);
    cursor: pointer;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.08);
    transition: background 0.2s;
}

.expand-btn:hover {
    background: rgba(37, 99, 235, 0.15);
}

.no-staff-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.no-owner-label {
    color: var(--text-muted);
}

/* ===== Search Input ===== */
.search-input {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    min-width: 200px;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent-blue);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ===== Action Buttons (icon style) ===== */
.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin: 0 2px;
}

.btn-icon:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.btn-icon.delete {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.12);
}

.btn-icon.delete:hover {
    background: rgba(220, 38, 38, 0.15);
}

.actions-cell {
    white-space: nowrap;
}

/* ===== Admin Modal ===== */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

.admin-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.admin-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-red);
    border-color: rgba(220, 38, 38, 0.2);
}

.admin-modal-body {
    padding: 24px;
}

.modal-user-avatar {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 16px;
    font-size: 1.8rem;
    margin: 0 auto 24px;
}

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.btn-modal-cancel {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-modal-cancel:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.btn-modal-save {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-modal-save:hover {
    box-shadow: 0 6px 20px var(--glow-blue);
    transform: translateY(-1px);
}

.btn-modal-resolve {
    padding: 10px 20px;
    background: rgba(5, 150, 105, 0.08);
    color: var(--accent-green);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-modal-resolve:hover {
    background: rgba(5, 150, 105, 0.18);
}

.btn-modal-dismiss {
    padding: 10px 20px;
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-modal-dismiss:hover {
    background: rgba(100, 116, 139, 0.25);
}

/* Modal Status Toggle */
.modal-status-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.modal-status-toggle span {
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-toggle {
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-toggle:hover {
    background: rgba(37, 99, 235, 0.18);
}

.btn-toggle.danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--accent-red);
    border-color: rgba(220, 38, 38, 0.2);
}

.btn-toggle.danger:hover {
    background: rgba(220, 38, 38, 0.18);
}

/* Textarea */
.admin-modal-body textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.admin-modal-body textarea:focus {
    border-color: var(--accent-blue);
}

.admin-modal-body textarea::placeholder {
    color: var(--text-muted);
}

/* ===== Report Stats ===== */
.reports-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.report-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: all 0.2s;
}

.report-stat-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.report-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.report-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.report-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ===== Report Badges ===== */
.badge.report-open {
    background: rgba(220, 38, 38, 0.08);
    color: var(--accent-red);
}

.badge.report-resolved {
    background: rgba(5, 150, 105, 0.08);
    color: var(--accent-green);
}

.badge.report-dismissed {
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
}

/* Category Badges */
.badge.cat-bug {
    background: rgba(220, 38, 38, 0.06);
    color: #dc2626;
}

.badge.cat-feature {
    background: rgba(37, 99, 235, 0.06);
    color: #2563eb;
}

.badge.cat-complaint {
    background: rgba(217, 119, 6, 0.06);
    color: var(--accent-gold);
}

.badge.cat-other {
    background: rgba(124, 58, 237, 0.06);
    color: #7c3aed;
}

/* Report Table Helper */
.report-subject-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-business-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* ===== Report Detail Modal ===== */
.report-detail-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.report-detail-field.full-width {
    flex-direction: column;
    gap: 6px;
}

.report-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 110px;
    flex-shrink: 0;
}

.report-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.report-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Responsive — New Elements ===== */
@media (max-width: 768px) {
    .reports-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-modal {
        max-width: 100%;
        margin: 12px;
        max-height: 95vh;
    }

    .admin-modal-body .form-row {
        grid-template-columns: 1fr;
    }

    .search-input {
        min-width: 140px;
    }

    .report-detail-field {
        flex-direction: column;
        gap: 4px;
    }

    .fm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .fm-file-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fm-upload-zone {
        padding: 28px 16px;
    }
}

/* ===========================
   File Manager
   =========================== */
.fm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.fm-header h3 {
    font-size: 1.2rem;
}

.fm-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-dir-select {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

/* Upload Zone */
.fm-upload-zone {
    position: relative;
    padding: 40px 24px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    background: var(--bg-card);
}

.fm-upload-zone:hover,
.fm-upload-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.04);
    transform: translateY(-2px);
}

.fm-upload-zone.dragover {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.fm-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.fm-upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-upload-text strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.fm-upload-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Progress Bar */
.fm-upload-progress {
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 14px;
}

.fm-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-card-hover);
    border-radius: 50px;
    overflow: hidden;
}

.fm-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50px;
    transition: width 0.3s ease;
}

.fm-progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
}

/* Breadcrumbs */
.fm-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    overflow-x: auto;
}

.fm-crumb {
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.fm-crumb:hover {
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.06);
}

.fm-crumb.active {
    color: var(--text-primary);
    font-weight: 600;
}

.fm-crumb-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
    -webkit-user-select: none;
    user-select: none;
}

/* File Grid */
.fm-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.fm-file-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px 16px;
    transition: all 0.2s;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.fm-file-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.fm-file-card.is-dir {
    cursor: pointer;
}

.fm-file-card.is-dir:hover {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.03);
}

.fm-file-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.fm-file-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.fm-file-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.fm-file-card:hover .fm-file-actions {
    opacity: 1;
}

.fm-file-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.fm-file-action-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.fm-file-action-btn.delete:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

.fm-file-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.3;
    margin-bottom: 6px;
}

.fm-file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.fm-file-meta span {
    white-space: nowrap;
}

/* Empty State */
.fm-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.fm-footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    padding: 8px 4px;
}

/* Upload success animation */
@keyframes uploadPulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.3); }
    70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.fm-file-card.just-uploaded {
    animation: uploadPulse 1s ease-out;
    border-color: var(--accent-green);
}

/* ===========================
   App Update Manager
   =========================== */
.au-header {
    margin-bottom: 24px;
}

.au-header h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.au-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.au-publish-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
}

.au-publish-card h4 {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Platform Cards */
.au-platform-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.au-platform-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.au-platform-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

.au-platform-card.has-file {
    border-style: solid;
    border-color: var(--accent-green);
    background: rgba(5, 150, 105, 0.03);
}

.au-pf-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.au-pf-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.au-pf-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.au-pf-file {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.au-pf-file.selected {
    color: var(--accent-green);
    font-weight: 600;
}

/* Priority Selector */
.au-priority-selector {
    display: flex;
    gap: 8px;
}

.au-priority-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: inherit;
}

.au-priority-btn small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
}

.au-priority-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Active states per priority */
.au-priority-btn.high.active {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
    color: #dc2626;
}
.au-priority-btn.high.active small { color: #dc2626; }

.au-priority-btn.medium.active {
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.06);
    color: #d97706;
}
.au-priority-btn.medium.active small { color: #d97706; }

.au-priority-btn.low.active {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.06);
    color: #059669;
}
.au-priority-btn.low.active small { color: #059669; }

/* Priority Info Banner */
.au-priority-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.au-priority-info-icon {
    font-size: 1.2rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.au-priority-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.au-priority-info p strong {
    color: var(--text-primary);
}

/* Info banner color variants */
.au-priority-info.high {
    background: rgba(220, 38, 38, 0.04);
    border-color: rgba(220, 38, 38, 0.15);
}

.au-priority-info.medium {
    background: rgba(217, 119, 6, 0.04);
    border-color: rgba(217, 119, 6, 0.15);
}

.au-priority-info.low {
    background: rgba(5, 150, 105, 0.04);
    border-color: rgba(5, 150, 105, 0.15);
}

/* ===== Update History ===== */
.au-history {
    margin-top: 8px;
}

.au-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.au-update-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.au-update-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.au-update-version {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.au-version-tag {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.au-update-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.au-update-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.au-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.au-badge.android {
    background: rgba(5, 150, 105, 0.08);
    color: var(--accent-green);
}

.au-badge.windows {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
}

.au-badge.priority-high {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.au-badge.priority-medium {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.au-badge.priority-low {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.au-badge.active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-green);
}

.au-badge.inactive {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

.au-update-changelog {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.au-update-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.au-update-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .au-platform-row {
        grid-template-columns: 1fr;
    }

    .au-priority-selector {
        flex-direction: column;
    }

    .au-update-card {
        flex-direction: column;
        gap: 12px;
    }

    .au-update-version {
        flex-direction: row;
        min-width: auto;
    }

    .au-update-actions {
        flex-direction: row;
    }
}