@charset "UTF-8";
/* CSS Document */
:root {
	--seat-width: 70px;
	--seat-height: 50px;
	--male-color: #b3e0ff;
	--female-color: #ffd1dc;
	--empty-color: #f0f0f0;
}

body {
	padding: 0;
	font-family: -apple-system, system-ui;
	background: #f8f9fa;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Chrome/Safari/Opera */
    -khtml-user-select: none; /* Konqueror */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Standard syntax */
}

.bus-container {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 2px;
	width: 100%;
}

.seat {
	position: relative;
	border: 1px solid #ddd;
	padding: 3px;
	min-width: var(--seat-width);
	min-height: var(--seat-height);
	background: var(--empty-color);
	font-size: 10px;
	touch-action: auto;
	user-select: none;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

.seat-content {
	/*pointer-events: none;*/
}

.student-name {
	font-weight: 500;
	margin-bottom: 2px;
	pointer-events: auto;
}

.merged-row {
	grid-row: 6 / span 2 !important;
	min-height: calc(var(--seat-height) * 2 + 6px) !important;
}

.male { background: var(--male-color); }
.female { background: var(--female-color); }
.aisle { background: transparent; border: none; }

.controls {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin: 12px 0;
}

button {
	padding: 10px;
	background: #2196F3;
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	transition: opacity 0.2s;
	width: 100%;
	height: 48px;
}

button:active {
	opacity: 0.8;
}

.side-panel {
	background: white;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	margin-top: 15px;
}

#unmappedList {
	min-height: 20px;
	padding: 12px;
	background: #f8f9fa;
	border-radius: 6px;
	margin: 12px 0;
	white-space: pre-wrap;
	line-height: 1.6;
	font-size: 12px;
}

.aisle-col {
	grid-column: 4;
}

.merged-row {
	grid-row: 6 / span 2;
	min-height: calc(var(--seat-height) * 2 + 6px);
}

#tabTitle{
	text-align: center;
	font-size: 24px;
	font-weight: bold;
	padding: 10px 0 16px 0;
}
.copyRight{
	text-align: center;
	font-size: 12px;
	font-weight: lighter;
	padding: 16px 0;
	line-height: 14px;
	margin-top: 20px;
}
.absent {
    background-color: #ccc !important;
}

#custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 300px;
}

.toast-item {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.toast-item.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    margin-right: 10px;
    font-weight: bold;
}

.toast-success { background: #4CAF50; }
.toast-error { background: #f44336; }
.toast-warning { background: #ff9800; }
.toast-info { background: #2196F3; }

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.confirm-modal.show {
    opacity: 1;
}

.confirm-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-width: 280px;
    text-align: center;
}

.confirm-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.confirm-ok {
    background: #2196F3;
    color: white;
}

.confirm-cancel {
    background: #f44336;
    color: white;
}

#stuManagerContainer button {
    padding: 8px 12px;
    font-size: 14px;
    width: auto;
    height: auto;
}

#stuInfoDiv input, #stuInfoDiv select {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
	font-size: 16px;
}
#stuInfoDiv select {
    width: 63%;
}
#stuInfoDiv label {
    font-size: 16px;
    margin-right: 10px;
	line-height: 28px;
}
.confirm-modal {
    z-index: 10001 !important;
}

#stuManagerContainer {
    z-index: 9999;
}

#stuInfoDiv {
    z-index: 10000;
}

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

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

#custom-toast {
    z-index: 10003 !important;
}

#stuManagerContainer {
    z-index: 9999;
}

#stuInfoDiv {
    z-index: 10001;
}
.record-list {
    margin-top: 15px;
    background: #fff;
    border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 13px;
	font-weight: 200;
	widows: 100%;;
}

.record-header {
    display: flex;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
	height: 19px;
	font-weight: normal;
	line-height: 2;
}

.record-header > span {
    flex-shrink: 0;
}

.col-date { width: 10%; }
.col-total { width: 10%; }
.col-actual { width: 10%; }
.col-absent { flex-grow: 1; }

.record-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    line-height: 2;
	align-items: center;
}

.record-item:last-child {
    border-bottom: none;
}

.col-total, .col-actual {
    /*color: #3498db;*/
    /*font-weight: 500;*/
	text-align: center;
}

.col-absent {
    color: #e74c3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: inherit;
    padding-left: 10px;
}

.loading {
    padding: 15px;
    text-align: center;
    color: #95a5a6;
}
.col-absent {
    white-space: normal !important;
    word-break: break-all;
    min-height: 20px;
    line-height: 1.6;
    padding-left: 8px;
	width: 69%;
}
.record-header .col-absent{
	color: #2c3e50;
}
#todayRecordsContainer .record-item {
    padding: 6px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
	line-height:1.6;
}
#datePickerBtn {
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    outline: none;
}

#datePickerBtn:hover {
    opacity: 0.8;
}

#datePickerBtn:active {
    opacity: 0.6;
}

#recordDateTitle {
    font-size: 16px;
    padding-left: 8px;
}
.flatpickr-calendar {
    max-width: 300px !important;
    font-size: 14px !important;
}
#todayRecordItems{
	overflow: auto;
	height:500px;
}
@media (max-width: 480px) {
    .record-header > span {
        font-size: 12px;
    }
    
    .record-item > span {
        font-size: 12px;
    }
    
    #recordDateTitle {
        font-size: 14px;
    }
}
.side-panel, 
.record-list, 
#todayRecordItems {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-container {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px 32px;
    width: auto;
    min-width: 280px;
    max-width: 360px;
    margin: 0 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.auth-modal.show .auth-container {
    transform: translateY(0) scale(1);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-header h2 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
}

.auth-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.input-group button {
    padding: 14px 24px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: auto;
    width: auto;
    min-width: 80px;
}

.input-group button:hover {
    background: #1976D2;
}

.input-group button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-error {
    text-align: center;
    color: #f44336;
    font-size: 14px;
    padding: 12px;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 8px;
}