:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f43f5e;
    --success: #10b981;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
    --bg: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.7);
    --text: #1e293b;
    --text-muted: #64748b;
    --glass-border: rgba(0, 0, 0, 0.05);
}

body.light-theme .nav-pill:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme input {
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .logout-btn:hover {
    background: rgba(239, 68, 68, 0.05);
}


/* Shell & Layout */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 1rem auto;
    width: calc(100% - 2rem);
    max-width: 1400px;
    padding: 0 !important;
    border-radius: 20px !important;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

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

/* Brand Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.brand-title {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1;
}

.brand-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.85rem;
}

.nav-pill:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.nav-pill svg {
    transition: stroke 0.3s ease;
}

.nav-pill.active svg {
    stroke: #000;
}

/* User Action Area */
.user-action-area {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
    justify-content: flex-end;
}

.user-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.user-greeting {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.user-badge-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2px;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.user-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-superadmin {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-admin {
    background: rgba(79, 172, 254, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    transition: all 0.2s ease;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #f87171;
    transform: scale(1.05);
}

/* Feedback & Alerts */
.feedback-container {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(244, 63, 94, 0.08);
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.2);
}

/* Responsiveness */
/* Media Queries - Ordered by size */
@media (max-width: 1100px) {
    .nav-pill span {
        display: none;
    }
    .nav-pill {
        padding: 0.6rem;
    }
}

@media (max-width: 850px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .brand-section, .user-action-area {
        justify-content: center;
        text-align: center;
        flex: none;
        width: 100%;
    }

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

    .user-badge-container {
        justify-content: center;
    }

    .main-nav {
        width: 100%;
        justify-content: space-around;
        overflow-x: auto;
    }

    .nav-pill span {
        display: inline;
        font-size: 0.7rem;
    }
    
    .brand-tagline {
        display: none;
    }
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .glass-card { padding: 1.25rem; }
    
    /* Table Mobile View - Stacked */
    table, thead, tbody, th, td, tr, .entry-row {
        display: block;
        width: 100% !important;
    }

    #batch-entry-table thead {
        display: none;
    }

    #batch-entry-table .entry-row {
        margin-bottom: 1rem;
        background: rgba(255,255,255,0.03);
        padding: 0.8rem;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.05);
    }

    #batch-entry-table td {
        padding: 0.4rem 0 !important;
        width: 100% !important;
        display: block !important;
        border: none !important;
    }

    #batch-entry-table td:before {
        display: block;
        font-size: 0.65rem;
        color: var(--text-muted);
        margin-bottom: 0.2rem;
        content: attr(data-label);
        font-weight: 600;
        text-align: right;
    }

    #batch-entry-table td:last-child:before {
        display: none;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        padding: 1rem;
        background: rgba(255,255,255,0.02);
    }

    td {
        border: none;
        padding: 0.75rem 0.5rem !important;
        position: relative;
        text-align: left;
        min-height: 2.5rem;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.03) !important;
    }

    td:before {
        display: inline-block;
        font-weight: 800;
        color: var(--primary);
        content: attr(data-label);
        text-align: right;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        padding-right: 0;
        text-align: center;
    }
    
    td:last-child:before {
        display: none;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    #sender-float-bar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
        bottom: 1rem;
        border-radius: 16px;
        text-align: center;
    }
    #sender-float-bar > div {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .nav-pill span {
        display: none;
    }
    .nav-pill {
        padding: 0.8rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
    background-image: 
        radial-gradient(at 0% 0%, hsla(210, 40%, 98%, 1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(210, 40%, 90%, 1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(210, 40%, 95%, 1) 0, transparent 50%);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

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

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

th {
    text-align: right;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--glass-border);
}

td {
    text-align: right;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background: rgba(234, 179, 8, 0.1); color: #eab308; }
.status-accepted { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-rejected { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.status-checked_in { background: #6366f1; color: white; }

/* QR Code Section */
#qrcode {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    display: inline-block;
    margin-top: 1rem;
}

.qr-container {
    text-align: center;
    margin-top: 2rem;
}

/* Mobile adjustments */


@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

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

#sender-float-bar {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e1e1e, #111);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 24px;
    padding: 0.8rem 1.5rem;
    z-index: 10000;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(15px);
    width: auto;
    max-width: 95vw;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}



 / *   U t i l i t y   C l a s s e s   * / 
 . h i d d e n - m o b i l e   { 
         d i s p l a y :   i n l i n e - f l e x ; 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . h i d d e n - m o b i l e   { 
                 d i s p l a y :   n o n e   ! i m p o r t a n t ; 
         } 
 } 
  
 