/* Attendance gate */
.spjc-att-gate {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(145deg, #0d47a1 0%, #1565c0 45%, #42a5f5 100%);
}

.spjc-att-gate-card {
	background: #fff;
	border-radius: 16px;
	padding: 40px 32px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.spjc-att-gate-logo {
	border-radius: 12px;
	margin-bottom: 16px;
}

.spjc-att-gate-card h1 {
	margin: 0 0 8px;
	font-size: 1.75rem;
	color: #0d47a1;
}

.spjc-att-gate-note {
	color: #607d8b;
	margin: 12px 0 24px;
}

.spjc-att-gate-btn {
	width: 100%;
	font-size: 1.05rem;
	padding: 14px 20px;
}

.spjc-att-admin-gate .spjc-att-gate {
	min-height: 70vh;
	border-radius: 12px;
}

/* Buttons */
.spjc-att-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}

.spjc-att-btn-primary {
	background: #1565c0;
	color: #fff;
}

.spjc-att-btn-primary:hover {
	background: #0d47a1;
}

.spjc-att-btn-approve {
	background: #2e7d32;
	color: #fff;
}

.spjc-att-btn-reject {
	background: #c62828;
	color: #fff;
}

/* Calendar */
.spjc-att-wrap {
	max-width: 1200px;
}

.spjc-att-topbar {
	margin-bottom: 16px;
}

.spjc-att-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 20px;
	padding: 16px;
	background: #f5f9ff;
	border-radius: 10px;
	border: 1px solid #dbeafe;
}

.spjc-att-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.spjc-att-filter-form label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #455a64;
}

.spjc-att-filter-form select,
.spjc-att-filter-form input[type="date"] {
	min-width: 140px;
	padding: 8px 10px;
	border: 1px solid #cfd8dc;
	border-radius: 6px;
}

.spjc-att-filter-form .spjc-att-filter-group[hidden] {
	display: none !important;
}

.spjc-att-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.spjc-att-legend-item {
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.spjc-att-present,
.spjc-att-badge.spjc-att-present {
	background: #e8f5e9;
	color: #2e7d32;
}

.spjc-att-leave,
.spjc-att-badge.spjc-att-leave {
	background: #fff3e0;
	color: #ef6c00;
}

.spjc-att-absent,
.spjc-att-badge.spjc-att-absent {
	background: #ffebee;
	color: #c62828;
}

.spjc-att-badge.spjc-att-future {
	background: #eceff1;
	color: #78909c;
}

.spjc-att-period-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
}

.spjc-att-calendar {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.spjc-att-cal-head,
.spjc-att-cal-body {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.spjc-att-cal-head div {
	padding: 10px;
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	background: #eceff1;
	border-bottom: 1px solid #cfd8dc;
}

.spjc-att-cal-cell {
	min-height: 100px;
	border-right: 1px solid #eee;
	border-bottom: 1px solid #eee;
	padding: 8px;
	font-size: 12px;
}

.spjc-att-cal-cell:nth-child(7n) {
	border-right: none;
}

.spjc-att-cal-empty {
	background: #fafafa;
}

.spjc-att-cal-daynum {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 6px;
}

.spjc-att-cal-stats {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 6px;
}

.spjc-att-cal-stats span {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 600;
}

.spjc-att-cal-detail {
	border-top: 1px dashed #eee;
	padding-top: 4px;
	max-height: 72px;
	overflow-y: auto;
}

.spjc-att-person-row {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	padding: 2px 0;
}

.spjc-att-table-wrap {
	overflow-x: auto;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #fff;
}

.spjc-att-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.spjc-att-table th,
.spjc-att-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	text-align: left;
}

.spjc-att-table th {
	background: #f5f5f5;
	font-size: 12px;
}

.spjc-att-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

/* Leave queue */
.spjc-att-leave-queue {
	margin-top: 28px;
}

.spjc-att-leave-queue h2 {
	margin-bottom: 12px;
	font-size: 1.1rem;
}

.spjc-att-leave-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 12px;
}

.spjc-att-leave-head {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 8px;
}

.spjc-att-leave-reason {
	color: #546e7a;
	font-size: 13px;
	margin: 8px 0 12px;
}

.spjc-att-leave-actions {
	display: flex;
	gap: 8px;
}

.spjc-att-notice {
	margin-bottom: 16px;
}

/* Login leave button */
.spjc-leave-login-btn {
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 11px 16px;
	border: 2px solid #1565c0;
	background: transparent;
	color: #1565c0;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}

.spjc-leave-login-btn:hover {
	background: #e3f2fd;
}

/* Leave modal */
.spjc-leave-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.spjc-leave-modal.is-open {
	display: flex;
}

.spjc-leave-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.spjc-leave-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.spjc-leave-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: none;
	font-size: 24px;
	cursor: pointer;
	color: #78909c;
}

.spjc-leave-modal-panel h2 {
	margin: 0 0 18px;
	font-size: 1.25rem;
}

.spjc-leave-field {
	margin-bottom: 14px;
}

.spjc-leave-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
}

.spjc-leave-field select,
.spjc-leave-field input,
.spjc-leave-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}

.spjc-leave-dates {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.spjc-leave-word-count {
	font-size: 12px;
	color: #78909c;
	margin-top: 4px;
}

.spjc-leave-message {
	padding: 10px 12px;
	border-radius: 8px;
	margin-bottom: 12px;
	font-size: 13px;
}

.spjc-leave-message.is-error {
	background: #ffebee;
	color: #c62828;
}

.spjc-leave-message.is-success {
	background: #e8f5e9;
	color: #2e7d32;
}

.spjc-att-filter-group[data-period="custom"] {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.spjc-att-readonly-date {
	background: #f5f5f5;
	color: #455a64;
	cursor: not-allowed;
}

.spjc-att-today-panel {
	background: #f5f9ff;
	border: 1px solid #dbeafe;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 20px;
}

.spjc-att-today-panel h2 {
	margin: 0 0 12px;
	font-size: 1.05rem;
}

.spjc-att-today-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
}

.spjc-att-today-item {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.spjc-att-today-role {
	font-size: 12px;
	color: #78909c;
}

.spjc-att-today-status {
	font-size: 12px;
	font-weight: 600;
}

.spjc-att-cal-cell-clickable {
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.spjc-att-cal-cell-clickable:hover {
	background: #f0f7ff;
	box-shadow: inset 0 0 0 2px #90caf9;
}

.spjc-att-cal-hint {
	font-size: 10px;
	color: #78909c;
	margin-top: 6px;
}

.spjc-att-day-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.spjc-att-day-modal.is-open {
	display: flex;
}

body.spjc-att-modal-open {
	overflow: hidden;
}

.spjc-att-day-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.spjc-att-day-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	max-width: 720px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.spjc-att-day-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: none;
	font-size: 24px;
	cursor: pointer;
	color: #78909c;
}

.spjc-att-day-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.spjc-att-day-table th,
.spjc-att-day-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	text-align: left;
}

.spjc-att-export-btn {
	white-space: nowrap;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.spjc-att-day-table th:last-child,
.spjc-att-day-table td:last-child {
	white-space: nowrap;
}

.spjc-att-leave-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.spjc-att-leave-tab {
	padding: 8px 14px;
	border-radius: 999px;
	background: #eceff1;
	color: #37474f;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.spjc-att-leave-tab.is-active {
	background: #1565c0;
	color: #fff;
}

.spjc-att-leave-status-pending { color: #ef6c00; }
.spjc-att-leave-status-approved { color: #2e7d32; }
.spjc-att-leave-status-rejected { color: #c62828; }

.spjc-att-my-leave-intro {
	margin: 0 0 16px;
	color: #546e7a;
	font-size: 14px;
}

.spjc-att-my-leave-days {
	margin: 0 0 8px;
	font-size: 13px;
	color: #455a64;
	font-weight: 600;
}

.spjc-att-my-leave-card .spjc-att-leave-head {
	flex-wrap: wrap;
	justify-content: space-between;
}

.spjc-att-my-leave-card .spjc-att-leave-status {
	margin-left: auto;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: .04em;
}

.spjc-tech-mgr-content .spjc-att-my-leave-intro,
.spjc-tech-mgr-content .spjc-att-my-leave-days,
.spjc-tech-mgr-content .spjc-att-leave-reason,
.spjc-tech-mgr-content .spjc-att-leave-meta,
.spjc-tech-mgr-content .spjc-att-empty {
	color: #cbd5e1;
}

.spjc-tech-mgr-content .spjc-att-leave-card {
	background: rgba(30, 41, 59, .85);
	border-color: rgba(148, 163, 184, .2);
	color: #f1f5f9;
}

.spjc-tech-mgr-content .spjc-att-leave-head strong {
	color: #f8fafc;
}

.spjc-tech-mgr-content .spjc-att-leave-tab {
	background: rgba(148, 163, 184, .15);
	color: #e2e8f0;
}

.spjc-tech-mgr-content .spjc-att-leave-tab.is-active {
	background: #1565c0;
	color: #fff;
}

.spjc-att-empty {
	color: #78909c;
	padding: 12px 0;
}

.spjc-att-leave-meta {
	font-size: 12px;
	color: #78909c;
	margin: 0 0 8px;
}

@media (max-width: 640px) {
	.spjc-att-cal-cell {
		min-height: 80px;
		padding: 4px;
	}

	.spjc-att-cal-detail {
		display: none;
	}

	.spjc-leave-dates {
		grid-template-columns: 1fr;
	}
}
