/* Header styles */
.main-header {
	width: 100%;
	background: linear-gradient(90deg, #ff9800 60%, #ffb74d 100%);
	border-bottom: none;
	padding: 0.5rem 0;
	box-shadow: none;
	margin-bottom: 0;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
}
.header-content {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 1.2rem;
}
.logo {
	color: #fff;
	font-size: 1.35rem;
	font-family: 'Times New Roman', Times, serif;
	font-weight: 700;
	letter-spacing: 1px;
	text-shadow: none;
	display: flex;
	align-items: center;
	gap: 0.7rem;
}

.logo-emblem {
	height: 3.2rem;
	width: auto;
	margin-right: 0.7rem;
	vertical-align: middle;
}

/* Footer styles */
.main-footer {
	width: 100%;
	background: linear-gradient(90deg, #ff9800 60%, #ffb74d 100%);
	border-top: none;
	padding: 0.5rem 0;
	box-shadow: none;
	position: fixed;
	left: 0;
	bottom: 0;
	z-index: 100;
	margin-top: 0;
}
.footer-content {
	max-width: 1100px;
	margin: 0 auto;
	text-align: center;
	color: #fff;
	font-size: 0.97rem;
	font-weight: 400;
	padding: 0 1.2rem;
}

@media (max-width: 600px) {
	.main-header, .main-footer {
		padding: 0.4rem 0;
	}
	.header-content, .footer-content {
		padding: 0 0.5rem;
	}
	.logo {
		font-size: 1.05rem;
	}
	.footer-content {
		font-size: 0.92rem;
	}
}
body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: #fff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

main {
	flex: 1 0 auto;
	margin-top: 4.2rem;
	margin-bottom: 3.2rem;
}

.login-container {
	background: #fff;
	box-sizing: border-box;
	border: 2.5px solid #ff9800;
	box-shadow: 0 8px 32px rgba(255,152,0,0.22), 0 2px 8px rgba(0,0,0,0.07);
	padding: 2.8rem 2.2rem;
	border-radius: 22px;
	max-width: 500px;
	width: 90vw;
	margin: 3rem auto;
}

.login-form {
	padding: 5%;
}

.login-form h2 {
	color: #ff9800;
	margin-bottom: 1.5rem;
	font-weight: 700;
	letter-spacing: 1px;
}

.input-group {
	width: 100%;
	margin-bottom: 1.2rem;
}

.input-group label {
	display: block;
	margin-bottom: 0.4rem;
	color: #333;
	font-size: 1rem;
	font-weight: 500;
}

.input-group input {
	width: 100%;
	padding: 0.7rem 1rem;
	border: 1.5px solid #ffb74d;
	border-radius: 8px;
	font-size: 1rem;
	outline: none;
	transition: border 0.2s;
	background: #fff8f0;
	margin-top: 2px;
	box-sizing: border-box;
}

.input-group input:focus {
	border-color: #ff9800;
}

button[type="submit"] {
	width: 100%;
	padding: 0.8rem 0;
	background: linear-gradient(90deg, #ff9800 60%, #ffb74d 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 1.1rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(255,152,0,0.08);
	transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover {
	background: linear-gradient(90deg, #ffb74d 60%, #ff9800 100%);
	transform: translateY(-2px) scale(1.03);
}

.login-footer {
	margin-top: 1.2rem;
	text-align: center;
}

.login-footer a {
	color: #ff9800;
	text-decoration: none;
	font-size: 0.98rem;
	transition: color 0.2s;
}
.login-footer a:hover {
	color: #ff9800;
	text-decoration: underline;
}

.error-msg {
    color: #d32f2f;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    text-align: center;
}

.spinner {
    margin-right: 8px; 
    vertical-align: middle;
}

.gate-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 2.2rem 2.8rem;
    justify-items: center;
    align-items: stretch;
    min-height: 60vh;
    margin: 2.5rem auto 2.5rem auto;
    width: 60vw;
    max-width: 900px;
}
.desk-block {
    background: #fff8f0;
    border: 2.5px solid #ffb74d;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(255,183,77,0.13);
    padding: 1.1rem 0.7rem;
    width: 100%;
    margin: 10px;
    min-width: 0;
    min-height: 60px;
    max-width: 220px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #ff9800;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s, color 0.2s, transform 0.15s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.desk-block:hover, .desk-block.active {
    background: linear-gradient(90deg, #ffb74d 60%, #ff9800 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(255,152,0,0.18);
    transform: translateY(-4px) scale(1.04);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 2.2rem 2.2rem 1.5rem 2.2rem;
    min-width: 270px;
    max-width: 90vw;
    text-align: center;
    color: #333;
    font-size: 1.08rem;
}
.modal-title {
    color: #ff9800;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
}
.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.2rem;
    justify-content: center;
}
.modal-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.modal-btn.confirm {
    background: linear-gradient(90deg, #ff9800 60%, #ffb74d 100%);
    color: #fff;
}
.modal-btn.cancel {
    background: #eee;
    color: #ff9800;
}

.spinner-inline {
	vertical-align: middle;
	display: inline-block;
	width: 1.2em; 
	height: 1.2em;
	margin-right: 5px;
}

/* --- Desk (Quầy xử lý) --- */
.desk-container {
    max-width: 520px;
    margin: 32px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 24px 16px 32px 16px;
}
.current-processing {
    background: #ffe0b2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 28px;
    text-align: center;
}
.current-processing h3 {
    margin: 0 0 8px 0;
    color: #ff9800;
    font-size: 1.1rem;
    font-weight: 600;
}
.ticket-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ticket-number {
    font-size: 2.2rem;
    font-weight: bold;
    color: #ff9800;
    margin-bottom: 4px;
}
.ticket-name {
    font-size: 1.1rem;
    color: #333;
}
.queue-section h3 {
    margin-bottom: 12px;
    color: #ff9800;
    font-size: 1.05rem;
}
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.queue-item {
    display: flex;
    align-items: center;
    background: #e9e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    gap: 12px;
}
.queue-item .ticket-number {
    font-size: 1.3rem;
    color: #ff9800;
    min-width: 60px;
    text-align: center;
}
.queue-item .ticket-name {
    flex: 1;
    color: #222;
}
.btn-call, .btn-skip {
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    margin-left: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-call {
    background: #ff9800;
    color: #fff;
}
.btn-call:hover {
    background: #fb8c00;
}
.btn-skip {
    background: #eee;
    color: #888;
}
.btn-skip:hover {
    background: #ffd180;
    color: #ff9800;
}

/* Nút hoàn thành (btn-complete) */
.btn-complete {
    background: linear-gradient(90deg, #ff9800 60%, #ffb74d 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 20px 0 20px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(255,152,0,0.08);
}
.btn-complete:hover, .btn-complete:focus {
    background: linear-gradient(90deg, #fb8c00 60%, #ffb74d 100%);
    color: #fff;
    outline: none;
    box-shadow: 0 4px 16px rgba(255,152,0,0.16);
}

.btn-recall {
    background: linear-gradient(90deg, #43a047 60%, #a5d6a7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(67,160,71,0.10);
}
.btn-recall:hover, .btn-recall:focus {
    background: linear-gradient(90deg, #388e3c 60%, #a5d6a7 100%);
    color: #fff;
    outline: none;
    box-shadow: 0 4px 16px rgba(67,160,71,0.18);
}

.btn-reskip {
    background: linear-gradient(90deg, #bdbdbd 60%, #eeeeee 100%);
    color: #555;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(158,158,158,0.10);
}
.btn-reskip:hover, .btn-reskip:focus {
    background: linear-gradient(90deg, #9e9e9e 60%, #eeeeee 100%);
    color: #333;
    outline: none;
    box-shadow: 0 4px 16px rgba(158,158,158,0.18);
}

@media (max-width: 900px) {
    .gate-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 1.5rem 1.7rem;
        margin: 1.2rem auto 1.2rem auto;
        width: 90vw;
        max-width: 98vw;
    }
}

@media (max-width: 600px) {
	.login-container {
		padding: 1.2rem 0.5rem;
		max-width: 90vw;
		min-width: 0;
		border-radius: 12px;
		margin: 1.2rem auto;
	}
	.login-form h2 {
		font-size: 1.2rem;
	}
	.input-group input {
		font-size: 1rem;
	}
    .gate-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 1fr);
        gap: 1.1rem;
        margin: 0.7rem auto 0.7rem auto;
        width: 98vw;
        max-width: 99vw;
    }
    .desk-block {
        padding: 0.7rem 0.5rem;
        font-size: 0.97rem;
        max-width: 80vw;
        min-height: 40px;
    }
	.desk-container {
        max-width: 98vw;
        padding: 12px 2vw 20px 2vw;
    }
}
