/* gpmgcm-canteen-main/public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-hue: 0;
    --primary: #7b0707;
    --primary-light: #b33939;
    --primary-dark: #4b0000;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 16px;
    --transition-speed: 0.3s;
    /* Force light color scheme — prevents OS dark mode from inverting QR ticket backgrounds */
    color-scheme: light;
}

/* === DARK MODE OVERRIDE ===
   Force all critical UI elements to light colors even if the user's OS is in dark mode.
   This is intentional: the QR ticket MUST have a white background to be scannable. */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }

    body {
        background: var(--light-gray) !important;
        color: var(--dark) !important;
    }

    .ticket-card,
    .ticket-main,
    .ticket-qr,
    .meal-card,
    .stats-card,
    .scanner-stat,
    .scanner-box,
    .profile-card,
    .login-form,
    .modal-content,
    .confirmation-content,
    .validation-content,
    .agreement-content,
    .skeleton-card,
    .bottom-nav {
        background: var(--white) !important;
        color: var(--dark) !important;
    }

    input,
    textarea {
        background: var(--white) !important;
        color: var(--dark) !important;
        border-color: #e5e7eb !important;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light-gray);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 450px;
        margin: 2rem auto;
        border-radius: 24px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        min-height: calc(100vh - 4rem);
    }
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
}

.app-logo {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary);
    box-shadow: var(--card-shadow);
    margin: 0 auto 20px;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
}

.app-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.login-form {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(var(--primary-hue), 70%, 50%, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

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

/* Dashboard */
.dashboard {
    min-height: 100vh;
    background: var(--light-gray);
    padding-bottom: 80px;
    /* Space for bottom nav */
}

.header {
    background: var(--primary);
    padding: 20px 20px 30px 20px;
    color: var(--white);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.user-info .welcome-text {
    font-size: 14px;
    opacity: 0.8;
}

.user-info .user-name {
    font-size: 24px;
    font-weight: 700;
    margin: 2px 0;
}

.user-info .user-dept {
    font-size: 14px;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    padding: 20px;
    margin-top: -20px;
    /* Pull content up slightly */
}

/* Stats Card */
.stats-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Meal Cards */
.meal-section {
    display: grid;
    gap: 15px;
}

.meal-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.meal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.meal-title {
    font-size: 18px;
    font-weight: 600;
}

.meal-date {
    font-size: 14px;
    color: var(--gray);
}

.meal-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-booked {
    background: hsl(var(--primary-hue), 80%, 90%);
    color: var(--primary-dark);
}

.status-available {
    background: #d1fae5;
    color: #065f46;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.status-consumed {
    background: #e5e7eb;
    color: var(--gray);
}

.meal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* =================================== */
/* === REALISTIC TICKET STYLES === */
/* =================================== */

.ticket-container {
    padding: 20px 0 0;
    /* Add 20px padding to the top */
}

.ticket-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    position: relative;
    height: 480px;
    /* Fixed height for a consistent ticket shape */
    margin: 0 auto;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 30px;
    background: var(--light-gray);
    border-radius: 50%;
    left: 115px;
    /* Position based on stub width */
    transform: translate(-50%, -50%);
    border: 1px solid #e5e7eb;
}

.ticket-stub {
    width: 130px;
    background: var(--primary);
    color: var(--white);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    position: relative;
    border-right: 2px dashed rgba(255, 255, 255, 0.3);
}

.stub-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.stub-header .logo {
    font-size: 18px;
}

.stub-header .college-name {
    font-weight: 700;
    font-size: 20px;
}

.stub-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stub-item {
    display: flex;
    flex-direction: column;
}

.stub-item span {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stub-item strong {
    font-size: 14px;
    font-weight: 600;
}

.stub-footer {
    font-size: 12px;
    opacity: 0.7;
    font-family: monospace;
}

.ticket-main {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.main-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-header p {
    font-size: 14px;
    color: var(--gray);
}

.ticket-qr {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    width: 200px;
    /* Fixed width */
    height: 200px;
    /* Fixed height */
    border: 1px solid var(--light-gray);
    position: relative;
}

.ticket-qr.validated::after {
    content: "VALIDATED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 36px;
    font-weight: 800;
    color: rgba(239, 68, 68, 0.4);
    border: 4px solid rgba(239, 68, 68, 0.4);
    padding: 10px 20px;
    border-radius: 10px;
    z-index: 10;
}

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

.ticket-actions .btn {
    width: auto;
    padding: 12px 20px;
}

.ticket-program {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    color: var(--gray);
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =================================== */
/* === END OF TICKET STYLES === */
/* =================================== */


/* History Page */
.history-container {
    padding: 0;
}

.history-container h3 {
    margin: 0 20px 20px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-gray);
}

.history-item:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.history-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.history-date {
    font-weight: 600;
}

.history-time {
    font-size: 12px;
    color: var(--gray);
}

.history-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Profile Page */
.profile-container {
    padding: 0;
}

.profile-container>h3 {
    margin: 0 20px 20px;
}

.profile-card h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

.profile-card {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 15px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
}

.profile-info {
    font-size: 14px;
    color: var(--gray);
}

.profile-details {
    list-style: none;
    padding: 0;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.profile-label {
    color: var(--gray);
}

.profile-value {
    font-weight: 500;
}

/* Canteen Scanner Styles */
#canteenHome.main-content {
    margin-top: 0;
    padding: 0 20px 20px;
}

.scanner-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: -30px;
    /* Overlap with header */
    position: relative;
    z-index: 2;
}

.scanner-stat {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.scanner-box {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0 0;
    box-shadow: var(--card-shadow);
}

.scanner-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

#qr-reader {
    border-radius: 8px;
    overflow: hidden;
}

/* Validation Result Overlay */
.validation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.validation-overlay.show {
    display: flex;
}

.validation-content {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    width: 90%;
    max-width: 320px;
    transform: scale(0.9);
    animation: popIn 0.3s ease forwards;
}

.validation-content button {
    margin-top: 30px;
    width: 100%;
}

.validation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.validation-success .validation-icon {
    background: #d1fae5;
    color: var(--success);
}

.validation-error .validation-icon {
    background: #fee2e2;
    color: var(--danger);
}

.validation-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.validation-message {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 450px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 24px 24px;
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
    }
}

.nav-item {
    flex: 1;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 20px;
}

/* New Content Styles */
.version-display {
    text-align: center;
    padding: 15px;
    font-size: 12px;
    color: var(--gray);
    opacity: 0.8;
}

.login-screen .version-display {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
}

.deadline-hint {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    margin-top: 8px;
    display: block;
    width: 100%;
}

.rules-list {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.rules-list li {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 10px;
    line-height: 1.4;
}

.rules-list strong {
    color: var(--primary);
}

.policy-footer {
    border-top: 1px dashed var(--gray);
    margin-top: 10px;
    padding-top: 10px;
}

.policy-text {
    font-size: 9px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.85);
    text-align: left;
}

.agreement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.agreement-content {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    animation: popIn 0.3s ease forwards;
}

.agreement-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agreement-title i {
    color: var(--primary);
}

#agreementConfirmBtn {
    width: 100%;
}

#agreementCloseBtn {
    width: 100%;
    margin-top: 10px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Utils & Modals */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--dark);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 0.5s forwards, fadeOut 0.5s 2.5s forwards;
}

.toast.success {
    background-color: var(--success);
}

.toast.error {
    background-color: var(--danger);
}

.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.confirmation-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.confirmation-content h3 {
    margin-bottom: 15px;
}

.confirmation-content p {
    margin-bottom: 25px;
    color: var(--gray);
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.skeleton-container {
    padding: 20px;
    margin-top: -20px;
}

.skeleton {
    background-color: #e0e0e0;
    border-radius: var(--border-radius);
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.stats-card.skeleton {
    height: 90px;
    margin-bottom: 20px;
}

.meal-card.skeleton {
    height: 120px;
    margin-bottom: 15px;
}

.scanner-stat.skeleton {
    height: 80px;
}


.notification-bar {
    background-color: var(--success);
    color: var(--white);
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    50% {
        opacity: .5;
    }
}
/* --- NEW FEATURES SYNCED FROM ANDROID --- */

/* Guidelines Modal */
.guidelines-title {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.guidelines-list {
    text-align: left;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guideline-item {
    display: flex;
    gap: 10px;
}

.guideline-item i {
    color: var(--primary);
    margin-top: 3px;
    font-size: 14px;
}

.guideline-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark);
}

/* Contextual Hints */
.deadline-hint {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

/* Ticket Footer */
.ticket-policy-footer {
    border-top: 1px dashed var(--light-gray);
    padding-top: 15px;
    margin-top: 15px;
}

.policy-text {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 5px;
    font-weight: 600;
}

.policy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-list li {
    font-size: 8px;
    color: var(--gray);
    line-height: 1.3;
    margin-bottom: 2px;
}

/* Profile Rules Section */
.profile-section-title {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0 10px;
}

.programme-info-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: background-color 0.2s;
}

.programme-info-card:hover {
    background-color: #f9fafb;
}

.programme-info-content h4 {
    margin: 0;
    font-size: 15px;
    color: var(--dark);
}

.programme-info-content p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--gray);
}

/* Version Footer */
.version-footer {
    text-align: center;
    padding: 20px 10px 40px;
    color: var(--gray);
    font-size: 12px;
}


.version-footer.login-footer {
    padding: 20px 0 0;
}

/* =================================== */
/* === SKELETON LOADING STATES ======= */
/* =================================== */

@keyframes skeleton-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    display: block;
}

/* Skeleton for header user info */
.skeleton-name {
    height: 26px;
    width: 55%;
    margin: 4px 0;
}

.skeleton-dept {
    height: 14px;
    width: 38%;
    margin-top: 6px;
}

/* Skeleton for stat numbers */
.skeleton-stat-value {
    height: 28px;
    width: 40px;
    margin: 0 auto 6px;
}

.skeleton-stat-label {
    height: 11px;
    width: 55px;
    margin: 0 auto;
}

/* Skeleton meal / booking cards */
.skeleton-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.skeleton-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.skeleton-title {
    height: 20px;
    width: 40%;
}

.skeleton-badge {
    height: 26px;
    width: 80px;
    border-radius: 20px;
}

.skeleton-line {
    height: 14px;
    width: 100%;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.xshort {
    width: 35%;
}

.skeleton-btn {
    height: 42px;
    width: 120px;
    border-radius: 8px;
    margin-top: 16px;
}

/* Skeleton for QR ticket area */
.skeleton-qr-box {
    height: 200px;
    width: 200px;
    border-radius: var(--border-radius);
    margin: 16px auto;
}

/* Hide real content while skeleton is showing */
.is-loading > *:not(.skeleton-wrapper) {
    display: none !important;
}

.skeleton-wrapper {
    display: block;
}

/* Once loaded, hide skeleton wrapper */
.skeleton-wrapper.hidden {
    display: none !important;
}

/* =================================== */
/* === END OF SKELETON STYLES ======== */
/* =================================== */
