@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #c75b12;
    --primary-dark: #9f450a;
    --secondary: #172033;
    --bg: #f5f6fa;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.app-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: 0.45s ease;
}

.app-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.food-truck-loader {
    text-align: center;
}

.truck {
    width: 150px;
    height: 72px;
    background: var(--primary);
    border-radius: 18px 22px 14px 14px;
    position: relative;
    margin: 0 auto 18px;
    box-shadow: var(--shadow);
    animation: truckBounce 1.1s ease-in-out infinite alternate;
}

.truck::before {
    content: "";
    position: absolute;
    right: -35px;
    bottom: 0;
    width: 45px;
    height: 48px;
    background: var(--primary-dark);
    border-radius: 8px 16px 12px 0;
}

.truck-window {
    position: absolute;
    right: -22px;
    top: 9px;
    width: 22px;
    height: 18px;
    background: #e0f2fe;
    border-radius: 5px;
}

.truck-line {
    position: absolute;
    left: 16px;
    top: 18px;
    width: 72px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 999px;
}

.wheel {
    position: absolute;
    bottom: -12px;
    width: 27px;
    height: 27px;
    background: #111827;
    border-radius: 50%;
    border: 5px solid #f9fafb;
    animation: wheelSpin 0.6s linear infinite;
}

.wheel.one {
    left: 22px;
}

.wheel.two {
    right: -20px;
}

.road {
    width: 215px;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        #9ca3af 0 25px,
        transparent 25px 42px
    );
    border-radius: 999px;
    margin: 0 auto 16px;
    animation: roadMove 0.8s linear infinite;
}

.food-truck-loader p {
    color: var(--secondary);
    font-weight: 800;
}

@keyframes truckBounce {
    from {
        transform: translateY(0) translateX(-5px);
    }

    to {
        transform: translateY(-5px) translateX(5px);
    }
}

@keyframes wheelSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes roadMove {
    to {
        background-position-x: -42px;
    }
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.auth-left {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 35%),
        linear-gradient(135deg, rgba(199,91,18,0.95), rgba(23,32,51,0.97)),
        url("https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.auth-left::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -80px;
    bottom: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    animation: floatBlob 6s ease-in-out infinite alternate;
}

@keyframes floatBlob {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-25px) scale(1.06);
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 900;
    position: relative;
    z-index: 2;
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: grid;
    place-items: center;
    backdrop-filter: blur(12px);
}

.auth-hero {
    position: relative;
    z-index: 2;
    animation: slideIn 0.8s ease both;
}

.auth-hero h1 {
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.02;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
}

.auth-hero p {
    max-width: 610px;
    color: rgba(255,255,255,0.88);
    font-size: 18px;
    line-height: 1.7;
}

.auth-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.auth-footer {
    position: relative;
    z-index: 2;
    color: rgba(255,255,255,0.8);
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 465px;
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.floating-card {
    animation: floatCard 4s ease-in-out infinite alternate;
}

@keyframes floatCard {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card h2 {
    font-size: 31px;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.subtitle,
.muted-text {
    color: var(--muted);
    line-height: 1.6;
}

.subtitle {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.input-icon input,
.input-icon select,
.input-icon textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #f9fafb;
    border-radius: 15px;
    padding: 14px 14px 14px 43px;
    outline: none;
    font-size: 15px;
    transition: 0.25s ease;
}

.input-icon textarea {
    min-height: 120px;
    resize: vertical;
}

.input-icon input:focus,
.input-icon select:focus,
.input-icon textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(199,91,18,0.12);
}

.btn {
    border: 0;
    padding: 13px 18px;
    border-radius: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-dark {
    background: var(--secondary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-light {
    background: #f3f4f6;
    color: var(--text);
}

.btn-full {
    width: 100%;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    font-size: 14px;
}

.auth-links a {
    color: var(--primary);
    font-weight: 800;
}

.demo-box {
    margin-top: 18px;
    padding: 14px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    border-radius: 15px;
    display: grid;
    gap: 4px;
    font-size: 13px;
}

.demo-box span {
    color: var(--muted);
}

.alert {
    padding: 14px 16px;
    border-radius: 15px;
    margin-bottom: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #111827;
    color: white;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .brand {
    margin-bottom: 34px;
}

.nav-menu {
    display: grid;
    gap: 8px;
}

.nav-link {
    padding: 13px 14px;
    border-radius: 15px;
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.22s ease;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.11);
    color: white;
    transform: translateX(4px);
}

.main {
    padding: 26px;
}

.topbar {
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 24px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.glass-motion {
    animation: slideIn 0.6s ease both;
}

.topbar h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
}

.topbar p {
    color: var(--muted);
    margin-top: 4px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.avatar,
.avatar-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-letter {
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.animate-grid .card,
.slide-up {
    animation: slideIn 0.65s ease both;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.bg-orange {
    background: #ffedd5;
    color: #c2410c;
}

.bg-green {
    background: #dcfce7;
    color: #15803d;
}

.bg-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.bg-red {
    background: #fee2e2;
    color: #b91c1c;
}

.stat-card h3 {
    font-size: 27px;
    letter-spacing: -0.03em;
}

.stat-card p {
    color: var(--muted);
    margin-top: 3px;
    font-size: 14px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title h2 {
    font-size: 20px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: capitalize;
    display: inline-flex;
}

.status.present,
.status.active,
.status.resolved {
    background: #dcfce7;
    color: #15803d;
}

.status.absent,
.status.inactive,
.status.open {
    background: #fee2e2;
    color: #b91c1c;
}

.status.late,
.status.called_off,
.status.in_progress {
    background: #fef3c7;
    color: #b45309;
}

.schedule-list {
    display: grid;
    gap: 12px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid var(--border);
}

.schedule-item span {
    color: var(--muted);
    font-size: 14px;
}

.form-card {
    display: grid;
    gap: 2px;
}

.ticket-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 12px;
    background: #f9fafb;
}

.ticket-item p {
    color: var(--muted);
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}

.empty-state i {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary);
}

.mobile-toggle {
    display: none;
}

.kiosk-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(199,91,18,0.14), transparent 30%),
        linear-gradient(135deg, #fff7ed, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.kiosk-card {
    width: 100%;
    max-width: 760px;
    background: white;
    border-radius: 34px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 34px;
    text-align: center;
}

.kiosk-logo {
    justify-content: center;
    color: var(--secondary);
    margin-bottom: 22px;
}

.kiosk-brand-icon {
    background: #fff7ed;
    color: var(--primary);
}

.live-clock {
    font-size: clamp(42px, 8vw, 84px);
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.05em;
}

.live-date {
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 28px;
}

.kiosk-input {
    max-width: 430px;
    margin: 0 auto 20px;
    text-align: left;
}

.kiosk-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.kiosk-actions .btn {
    min-width: 190px;
    padding: 16px 20px;
    font-size: 16px;
}

.kiosk-note {
    color: var(--muted);
    margin: 24px 0;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-left {
        min-height: 430px;
    }
}

@media (max-width: 840px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -292px;
        top: 0;
        width: 280px;
        z-index: 1000;
        transition: 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .main {
        padding: 18px;
    }

    .user-pill {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-left {
        padding: 30px;
    }

    .auth-right {
        padding: 20px;
    }

    .auth-card {
        padding: 24px;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-links {
        flex-direction: column;
    }

    .kiosk-card {
        padding: 24px;
    }

    .kiosk-actions .btn {
        width: 100%;
    }
}
/* Real Time Table */

.real-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.real-timetable {
    min-width: 1100px;
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.real-timetable th {
    background: #111827;
    color: white;
    text-align: center;
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,0.12);
    vertical-align: top;
}

.real-timetable th strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.real-timetable th span {
    display: block;
    font-size: 12px;
    color: #d1d5db;
}

.real-timetable th.today-head {
    background: var(--primary);
}

.real-timetable td {
    width: 14.28%;
    min-width: 155px;
    vertical-align: top;
    padding: 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.real-timetable td.today-cell {
    background: #fff7ed;
}

.table-shift {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 14px;
    padding: 12px;
    min-height: 105px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.table-shift-name {
    font-weight: 900;
    margin-bottom: 4px;
    color: var(--text);
}

.table-shift-code {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 700;
}

.table-shift-time {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.5;
}

.table-shift-note {
    margin-top: 8px;
    padding: 7px 8px;
    border-radius: 10px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    border: 1px solid var(--border);
}

.empty-table-cell {
    color: #cbd5e1;
    text-align: center;
    font-weight: 900;
    padding: 24px 0;
}

.my-table-shift {
    background: #ecfdf5;
    border-left-color: #16a34a;
    border-color: #86efac;
}

.status.paid {
    background: #dcfce7;
    color: #15803d;
    gap: 6px;
}

.status.unpaid {
    background: #fee2e2;
    color: #b91c1c;
    gap: 6px;
}

button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 900px) {
    .real-timetable {
        min-width: 980px;
    }

    .real-timetable td {
        min-width: 140px;
    }
}