@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #F9D406;
    --primary-hover: #ffe165;
    --secondary-color: #334155;
    --accent-color: #ffb4ab;
    --bg-dark: #0F172A;
    --bg-panel: rgba(30, 41, 59, 0.8);
    --text-main: #dae2fd;
    --text-muted: #cfc6ab;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2rem;
}

/* Header */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: #0F172A;
    text-decoration: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.4);
}
.btn-danger:hover {
    box-shadow: 0 10px 15px -3px rgba(225, 29, 72, 0.5);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}
select.form-control option {
    background: #1e293b;
    color: var(--text-main);
}

/* Totem Specific */
.totem-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.totem-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}
.btn-queue {
    padding: 2rem;
    font-size: 1.5rem;
    border-radius: 20px;
    margin: 1rem;
    min-width: 250px;
}
.ticket-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.ticket-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.ticket-content {
    background: white;
    color: #0f172a;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.ticket-number {
    font-size: 4rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--primary-color);
}

/* TV Specific */
.tv-container {
    flex: 1;
    display: flex;
    padding: 2rem;
    gap: 2rem;
}
.tv-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.tv-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.tv-current-ticket {
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}
.tv-current-desk {
    font-size: 3rem;
    color: var(--secondary-color);
}
.tv-history-item {
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
}

/* Attendant & Admin Specific */
.dashboard-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}
.ticket-list {
    list-style: none;
    margin-top: 1rem;
}
.ticket-list li {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ticket-list li:last-child {
    border-bottom: none;
}
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge.priority { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }
.badge.normal { background: rgba(14, 165, 233, 0.2); color: #0ea5e9; }

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.blinking {
    animation: blink 1s ease-in-out 3;
}

/* Responsiveness for Android Tablets & Touch Devices */
@media (max-width: 1024px) {
    .btn-queue {
        width: 100%;
        min-width: unset;
        margin: 0.5rem 0;
        padding: 2.5rem;
        font-size: 1.8rem;
    }
    .totem-title {
        font-size: 2.5rem;
    }
    .tv-container {
        flex-direction: column;
    }
    .tv-sidebar {
        flex-direction: row;
        overflow-x: auto;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .ticket-content {
        padding: 2rem;
    }
    .ticket-number {
        font-size: 3.5rem;
    }
}

/* Footer Global */
.app-footer {
    width: 100%;
    margin-top: auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.app-footer a {
    color: var(--primary-color, #F9D406);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.app-footer a:hover {
    text-decoration: underline;
    color: var(--primary-hover, #ffe165);
}

