/* -------------------------------------------------------------
 * VNeID Style Sheet - Desktop & General Admin styling
 * ------------------------------------------------------------- */

:root {
    --primary-color: #a11a1a;
    --primary-dark: #7a1212;
    --primary-light: #fff5f5;
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --success-color: #10b981;
    --success-dark: #047857;
    --danger-color: #ef4444;
    --danger-dark: #b91c1c;
    --bg-main: #f8f9fa;
    --bg-panel: #ffffff;
    --border-color: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================================
 * HEADER
 * ===================================================================== */
.admin-header {
    background: linear-gradient(90deg, var(--primary-color) 0%, #3e0505 100%);
    color: white;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent-color);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 48px;
    height: 48px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-titles h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-color);
}

.header-titles h2 {
    font-size: 0.85rem;
    font-weight: 400;
    color: #f1f3f5;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
}

.btn-back-home {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-back-home:hover {
    background: rgba(255,255,255,0.25);
    color: var(--accent-color);
}

/* =====================================================================
 * APP CONTAINER LAYOUT
 * ===================================================================== */
.admin-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, #3a0000 0%, #1c0000 100%);
    border-right: 2px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 0.8rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.admin-sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/image/heritage-pattern.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: none;
    background: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1f5f9;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    gap: 12px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-weight: 700;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.scanner-nav-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}
.scanner-nav-item.active:hover {
    background: var(--primary-dark);
    color: white;
}

.animate-pulse-svg {
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); }
}

.sidebar-footer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--accent-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* MAIN CONTENT */
.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--bg-main);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

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

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

/* =====================================================================
 * PANELS & CARDS
 * ===================================================================== */
.panel {
    background-color: var(--bg-panel);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-body {
    padding: 1.5rem;
}

/* DASHBOARD STAT CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    right: -15px;
    bottom: -15px;
    width: 90px;
    height: 90px;
    background-image: url('/image/heritage-pattern.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.08;
    pointer-events: none;
}

.bg-red-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7a1212 100%);
}

.bg-gold-gradient {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.9;
}

.stat-header h3 {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 10px 0;
}

.stat-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* DASHBOARD PROGRESS LIST */
.catalog-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.catalog-stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.catalog-stat-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.catalog-stat-bar-bg {
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.catalog-stat-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 1s ease-out;
}

/* =====================================================================
 * TABLES
 * ===================================================================== */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.admin-table th {
    background-color: #fafbfc;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem 1.2rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: #fcfdfe;
}

.text-center {
    text-align: center;
}

.font-mono {
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =====================================================================
 * FILTER BAR
 * ===================================================================== */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.search-box {
    position: relative;
    flex: 2;
}

.search-box input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: white;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Cấu hình chung cho Select (sẽ được ghi đè ở phần Form bên dưới để đồng bộ) */
select {
    outline: none;
}

/* =====================================================================
 * BUTTONS
 * ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

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

.btn-danger:hover {
    background-color: var(--danger-dark);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.catalog-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #e2e8f0;
    color: var(--text-secondary);
}

.catalog-badge.badge-v {
    background-color: #fef3c7;
    color: var(--accent-dark);
    border: 1px solid #fde68a;
}

.catalog-badge.badge-nn {
    background-color: #fee2e2;
    color: var(--primary-color);
    border: 1px solid #fca5a5;
}

.catalog-badge.badge-bc {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

/* =====================================================================
 * MODAL OVERLAY
 * ===================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeInModal 0.2s ease-out;
}

.modal-overlay.active {
    display: flex;
}

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

.modal {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-main);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

/* FORM STYLING */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #374151;
}

.required {
    color: var(--danger-color);
}

input[type="text"],
input[type="date"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #1f2937;
    background-color: #f8fafc;
    outline: none;
    cursor: text;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

select {
    cursor: pointer;
}

input[type="text"]:hover,
input[type="date"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
    border-color: #9ca3af;
    background-color: #f1f5f9;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(161, 26, 26, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

/* =====================================================================
 * SCANNER LAYOUT & COMPONENTS
 * ===================================================================== */
.scanner-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }
}

.scanner-panel {
    min-height: 450px;
}

.flex-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#reader-wrapper {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    border: 3px dashed var(--primary-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-color: #000;
    margin-bottom: 1.5rem;
}

#reader {
    width: 100%;
    height: 100%;
}

/* Ẩn các nút điều khiển mặc định của thư viện html5-qrcode */
#reader button, #reader select {
    display: none !important;
}

.scanner-controls {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    justify-content: center;
}

.divider-text {
    width: 100%;
    max-width: 380px;
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--border-color);
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

.file-scan-area {
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: center;
}

.result-panel {
    min-height: 450px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.result-placeholder p {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
}

.result-placeholder span {
    font-size: 0.8rem;
}

/* =====================================================================
 * VNEID PREMIUM CHECK-IN CARD
 * ===================================================================== */
.vneid-card {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 2px solid var(--success-color);
    overflow: hidden;
    animation: slideUpIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vneid-card.card-failed {
    border-color: var(--danger-color);
}

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

.vneid-card-header {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success-color) 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vneid-card-header.bg-danger {
    background: linear-gradient(135deg, var(--danger-dark) 0%, var(--danger-color) 100%);
}

.badge-emblem {
    background-color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.vneid-card-title h4 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.vneid-card-title span {
    font-size: 0.65rem;
    opacity: 0.9;
    letter-spacing: 0.2px;
    display: block;
}

.vneid-card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vneid-avatar-box {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.vneid-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffc107;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.vneid-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.vneid-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vneid-field.full-width {
    grid-column: 1 / -1;
}

.vneid-field label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.vneid-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vneid-value.highlight-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.vneid-card-footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: center;
}

.verified-timestamp {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =====================================================================
 * TICKET CARD (IN VÉ)
 * ===================================================================== */
.vneid-ticket-card {
    background: linear-gradient(185deg, #a11a1a 0%, #680d0d 100%);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    width: 320px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--accent-color);
    position: relative;
}

.vneid-ticket-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/image/heritage-pattern.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
    opacity: 0.05;
    pointer-events: none;
}

.vneid-ticket-header {
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.vneid-ticket-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-color);
}

#ticket-catalog-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 2px;
}

.vneid-ticket-qr-container {
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.vneid-ticket-qr-container img {
    width: 160px;
    height: 160px;
    margin-bottom: 6px;
}

.vneid-ticket-info {
    text-align: center;
    width: 100%;
}

.ticket-name {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.ticket-org {
    font-size: 0.8rem;
    opacity: 0.9;
}

.ticket-position {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* =====================================================================
 * LOGIN OVERLAY (XÁC THỰC CÁN BỘ BẰNG QR)
 * ===================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #a11a1a 0%, #3a0000 100%);
    background-image: radial-gradient(circle at 20% 30%, rgba(161, 26, 26, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1.5rem;
}

.login-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/image/heritage-pattern.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70vh;
    opacity: 0.03;
    pointer-events: none;
}

.login-overlay.active {
    display: flex;
}

.login-card {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    border: 2px solid var(--accent-color);
    text-align: center;
}

.login-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

#login-reader-wrapper {
    width: 240px;
    height: 240px;
    border: 3px dashed var(--primary-color);
    border-radius: 16px;
    overflow: hidden;
    background-color: #000000;
    margin: 1.5rem auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

#login-reader {
    width: 100%;
    height: 100%;
}

#login-reader button, #login-reader select {
    display: none !important;
}

.login-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}
