/* Staff Leave Manager – front-end styles */
.slm-wrap {
	--slm-brand: #0f766e;
	--slm-ink: #111827;
	--slm-muted: #6b7280;
	--slm-line: #e5e7eb;
	--slm-bg: #ffffff;
	--slm-soft: #f8fafc;
	--slm-err: #b42318;
	--slm-ok: #067647;
	--slm-radius: 10px;
	max-width: 860px;
	margin: 0 auto 2.5rem;
	color: var(--slm-ink);
	font-size: 16px;
	line-height: 1.55;
	box-sizing: border-box;
}
.slm-wrap *, .slm-wrap *::before, .slm-wrap *::after { box-sizing: border-box; }

.slm-header { margin-bottom: 1.25rem; }
.slm-header h2 { margin: 0 0 .35rem; font-size: 1.6rem; line-height: 1.25; }
.slm-header p { margin: 0; color: var(--slm-muted); }

.slm-section {
	border: 1px solid var(--slm-line);
	border-radius: var(--slm-radius);
	background: var(--slm-bg);
	padding: 1.25rem 1.25rem .5rem;
	margin: 0 0 1.25rem;
	min-width: 0;
}
.slm-section legend {
	display: flex; align-items: center; gap: .6rem;
	font-weight: 700; font-size: 1.05rem;
	padding: 0 .4rem; margin-left: -.4rem;
}
.slm-step {
	display: inline-grid; place-items: center;
	width: 1.75rem; height: 1.75rem; border-radius: 50%;
	background: var(--slm-brand); color: #fff; font-size: .85rem;
}
.slm-section-intro { margin: -.25rem 0 1rem; color: var(--slm-muted); font-size: .93rem; }

.slm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.slm-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
	.slm-grid { grid-template-columns: 1fr; }
	.slm-section { padding: 1rem 1rem .25rem; }
}

.slm-field { margin-bottom: 1rem; min-width: 0; }
.slm-field > label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.slm-req { color: var(--slm-err); }

.slm-wrap input[type="text"], .slm-wrap input[type="email"], .slm-wrap input[type="tel"],
.slm-wrap input[type="date"], .slm-wrap select, .slm-wrap textarea {
	width: 100%; max-width: 100%;
	padding: .65rem .8rem;
	border: 1px solid #cfd4dc; border-radius: 8px;
	background: #fff; color: var(--slm-ink);
	font: inherit; font-size: 1rem; line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
	min-height: 44px;
}
.slm-wrap textarea { resize: vertical; min-height: 90px; }
.slm-wrap input:focus, .slm-wrap select:focus, .slm-wrap textarea:focus {
	outline: none; border-color: var(--slm-brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--slm-brand) 20%, transparent);
}
.slm-wrap input[type="file"] { width: 100%; font-size: .93rem; padding: .5rem 0; }

.slm-help { margin: .3rem 0 0; font-size: .83rem; color: var(--slm-muted); }
.slm-error { margin: .3rem 0 0; font-size: .85rem; color: var(--slm-err); font-weight: 500; }
.slm-error:empty { display: none; }
.slm-field.has-error input, .slm-field.has-error select, .slm-field.has-error textarea { border-color: var(--slm-err); background: #fffafa; }

.slm-digits { display: inline-block; margin-left: .25rem; padding: 0 .45rem; border-radius: 99px; background: #f1f5f9; font-variant-numeric: tabular-nums; }
.slm-digits.is-ok { background: #dcfae6; color: var(--slm-ok); }
.slm-digits.is-bad { background: #fee4e2; color: var(--slm-err); }

/* Photo */
.slm-photo { display: flex; gap: 1rem; align-items: center; }
.slm-photo-preview {
	flex: 0 0 96px; width: 96px; height: 116px;
	border: 2px dashed #cfd4dc; border-radius: 8px;
	display: grid; place-items: center; overflow: hidden;
	background: var(--slm-soft); color: var(--slm-muted); font-size: .8rem; text-align: center;
}
.slm-photo-preview.has-img { border-style: solid; border-color: var(--slm-brand); }
.slm-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slm-photo-input { flex: 1; min-width: 0; }

/* Working-days box */
.slm-days-box {
	background: var(--slm-soft); border: 1px solid var(--slm-line); border-radius: 8px;
	padding: .65rem .9rem; display: flex; flex-direction: column; justify-content: center; align-self: end;
}
.slm-days-label { font-size: .82rem; color: var(--slm-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
#slm-days { font-size: 1.35rem; color: var(--slm-brand); }
#slm-days.is-bad { color: var(--slm-err); }
.slm-days-box .slm-help { margin: 0; }
.slm-notice-hint { display: none; grid-column: 1 / -1; font-size: .87rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: .55rem .8rem; border-radius: 8px; }

/* Declaration */
.slm-declaration { background: var(--slm-soft); border: 1px solid var(--slm-line); border-radius: var(--slm-radius); padding: 1rem 1.1rem; }
.slm-check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400 !important; font-size: .93rem; cursor: pointer; }
.slm-check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: 0 0 auto; accent-color: var(--slm-brand); }

/* Buttons */
.slm-actions { margin-top: 1.25rem; }
.slm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	background: var(--slm-brand); color: #fff !important; border: 1px solid var(--slm-brand);
	padding: .7rem 1.3rem; border-radius: 8px; font: inherit; font-weight: 600;
	text-decoration: none !important; cursor: pointer; min-height: 44px;
	transition: filter .15s, transform .05s;
}
.slm-btn:hover { filter: brightness(1.08); }
.slm-btn:active { transform: translateY(1px); }
.slm-btn[disabled] { opacity: .65; cursor: progress; }
.slm-btn--lg { width: 100%; padding: .9rem 1.4rem; font-size: 1.05rem; }
.slm-btn--ghost { background: transparent; color: var(--slm-brand) !important; }
.slm-btn--danger-ghost { background: transparent; color: var(--slm-err) !important; border-color: #fda29b; }

/* Alerts */
.slm-alert { background: #fef3f2; border: 1px solid #fecdca; color: var(--slm-err); padding: .9rem 1.1rem; border-radius: var(--slm-radius); margin-bottom: 1.25rem; }
.slm-alert[hidden] { display: none; }
.slm-notice { background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; padding: .9rem 1.1rem; border-radius: var(--slm-radius); margin-bottom: 1.25rem; }
.slm-notice--ok { background: #ecfdf3; border-color: #abefc6; color: var(--slm-ok); }

/* Honeypot */
.slm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Success */
.slm-success { text-align: center; border: 1px solid var(--slm-line); border-radius: var(--slm-radius); padding: 2.25rem 1.5rem; background: var(--slm-bg); }
.slm-success-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: #dcfae6; color: var(--slm-ok); display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.slm-success h2 { margin: 0 0 .5rem; }
.slm-success p { color: var(--slm-muted); max-width: 520px; margin: 0 auto .75rem; }
.slm-ref { display: flex; flex-direction: column; gap: .25rem; margin: 1.25rem auto !important; font-size: .9rem; }
.slm-ref strong { font-size: 1.6rem; color: var(--slm-ink); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.slm-success-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem !important; }

/* Status checker */
.slm-status-form { border: 1px solid var(--slm-line); border-radius: var(--slm-radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.slm-status-form .slm-actions { margin-top: 0; }
.slm-result { border: 1px solid var(--slm-line); border-left: 5px solid #f79009; border-radius: var(--slm-radius); padding: 1.25rem; background: var(--slm-bg); }
.slm-result--approved { border-left-color: #17b26a; }
.slm-result--rejected { border-left-color: #f04438; }
.slm-result--cancelled { border-left-color: #98a2b3; }
.slm-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.slm-result-head h3 { margin: .1rem 0 0; font-size: 1.2rem; }
.slm-result-ref { font-size: .82rem; color: var(--slm-muted); font-weight: 600; letter-spacing: .04em; }
.slm-dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
.slm-dl dt { color: var(--slm-muted); font-size: .9rem; }
.slm-dl dd { margin: 0; font-weight: 500; }
@media (max-width: 520px) { .slm-dl { grid-template-columns: 1fr; gap: 0; } .slm-dl dd { margin-bottom: .6rem; } }
.slm-note { margin-top: 1rem; background: #fffbeb; border-left: 4px solid #f0b429; padding: .75rem 1rem; border-radius: 6px; }
.slm-note p { margin: .25rem 0 0; }
.slm-cancel-form { margin-top: 1.25rem; }

/* Badges (shared with admin) */
.slm-badge { display: inline-block; padding: .2rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.slm-badge--pending { background: #fffaeb; color: #b54708; }
.slm-badge--approved { background: #ecfdf3; color: #067647; }
.slm-badge--rejected { background: #fef3f2; color: #b42318; }
.slm-badge--cancelled { background: #f2f4f7; color: #475467; }
