:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

/* Mobile / Enrollment */
.mobile-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

input,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 50%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Ticket Page */
.success-bg {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.ticket-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--warning);
}

.ticket-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 1.5rem 0;
    border-top: 2px dashed #cbd5e1;
}

.btn-secondary {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 600;
}

/* Queue Display (Dark Mode) */
.queue-body {
    background: #0f172a;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.queue-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    height: 100%;
}

.main-display {
    padding: 3rem;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.main-display h2 {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.serving-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.serving-card {
    background: #1e293b;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #3b82f6;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }

    to {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

.serving-card .ticket {
    font-size: 5rem;
    font-weight: 800;
    color: white;
}

.serving-card .service {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.serving-card .counter {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    border-radius: 50px;
    font-weight: 600;
}

.sidebar {
    background: #1e293b;
    padding: 2rem;
}

.sidebar h3 {
    color: #94a3b8;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.waiting-list {
    list-style: none;
}

.waiting-list li {
    background: #334155;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.waiting-list .ticket {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Admin */
.admin-body {
    background: #f1f5f9;
}

.admin-nav {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.control-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-call {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.queue-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    border-collapse: collapse;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.queue-table th,
.queue-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.queue-table th {
    background: #f8fafc;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.waiting {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.serving {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.completed {
    background: #dcfce7;
    color: #16a34a;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Service Management */
.service-management {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.add-service-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-list-edit {
    list-style: none;
}

.service-list-edit li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.service-list-edit li:last-child {
    border-bottom: none;
}

.service-list-edit input {
    width: auto;
    flex-grow: 1;
    margin-right: 1rem;
}

.service-list-edit .actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
}

.btn-delete {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
}