/* ==========================================================================
   Hall Matrix - Official Institutional Seating & Attendance Matrix Planner
   Master Executive Stylesheet
   ========================================================================== */

:root {
    /* Executive Light Theme Palette (Default) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #cbd5e1;
    --border-subtle: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;

    /* Primary Corporate Brand Accents */
    --brand-primary: #1e1b4b;
    --brand-accent: #4f46e5;
    --brand-accent-hover: #4338ca;
    --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    --brand-gradient-hover: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);

    /* Subject Colors */
    --sub-color-0: #4f46e5;
    --sub-color-1: #059669;
    --sub-color-2: #d97706;
    --sub-color-3: #db2777;
    --sub-color-4: #2563eb;
    --sub-color-5: #7c3aed;
    --sub-color-6: #0d9488;
    --sub-color-7: #ea580c;

    --seat-bg: #ffffff;
    --seat-border: #cbd5e1;
    --seat-empty-bg: #f8fafc;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.12);
}

body.dark-theme {
    /* Executive Dark Theme Palette */
    --bg-primary: #090d16;
    --bg-secondary: #131c31;
    --bg-card: #131c31;
    --bg-card-hover: #1e2945;
    --border-color: #2e3e64;
    --border-subtle: #243252;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --seat-bg: #0d1527;
    --seat-border: #2c3c5e;
    --seat-empty-bg: rgba(255, 255, 255, 0.02);
    --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.45;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 1.25rem;
}

/* ==========================================================================
   OFFICIAL HEADER & BRANDING
   ========================================================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 0.95rem 1.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 4px 8px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand h1 {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.official-badge {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.25);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.dark-theme .official-badge {
    background-color: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   BUTTONS & VERSION BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: var(--brand-gradient-hover);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-color: rgba(79, 70, 229, 0.25);
}

body.dark-theme .btn-secondary {
    background-color: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(79, 70, 229, 0.18);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

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

.btn-accent {
    background-color: #059669;
    color: #ffffff;
}

.btn-accent:hover {
    background-color: #047857;
}

.btn-small {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-version-free {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 1px solid #059669;
    border-radius: 20px;
    padding: 0.48rem 1.05rem;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), 0 0 0 3px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease-in-out;
    cursor: default;
}

.btn-version-free.active {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45), 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.btn-version-free:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5), 0 0 0 3.5px rgba(16, 185, 129, 0.35);
}

.btn-version-premium {
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    padding: 0.48rem 1.05rem;
    font-size: 0.8rem;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

body.dark-theme .btn-version-premium {
    background: rgba(167, 139, 250, 0.12);
    color: #c084fc;
    border-color: rgba(167, 139, 250, 0.35);
}

.btn-version-premium:hover {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

/* ==========================================================================
   VERSION ARROW BRIDGE (BASIC -> ADVANCED VERSION POINTER)
   ========================================================================== */
.version-arrow-bridge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    user-select: none;
}

.bridge-line {
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, #10b981 0%, #7c3aed 100%);
    border-radius: 2px;
    opacity: 0.8;
}

.bridge-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #7c3aed;
    background-color: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.25);
    padding: 0.22rem 0.65rem;
    border-radius: 12px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
    white-space: nowrap;
}

body.dark-theme .bridge-label {
    color: #c084fc;
    background-color: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.3);
}

.floating-arrow {
    font-size: 0.75rem;
    display: inline-block;
    color: #7c3aed;
    animation: floatArrowRight 1.3s ease-in-out infinite;
}

body.dark-theme .floating-arrow {
    color: #c084fc;
}

@keyframes floatArrowRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.8;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

@media (max-width: 850px) {
    .version-arrow-bridge {
        display: none;
    }
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--bg-card-hover);
}

/* ==========================================================================
   MAIN LAYOUT & CARDS
   ========================================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.015);
}

.card-header h2 {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.card-body {
    padding: 1.1rem;
}

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.input-item-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
}

.input-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.input-item-title {
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.btn-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    border-radius: 4px;
}

.btn-remove:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 0.45rem 0.65rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.82rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 52px;
}

/* ==========================================================================
   GRID CONTROLS & STATS TOOLBAR
   ========================================================================== */
.matrix-toolbar-card {
    padding: 1.1rem;
    margin-bottom: 1.25rem;
}

.grid-actions-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding-bottom: 0.95rem;
    margin-bottom: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

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

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.inline-select {
    width: auto;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
}

.search-box-wrapper {
    position: relative;
    min-width: 240px;
}

.search-box-wrapper input {
    padding-left: 2.1rem;
    padding-right: 1.8rem;
}

.search-icon {
    position: absolute;
    left: 0.7rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.btn-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.stat-pill {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

body.dark-theme .stat-icon {
    background-color: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.stat-pill .label {
    color: var(--text-muted);
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
}

.stat-pill .value {
    font-weight: 800;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.stat-pill.success .stat-icon {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-pill.warning .stat-icon {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.stat-pill.success .value {
    color: #059669;
}

body.dark-theme .stat-pill.success .value {
    color: #10b981;
}

.stat-pill.warning .value {
    color: #dc2626;
}

body.dark-theme .stat-pill.warning .value {
    color: #f87171;
}

.subject-legend-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
}

.sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ==========================================================================
   OFFICIAL MATRIX GRID DISPLAY (A1, B1, C1...)
   ========================================================================== */
.matrix-display-card {
    min-height: 500px;
}

.matrix-wrapper {
    padding: 1.2rem;
    overflow-x: auto;
}

.hall-matrix-container {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.hall-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-sm);
}

.hall-header-banner h3 {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-screen-indicator {
    background-color: var(--bg-primary);
    border: 1px dashed var(--border-color);
    text-align: center;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    text-transform: uppercase;
}

/* Grid Table Layout */
.official-grid-table {
    display: grid;
    gap: 0.7rem;
    justify-content: center;
}

.official-seat-card {
    background-color: var(--seat-bg);
    border: 1.5px solid var(--seat-border);
    border-radius: 8px;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    min-width: 125px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.official-seat-card:hover {
    border-color: #4f46e5;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

.seat-code {
    font-size: 0.78rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    background-color: #1e293b;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

body.light-theme .seat-code {
    background-color: #334155;
    color: #ffffff;
}

.seat-sub-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ffffff;
}

.seat-sub-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    margin-top: 2px;
}

.seat-reg-no {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-main);
    text-align: center;
    margin-top: 0.15rem;
}

.official-seat-card.empty {
    background-color: var(--seat-empty-bg);
    border-style: dashed;
    justify-content: center;
    align-items: center;
    min-height: 68px;
}

.empty-seat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.official-seat-card.search-match {
    border-color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.15) !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 4.5rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3.2rem;
    margin-bottom: 0.9rem;
    opacity: 0.35;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

/* ==========================================================================
   MODAL & DIALOGS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.015);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 1.4rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

.premium-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.premium-features-list li {
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    line-height: 1.45;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.text-warning { color: #f59e0b; }
.text-success { color: #10b981; }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toast-success i { color: #10b981; }
.toast-warning i { color: #f59e0b; }
.toast-info i { color: #3b82f6; }

.print-only {
    display: none;
}

/* ==========================================================================
   PRINT & PDF LAYOUT STYLING (Seating Chart & Attendance PDF Modes)
   ========================================================================== */
@media print {
    @page {
        size: auto;
        margin: 10mm 12mm;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11px !important;
        font-family: Arial, sans-serif !important;
    }

    .app-header, .sidebar-inputs, .matrix-toolbar-card, .btn, .btn-icon, .toast-container, .modal-overlay {
        display: none !important;
    }

    .main-layout {
        display: block !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        margin-bottom: 0 !important;
    }

    .print-only {
        display: block !important;
    }

    /* TYPE 1: SEATING CHART PDF PRINT MODE */
    body:not(.print-attendance-mode) #printableAttendanceContainer {
        display: none !important;
    }

    body:not(.print-attendance-mode) .print-official-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;
        text-align: left;
        margin-bottom: 1.2rem;
        border-bottom: 2px solid #000000;
        padding-bottom: 0.6rem;
    }

    body:not(.print-attendance-mode) .print-official-header h2 {
        font-size: 1.4rem;
        text-transform: uppercase;
        font-weight: 800;
        letter-spacing: -0.01em;
    }

    body:not(.print-attendance-mode) .print-official-header p {
        font-size: 0.88rem;
        font-weight: 600;
        color: #333333;
    }

    body:not(.print-attendance-mode) .hall-view-block {
        page-break-after: always;
        margin-bottom: 1.5rem;
    }

    body:not(.print-attendance-mode) .hall-header-banner {
        background: #f1f5f9 !important;
        border: 1.5px solid #000000 !important;
        color: #000000 !important;
        padding: 0.5rem 0.8rem !important;
        margin-bottom: 0.6rem !important;
    }

    body:not(.print-attendance-mode) .board-screen-indicator {
        border: 1px dashed #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0.35rem !important;
        margin-bottom: 0.8rem !important;
    }

    body:not(.print-attendance-mode) .official-grid-table {
        gap: 0.5rem !important;
    }

    body:not(.print-attendance-mode) .official-seat-card {
        border: 1.5px solid #000000 !important;
        color: #000000 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        padding: 0.45rem !important;
    }

    body:not(.print-attendance-mode) .seat-code {
        border: 1px solid #000000 !important;
        color: #000000 !important;
        background: #e2e8f0 !important;
        font-weight: 800 !important;
    }

    body:not(.print-attendance-mode) .seat-sub-tag {
        border: 1px solid #000000 !important;
        color: #ffffff !important;
        font-weight: 800 !important;
    }

    body:not(.print-attendance-mode) .seat-sub-name {
        color: #000000 !important;
        font-weight: 700 !important;
    }

    body:not(.print-attendance-mode) .seat-reg-no {
        color: #000000 !important;
        font-weight: 800 !important;
    }

    .print-logo, .att-logo {
        height: 54px;
        width: auto;
        object-fit: contain;
    }

    /* TYPE 2: ATTENDANCE SHEET PDF PRINT MODE */
    body.print-attendance-mode .matrix-display-card,
    body.print-attendance-mode #printHeaderTemplate {
        display: none !important;
    }

    .attendance-sheet-page {
        page-break-after: always;
        padding: 0.5rem;
    }

    .att-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;
        text-align: left;
        border-bottom: 2px solid #000000;
        padding-bottom: 0.6rem;
        margin-bottom: 1rem;
    }

    .att-header h2 {
        font-size: 1.45rem;
        text-transform: uppercase;
        font-weight: 800;
        letter-spacing: -0.01em;
    }

    .att-header p {
        font-size: 0.88rem;
        font-weight: 700;
        color: #333333;
    }

    .att-meta-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.5rem;
        border: 1.5px solid #000000;
        padding: 0.55rem 0.85rem;
        margin-bottom: 1rem;
        font-size: 0.88rem;
    }

    .att-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1.8rem;
    }

    .att-table th, .att-table td {
        border: 1px solid #000000;
        padding: 0.5rem;
        text-align: center;
        font-size: 0.85rem;
    }

    .att-table th {
        background-color: #f1f5f9 !important;
        font-weight: 800;
        text-transform: uppercase;
    }

    .signature-space {
        height: 34px;
    }

    .att-footer {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-top: 2rem;
        padding-top: 0.8rem;
        font-size: 0.88rem;
        font-weight: 700;
    }

    .sig-line {
        border-top: 1px solid #000000;
        width: 210px;
        text-align: center;
        padding-top: 0.35rem;
    }
}

/* ==========================================================================
   PRICING & PACKAGE MODAL STYLES
   ========================================================================== */
.btn-version-pricing {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease;
}

.btn-version-pricing:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
    background: linear-gradient(135deg, #0f766e 0%, #047857 100%);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    animation: modalFadeIn 0.25s ease-out;
}

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

.pricing-modal-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pricing-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.75rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    border-radius: 50px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.pricing-modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0 0 0.35rem 0;
}

.pricing-modal-header .modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.modal-close-btn {
    background: rgba(100, 116, 139, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main, #0f172a);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

.pricing-modal-body {
    padding: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.pricing-card {
    background: var(--bg-card, #ffffff);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12);
}

.pricing-card.featured {
    border-color: #4f46e5;
    box-shadow: 0 10px 30px -5px rgba(79, 70, 229, 0.22);
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.03) 0%, var(--bg-card, #ffffff) 100%);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.3rem 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
    white-space: nowrap;
}

.pricing-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
}

.pill-free {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.pill-paid {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.pricing-price .currency {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
}

.pricing-price .amount {
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main, #0f172a);
    font-family: 'Outfit', sans-serif;
}

.pricing-price .period {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
    margin-left: 0.3rem;
}

.pricing-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 1.5rem;
    line-height: 1.45;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--text-main, #1e293b);
}

.feature-icon {
    font-size: 1.05rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.icon-success {
    color: #10b981;
}

.icon-disabled {
    color: #94a3b8;
}

.feature-item.disabled span {
    color: #94a3b8;
    text-decoration: line-through;
    opacity: 0.75;
}

.pricing-card-footer {
    margin-top: auto;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 12px;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #4f46e5;
    color: #4f46e5;
}

.btn-outline-primary:hover {
    background: #4f46e5;
    color: #ffffff;
}

/* Dark mode pricing adjustments */
body.dark-theme .pricing-modal-card {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-theme .pricing-modal-header {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-theme .pricing-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .pricing-card.featured {
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.12) 0%, #1e293b 100%);
    border-color: #6366f1;
}

body.dark-theme .feature-item {
    color: #e2e8f0;
}

body.dark-theme .feature-item.disabled span {
    color: #64748b;
}
