:root {
	--fos-bg: #f8fafc;
	--fos-card: #ffffff;
	--fos-border: #cbd5e1;
	--fos-accent: #2563eb;
	--fos-text: #111827;
	--fos-subtext: #4b5563;
}

.fos-portal-wrap {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	color: var(--fos-text);
}

.fos-card {
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.fos-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.fos-full { grid-column: 1 / -1; }

.fos-table {
	width: 100%;
	border-collapse: collapse;
}

.fos-table th,
.fos-table td {
	border-bottom: 1px solid var(--fos-border);
	padding: 8px;
	color: var(--fos-text);
}

.fos-badge {
	background: #dbeafe;
	border: 1px solid var(--fos-accent);
	color: var(--fos-text);
	border-radius: 14px;
	padding: 2px 8px;
	font-size: 12px;
}

.fos-status-approved { border-color: #059669; }
.fos-status-rejected { border-color: #dc2626; }
.fos-status-pending { border-color: #d97706; }

.fos-notice {
	border-color: #059669;
	background: #d1fae5;
}

.fos-notice p {
	margin: 0;
	color: var(--fos-text);
}

.fos-notice-error {
	border-color: #dc2626;
	background: #fee2e2;
}

.fos-btn {
	margin-top: 12px;
}

.fos-portal-wrap input,
.fos-portal-wrap select,
.fos-portal-wrap textarea,
.fos-card input,
.fos-card select,
.fos-card textarea {
	width: 100%;
	background: #ffffff;
	border: 1px solid var(--fos-border);
	color: var(--fos-text);
	border-radius: 8px;
	padding: 8px;
}

/* Shift plan (roster) styles */
.fos-shift-plan-wrap {
	margin: 16px 0;
	color: var(--fos-text);
}

.fos-shift-plan-header {
	margin-bottom: 16px;
}

.fos-shift-plan-header h2 {
	margin: 0 0 6px;
}

.fos-shift-plan-dates {
	color: var(--fos-subtext);
	margin: 0;
}

.fos-shift-plan-toolbar {
	margin-bottom: 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 12px;
	padding: 12px;
}

.fos-shift-plan-filters,
.fos-shift-plan-division-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.fos-shift-plan-division-filter {
	margin-bottom: 16px;
}

.fos-shift-plan-filters label,
.fos-shift-plan-division-filter label {
	font-weight: 600;
}

.fos-shift-plan-filters select,
.fos-shift-plan-division-filter select {
	width: auto;
	min-width: 80px;
}

.fos-shift-plan-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.fos-shift-plan-division {
	margin-bottom: 24px;
}

.fos-shift-plan-division-title {
	margin: 0 0 10px;
	padding: 8px 12px;
	background: #dbeafe;
	color: #1e3a8a;
	border-radius: 8px;
	font-size: 16px;
}

.fos-shift-plan-scroll {
	overflow-x: auto;
	border: 1px solid var(--fos-border);
	border-radius: 12px;
	background: var(--fos-card);
}

.fos-shift-plan-table {
	width: auto;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 13px;
}

.fos-shift-plan-table th,
.fos-shift-plan-table td {
	border-right: 1px solid var(--fos-border);
	border-bottom: 1px solid var(--fos-border);
	padding: 6px 4px;
	text-align: center;
	white-space: nowrap;
	min-width: 36px;
}

.fos-shift-plan-table th:last-child,
.fos-shift-plan-table td:last-child {
	border-right: none;
}

.fos-shift-plan-sticky {
	position: sticky;
	left: 0;
	z-index: 2;
	background: var(--fos-card);
	min-width: 140px;
	text-align: left;
	box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

.fos-shift-plan-table thead th {
	background: #f8fafc;
	color: var(--fos-text);
	font-weight: 600;
}

.fos-shift-plan-day {
	min-width: 42px;
}

.fos-shift-plan-day-num {
	display: block;
	font-size: 13px;
	font-weight: 700;
}

.fos-shift-plan-day-name {
	display: block;
	font-size: 10px;
	color: var(--fos-subtext);
	text-transform: uppercase;
}

.fos-shift-plan-employee {
	font-weight: 600;
	padding-left: 12px;
}

.fos-shift-plan-cell {
	vertical-align: middle;
}

.fos-shift-plan-badge,
.fos-shift-plan-empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	padding: 0 4px;
	height: 28px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
}

.fos-shift-plan-empty {
	color: var(--fos-subtext);
	background: transparent;
}

/* Shift type colors */
.fos-shift-morning .fos-shift-plan-badge { background: #dbeafe; border: 1px solid #2563eb; color: #1e3a8a; }
.fos-shift-afternoon .fos-shift-plan-badge { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
.fos-shift-night .fos-shift-plan-badge { background: #e2e8f0; border: 1px solid #475569; color: #1e293b; }
.fos-shift-long_shift .fos-shift-plan-badge { background: #fef3c7; border: 1px solid #d97706; color: #78350f; }
.fos-shift-day_12h .fos-shift-plan-badge { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
.fos-shift-night_12h .fos-shift-plan-badge { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
.fos-shift-standby .fos-shift-plan-badge { background: #fef9c3; border: 1px solid #ca8a04; color: #713f12; }
.fos-shift-off .fos-shift-plan-badge { background: #f3f4f6; border: 1px solid #6b7280; color: #374151; }
.fos-shift-vacation .fos-shift-plan-badge { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
.fos-shift-sick_leave .fos-shift-plan-badge { background: #fee2e2; border: 1px solid #dc2626; color: #7f1d1d; }

.fos-shift-off { background: #f3f4f6; }

.fos-shift-plan-legend {
	margin-top: 16px;
	padding: 12px;
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 12px;
}

.fos-shift-plan-legend h4 {
	margin: 0 0 10px;
}

.fos-shift-plan-legend-items {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
}

.fos-shift-plan-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
}

.fos-shift-plan-legend-color {
	width: 16px;
	height: 16px;
	border-radius: 4px;
	display: inline-block;
}

.fos-shift-plan-legend-color.fos-shift-morning { background: #dbeafe; border: 1px solid #2563eb; }
.fos-shift-plan-legend-color.fos-shift-afternoon { background: #ede9fe; border: 1px solid #7c3aed; }
.fos-shift-plan-legend-color.fos-shift-night { background: #e2e8f0; border: 1px solid #475569; }
.fos-shift-plan-legend-color.fos-shift-long_shift { background: #fef3c7; border: 1px solid #d97706; }
.fos-shift-plan-legend-color.fos-shift-day_12h { background: #d1fae5; border: 1px solid #059669; }
.fos-shift-plan-legend-color.fos-shift-night_12h { background: #ede9fe; border: 1px solid #7c3aed; }
.fos-shift-plan-legend-color.fos-shift-standby { background: #fef9c3; border: 1px solid #ca8a04; }
.fos-shift-plan-legend-color.fos-shift-off { background: #f3f4f6; border: 1px solid #6b7280; }
.fos-shift-plan-legend-color.fos-shift-vacation { background: #d1fae5; border: 1px solid #059669; }
.fos-shift-plan-legend-color.fos-shift-sick_leave { background: #fee2e2; border: 1px solid #dc2626; }

.fos-shift-plan-author {
	margin-top: 24px;
	padding: 10px 0;
	font-size: 11px;
	color: var(--fos-subtext);
	text-align: right;
	border-top: 1px solid var(--fos-border);
}

.fos-shift-plan-author a {
	color: var(--fos-subtext);
	text-decoration: none;
}

.fos-shift-plan-author a:hover {
	text-decoration: underline;
}

/* Print styles */
@media print {
	@page {
		size: landscape;
		margin: 10mm;
	}

	body * {
		visibility: hidden;
	}

	.fos-shift-plan-wrap,
	.fos-shift-plan-wrap * {
		visibility: visible;
	}

	.fos-shift-plan-wrap {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		margin: 0;
		padding: 0;
		background: #fff;
		color: #000;
	}

	.fos-shift-plan-toolbar,
	.fos-shift-plan-division-filter,
	.fos-shift-plan-legend,
	.fos-shift-plan-author {
		display: none !important;
	}

	.fos-shift-plan-scroll {
		overflow: visible;
		border: none;
		background: transparent;
	}

	.fos-shift-plan-table {
		font-size: 9pt;
		width: 100%;
		border-collapse: collapse;
	}

	.fos-shift-plan-table th,
	.fos-shift-plan-table td {
		border: 1px solid #999;
		padding: 4px;
		min-width: auto;
		color: #000;
		background: #fff;
	}

	.fos-shift-plan-sticky {
		position: static;
		background: #fff;
		box-shadow: none;
		min-width: 120px;
	}

	.fos-shift-plan-division-title {
		background: #dbeafe;
		color: #000;
		border: 1px solid #999;
	}

	.fos-shift-plan-badge,
	.fos-shift-plan-empty {
		min-width: 22px;
		padding: 0 3px;
		height: 22px;
		font-size: 9pt;
		border-radius: 3px;
	}

	.fos-shift-morning .fos-shift-plan-badge { background: #dbeafe; border: 1px solid #2563eb; color: #1e3a8a; }
	.fos-shift-afternoon .fos-shift-plan-badge { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
	.fos-shift-night .fos-shift-plan-badge { background: #e2e8f0; border: 1px solid #475569; color: #1e293b; }
	.fos-shift-long_shift .fos-shift-plan-badge { background: #fef3c7; border: 1px solid #d97706; color: #78350f; }
	.fos-shift-day_12h .fos-shift-plan-badge { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
	.fos-shift-night_12h .fos-shift-plan-badge { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
	.fos-shift-standby .fos-shift-plan-badge { background: #fef9c3; border: 1px solid #ca8a04; color: #713f12; }
	.fos-shift-off .fos-shift-plan-badge { background: #f3f4f6; border: 1px solid #6b7280; color: #374151; }
	.fos-shift-vacation .fos-shift-plan-badge { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
	.fos-shift-sick_leave .fos-shift-plan-badge { background: #fee2e2; border: 1px solid #dc2626; color: #7f1d1d; }

	.fos-shift-off { background: transparent; }
}

@media (max-width: 768px) {
	.fos-grid { grid-template-columns: 1fr; }
	.fos-shift-plan-toolbar { flex-direction: column; align-items: stretch; }
	.fos-shift-plan-actions { justify-content: flex-start; }
	.fos-shift-plan-table { font-size: 11px; }
	.fos-shift-plan-table th,
	.fos-shift-plan-table td { min-width: 30px; padding: 4px 2px; }
	.fos-shift-plan-sticky { min-width: 110px; }
}

/* Interactive shift plan modal */
.fos-shift-plan-cell { cursor: pointer; }
.fos-shift-plan-cell:hover { filter: brightness(0.95); }

.fos-shift-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background: rgba(0, 0, 0, 0.75);
	align-items: center;
	justify-content: center;
}

.fos-shift-modal.fos-shift-modal-open { display: flex; }

.fos-shift-modal-content {
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 14px;
	padding: 22px 24px;
	width: 92%;
	max-width: 460px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	position: relative;
	color: var(--fos-text);
}

.fos-shift-modal-close {
	position: absolute;
	right: 14px;
	top: 10px;
	background: transparent;
	border: none;
	color: var(--fos-subtext);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.fos-shift-modal-close:hover { color: var(--fos-text); }

.fos-shift-modal-content h3 { margin: 0 0 4px; font-size: 18px; }
.fos-shift-modal-subtitle { color: var(--fos-subtext); margin: 0 0 16px; font-size: 13px; }

.fos-shift-modal-content label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
	color: var(--fos-subtext);
}

.fos-shift-modal-content input,
.fos-shift-modal-content select,
.fos-shift-modal-content textarea {
	width: 100%;
	background: #ffffff;
	border: 1px solid var(--fos-border);
	color: var(--fos-text);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
}

.fos-shift-modal-content p { margin: 0 0 12px; }

.fos-modal-time-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.fos-shift-modal-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.fos-shift-modal-actions .button { margin: 0; }

.fos-shift-modal-content hr {
	border: none;
	border-top: 1px solid var(--fos-border);
	margin: 18px 0 14px;
}

.fos-shift-modal-content h4 { margin: 0 0 10px; font-size: 15px; }

.fos-shift-modal-message {
	margin-top: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
}

.fos-shift-modal-message.fos-success {
	background: #d1fae5;
	border: 1px solid #059669;
	color: #064e3b;
}

.fos-shift-modal-message.fos-error {
	background: #fee2e2;
	border: 1px solid #dc2626;
	color: #7f1d1d;
}

@media (max-width: 480px) {
	.fos-modal-time-row { grid-template-columns: 1fr; }
	.fos-shift-modal-content { padding: 18px 16px; }
}

/* Admin modern styles */
.fos-admin-wrap {
	max-width: 1400px;
}

.fos-admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.fos-admin-header h1 {
	margin: 0;
	font-size: 24px;
}

.fos-admin-subtitle {
	color: var(--fos-subtext);
	margin: 4px 0 0;
	font-size: 14px;
}

.fos-admin-card {
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.fos-admin-card h2 {
	margin: 0 0 16px;
	font-size: 18px;
	color: var(--fos-text);
}

.fos-admin-filters {
	margin: 0;
}

.fos-filter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}

.fos-filter-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
	color: var(--fos-subtext);
}

.fos-filter-field input,
.fos-filter-field select,
.fos-filter-field textarea {
	width: 100%;
	background: #ffffff;
	border: 1px solid var(--fos-border);
	color: var(--fos-text);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
}

.fos-filter-full {
	grid-column: 1 / -1;
}

.fos-filter-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.fos-table-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	flex-wrap: wrap;
	gap: 10px;
}

.fos-table-header h2 {
	margin: 0;
}

.fos-table-count {
	background: #dbeafe;
	border: 1px solid var(--fos-accent);
	color: var(--fos-text);
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
}

.fos-table-scroll {
	overflow-x: auto;
}

.fos-admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.fos-admin-table th,
.fos-admin-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--fos-border);
	text-align: left;
	vertical-align: middle;
}

.fos-admin-table th {
	background: #f1f5f9;
	font-weight: 700;
	color: #111827;
	white-space: nowrap;
}

.fos-admin-table tr:hover td {
	background: #eff6ff;
}

.fos-col-id {
	color: var(--fos-subtext);
	font-size: 12px;
}

.fos-col-note {
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fos-col-actions {
	white-space: nowrap;
}

.fos-inline-form {
	display: inline;
	margin: 0;
}

.fos-empty {
	text-align: center;
	padding: 30px;
	color: var(--fos-subtext);
	font-style: italic;
}

.fos-shift-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.fos-shift-badge.fos-shift-morning { background: #dbeafe; border: 1px solid #2563eb; color: #1e3a8a; }
.fos-shift-badge.fos-shift-afternoon { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
.fos-shift-badge.fos-shift-night { background: #e2e8f0; border: 1px solid #475569; color: #1e293b; }
.fos-shift-badge.fos-shift-long_shift { background: #fef3c7; border: 1px solid #d97706; color: #78350f; }
.fos-shift-badge.fos-shift-day_12h { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
.fos-shift-badge.fos-shift-night_12h { background: #ede9fe; border: 1px solid #7c3aed; color: #4c1d95; }
.fos-shift-badge.fos-shift-standby { background: #fef9c3; border: 1px solid #ca8a04; color: #713f12; }
.fos-shift-badge.fos-shift-off { background: #f3f4f6; border: 1px solid #6b7280; color: #374151; }
.fos-shift-badge.fos-shift-vacation { background: #d1fae5; border: 1px solid #059669; color: #064e3b; }
.fos-shift-badge.fos-shift-sick_leave { background: #fee2e2; border: 1px solid #dc2626; color: #7f1d1d; }

@media (max-width: 768px) {
	.fos-admin-header { flex-direction: column; align-items: stretch; }
	.fos-filter-grid { grid-template-columns: 1fr; }
	.fos-admin-table { font-size: 12px; }
	.fos-admin-table th,
	.fos-admin-table td { padding: 8px 6px; }
}

/* ============================================================
   Mobile portal ([fos_mobile_portal])
   ============================================================ */
.fos-mobile-wrap {
	max-width: 480px;
	margin: 0 auto;
	padding: 12px;
	color: var(--fos-text);
	font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

.fos-mobile-notice {
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 14px;
	font-size: 14px;
}

.fos-mobile-notice-ok {
	background: #d1fae5;
	border: 1px solid #059669;
}

.fos-mobile-notice-err {
	background: #fee2e2;
	border: 1px solid #dc2626;
}

/* Header */
.fos-mobile-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.fos-mobile-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	flex-shrink: 0;
}

.fos-mobile-header-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fos-mobile-header-info strong {
	font-size: 18px;
	color: var(--fos-text);
}

.fos-mobile-header-info span {
	font-size: 13px;
	color: var(--fos-subtext);
}

/* Today's shift hero card */
.fos-mobile-today {
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border: 1px solid var(--fos-accent);
	border-radius: 18px;
	padding: 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 20px;
	box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.fos-mobile-today-off {
	border-color: var(--fos-border);
	box-shadow: none;
}

.fos-mobile-today-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #1d4ed8;
	font-weight: 600;
}

.fos-mobile-today-type {
	font-size: 26px;
	color: #111827;
	line-height: 1.2;
}

.fos-mobile-today-time {
	font-size: 17px;
	color: var(--fos-text);
	font-weight: 600;
}

.fos-mobile-today-place {
	font-size: 13px;
	color: var(--fos-subtext);
}

/* Section titles */
.fos-mobile-section-title {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--fos-subtext);
	margin: 20px 0 10px;
}

.fos-mobile-empty {
	color: var(--fos-subtext);
	font-style: italic;
	font-size: 14px;
}

/* Shift list */
.fos-mobile-shift-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fos-mobile-shift-item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-left: 4px solid var(--fos-accent);
	border-radius: 12px;
	padding: 12px 14px;
}

.fos-mobile-shift-item.fos-mobile-shift-night,
.fos-mobile-shift-item.fos-mobile-shift-night_12h { border-left-color: #8b5cf6; }
.fos-mobile-shift-item.fos-mobile-shift-afternoon { border-left-color: #f59e0b; }
.fos-mobile-shift-item.fos-mobile-shift-day_12h { border-left-color: #1ea77a; }
.fos-mobile-shift-item.fos-mobile-shift-vacation { border-left-color: #1ea77a; }
.fos-mobile-shift-item.fos-mobile-shift-sick_leave { border-left-color: #d43b3b; }
.fos-mobile-shift-item.fos-mobile-shift-off { border-left-color: #78716c; }

.fos-mobile-shift-date {
	font-weight: 700;
	font-size: 14px;
	min-width: 64px;
	color: var(--fos-text);
}

.fos-mobile-shift-type {
	flex: 1;
	font-size: 14px;
	color: var(--fos-text);
}

.fos-mobile-shift-time {
	font-size: 13px;
	color: var(--fos-subtext);
	white-space: nowrap;
}

/* Leave request (collapsible) */
.fos-mobile-leave {
	margin-top: 20px;
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 14px;
	overflow: hidden;
}

.fos-mobile-leave-toggle {
	padding: 16px;
	font-size: 16px;
	font-weight: 600;
	color: #111827;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	user-select: none;
}

.fos-mobile-leave-toggle::after {
	content: '+';
	font-size: 22px;
	color: #1d4ed8;
	transition: transform 0.2s;
}

.fos-mobile-leave[open] .fos-mobile-leave-toggle::after {
	transform: rotate(45deg);
}

.fos-mobile-leave-form {
	padding: 0 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fos-mobile-leave-form label {
	font-size: 13px;
	color: var(--fos-subtext);
	margin-top: 8px;
}

.fos-mobile-leave-form input,
.fos-mobile-leave-form select,
.fos-mobile-leave-form textarea {
	width: 100%;
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid var(--fos-border);
	color: var(--fos-text);
	border-radius: 10px;
	padding: 12px;
	font-size: 16px; /* prevents iOS zoom on focus */
}

.fos-mobile-btn {
	margin-top: 14px;
	width: 100%;
	background: var(--fos-accent);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 15px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.fos-mobile-btn:active {
	transform: scale(0.98);
}

/* Leave requests list */
.fos-mobile-request-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fos-mobile-request-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: var(--fos-card);
	border: 1px solid var(--fos-border);
	border-radius: 12px;
	padding: 12px 14px;
}

.fos-mobile-request-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fos-mobile-request-main strong {
	font-size: 14px;
	color: var(--fos-text);
}

.fos-mobile-request-main span {
	font-size: 12px;
	color: var(--fos-subtext);
}

.fos-mobile-status {
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--fos-border);
	white-space: nowrap;
}

.fos-mobile-status.fos-status-approved {
	border-color: #059669;
	background: #d1fae5;
	color: #064e3b;
}

.fos-mobile-status.fos-status-rejected {
	border-color: #dc2626;
	background: #fee2e2;
	color: #7f1d1d;
}

.fos-mobile-status.fos-status-pending {
	border-color: #d97706;
	background: #fef3c7;
	color: #78350f;
}
/* Keep long operational tables inside their own scroll area on small screens. */
.fos-admin-wrap { min-width: 0; max-width: 100%; }
.fos-admin-wrap .fos-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.fos-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.fos-admin-wrap details { margin: 16px 0; overflow-wrap: anywhere; }
.fos-admin-wrap summary { cursor: pointer; font-weight: 600; }
@media (max-width: 600px) {
    .fos-admin-wrap input[type="file"] { max-width: 100%; }
    .fos-admin-wrap .fos-card { overflow-wrap: anywhere; }
    .fos-admin-wrap .fos-table-scroll table { min-width: 640px; }
    .fos-pagination .button { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Employee cards must fit narrow screens; tables scroll within their cards. */
.fos-portal-wrap {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    min-width: 0;
}
.fos-portal-wrap > .fos-card { min-width: 0; }
.fos-portal-wrap .fos-table-scroll { max-width: 100%; overflow-x: auto; }
