* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #16a085;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --border-color: #bdc3c7;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-header {
    background: var(--primary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: white;
    padding: 10px;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
}

.login-form {
    padding: 30px 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #229954;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-warning:hover {
    background: #d68910;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.error-message,
.success-message {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.error-message {
    background: #fadbd8;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.success-message {
    background: #d5f4e6;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.login-footer {
    background: var(--light-bg);
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
}

.navbar {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-user span {
    font-size: 14px;
}

.navbar-user a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.navbar-user a:hover {
    background: rgba(255,255,255,0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

.card-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.card-body {
    padding: 15px 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-waiting {
    background: #ffeaa7;
    color: #d63031;
}

.badge-called {
    background: #74b9ff;
    color: #0984e3;
}

.badge-serving {
    background: #a29bfe;
    color: #6c5ce7;
}

.badge-completed {
    background: #55efc4;
    color: #00b894;
}

.badge-cancelled {
    background: #fab1a0;
    color: #e17055;
}

.badge-priority {
    background: #fd79a8;
    color: white;
}

.badge-pwd {
    background: #fdcb6e;
    color: #d63031;
}

.badge-senior {
    background: #e17055;
    color: white;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

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

.stat-box .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-box .stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    background: var(--light-bg);
    border-radius: 0 0 8px 8px;
    text-align: right;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}

.queue-display {
    font-size: 72px;
    font-weight: 900;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
    color: white;
    border-radius: 10px;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.counter-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.counter-status.available {
    background: #d5f4e6;
    border-color: var(--success-color);
}

.counter-status.serving {
    background: #e3f2fd;
    border-color: var(--secondary-color);
}

.counter-status.break {
    background: #fff3cd;
    border-color: var(--warning-color);
}

.counter-status.closed {
    background: #f8d7da;
    border-color: var(--danger-color);
}

.cancel-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
    opacity: 0.7;
}

.cancel-btn:hover {
    background: #c0392b;
    opacity: 1;
}
/* Scrollable Table Body Only */
.table-container-body {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ddd;
    border-top: none; /* Remove top border since header has bottom border */
    border-radius: 0 0 8px 8px;
}

.table-container-body table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.table-container-body tbody tr:hover {
    background-color: #0bf559;
}

.table-container-body tbody td {
    padding: 12px;
    border-bottom: 1px solid #111111;
}

/* Scrollbar styling */
.table-container-body::-webkit-scrollbar {
    width: 10px;
}

.table-container-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-container-body::-webkit-scrollbar-thumb:hover {
    background: #242323;
}