/* Shared school identity for authentication and all CMS views. */
@import url('https://fonts.googleapis.com/css2?family=Parkinsans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* Navigation changes only through the header button, never on hover. */
.admin-app #sidebar {
  width: 16rem;
  margin-left: 0;
  transform: translateX(0);
  visibility: visible;
  transition: transform .2s, visibility .2s;
}
.admin-app .wrapper { padding-left: 16rem; padding-right: 0; transition: padding-left .2s; }
.admin-app.sidebar-collapsed #sidebar { transform: translateX(-100%); visibility: hidden; }
.admin-app.sidebar-collapsed .wrapper { padding-left: 0; }
@media (max-width: 991px) {
  .admin-app #sidebar { top: 76px; height: calc(100dvh - 76px); }
  .admin-app .wrapper { padding-left: 0; }
  .admin-app .header { z-index: 1040; }
}

:root {
  --cui-primary: #115e59;
  --cui-primary-rgb: 17, 94, 89;
  --cui-link-color: #115e59;
  --cui-link-hover-color: #0f766e;
  --cui-body-color: #243d3c;
  --cui-body-font-family: 'Inter', system-ui, sans-serif;
  --cui-border-color: #deebe7;
  --cui-tertiary-color: #627875;
}
.admin-app, .login-page { font-family: 'Inter', system-ui, sans-serif; background: #f3f9f7; }
.admin-app h1, .admin-app h4, .admin-app h6, .login-page h1, .login-page h2 { font-family: 'Parkinsans', system-ui, sans-serif; }
.admin-app .main { background: radial-gradient(ellipse at top right, #dff5ed 0, transparent 55%), #f3f9f7 !important; }
.admin-app .main > .d-flex:first-of-type { flex-wrap: wrap; gap: 1rem; }
.admin-app h4 { font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 700; color: #115e59; }
.admin-app .sidebar { --cui-sidebar-width: 16rem; background: linear-gradient(165deg, #073d39, #115e59); border: 0 !important; }
.admin-app .sidebar-header { min-height: 86px; border-color: #ffffff20 !important; }
.admin-app .sidebar-brand-full { white-space: normal; font-size: .8rem; line-height: 1.6; }
.admin-app .sidebar-nav { padding: 12px 10px; }
.admin-app .sidebar-nav .nav-title { color: #98c8be; font-size: .65rem; letter-spacing: .14em; padding-top: 18px; }
.admin-app .sidebar-nav .nav-link { border: 0; border-radius: 10px !important; margin: 2px 0; padding-block: 10px; color: #d8ece6; }
.admin-app .sidebar-nav .nav-link.active { background: #ffffff18; color: #9ff5d6; box-shadow: inset 3px 0 #5eead4; }
.admin-app .sidebar-nav .nav-link:hover { background: #ffffff12; color: white; }
.admin-app .sidebar-nav .nav-icon { color: inherit; }
.admin-app .header { min-height: 76px; gap: 12px; box-shadow: 0 3px 20px #115e5906; }
.admin-header-label { margin-right: auto; color: #627875; font-size: .75rem; }
.admin-app .card { border-radius: 18px !important; box-shadow: 0 5px 24px #174f4209 !important; }
.admin-app .card-header { padding: 20px; border-color: #edf3f0; }
.admin-app .card-body { padding: 22px; }
.admin-app .card > .table-responsive { border-radius: 18px; }
.admin-app .table-crud thead th { background: #eaf5ef; color: #476961; border-bottom: 1px solid #dcebe4; padding: 18px 16px; white-space: nowrap; }
.admin-app .table-crud tbody td { padding-block: 17px; }
.admin-app .table { --cui-table-hover-bg: #f0faf5; }
.admin-app .btn { font-weight: 600; border-radius: 10px; padding: .55rem 1rem; }
.admin-app .btn-sm { padding: .35rem .75rem; }
.admin-app { font-size: .875rem; }
.admin-app .sidebar-nav .nav-link { font-size: .875rem; padding-block: 8px; }
.admin-app .btn, .admin-app .form-control, .admin-app .form-select { font-size: .875rem; }
.admin-app .btn { white-space: nowrap; }
.admin-app .card-body { padding: 18px; }
.admin-app .form-control-sm, .admin-app .form-select-sm { min-height: 36px; }
.attendance-class-settings { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.attendance-setting-field { flex: 1 1 190px; min-width: 0; }
.attendance-setting-field label { display: block; margin-bottom: 4px; }
.attendance-setting-submit { flex: 0 0 auto; }
.attendance-setting-submit .btn { min-width: 84px; min-height: 36px; }
.attendance-status-scroll { max-width: 100%; min-width: 0; overflow-x: auto; }
.attendance-status-table { min-width: 760px; }
.attendance-status-table th { white-space: nowrap; }
.attendance-status-table th:first-child,
.attendance-status-table td:first-child,
.attendance-students-table th:first-child,
.attendance-students-table td:first-child {
  box-sizing: content-box;
  width: 24ch;
  min-width: 24ch;
  max-width: 24ch;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: .875rem;
  font-weight: 400;
}
.attendance-status-table th:first-child,
.attendance-students-table th:first-child { font-weight: 600; }
.attendance-status-table td:nth-child(2), .attendance-status-table td:nth-child(3) { white-space: nowrap; }
.attendance-status-table form { min-width: 390px; align-items: center; }
.attendance-status-table select { flex: 0 0 105px; width: 105px; }
.attendance-status-table input[name="note"] { flex: 1 1 200px; min-width: 180px; }
.attendance-status-table button { flex-shrink: 0; }
.admin-app .btn-primary { --cui-btn-bg: #115e59; --cui-btn-border-color: #115e59; --cui-btn-hover-bg: #0f766e; --cui-btn-hover-border-color: #0f766e; --cui-btn-active-bg: #073d39; --cui-btn-active-border-color: #073d39; box-shadow: 0 4px 10px #115e5917; }
.admin-app .btn-outline-primary { --cui-btn-color: #115e59; --cui-btn-border-color: #9bc6b9; --cui-btn-hover-bg: #115e59; --cui-btn-hover-border-color: #115e59; --cui-btn-active-bg: #073d39; }
.admin-app .form-control, .admin-app .form-select { min-height: 43px; border-radius: 10px; border-color: #d8e7df; }
.admin-app .form-control:focus, .admin-app .form-select:focus { border-color: #39a68f; box-shadow: 0 0 0 3px #14b8a61a; }
.admin-app .input-group > .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.admin-app .form-label { color: #395f55; }
.admin-app .ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: #d8e7df; background: #f6faf8; }
.admin-app .ql-container.ql-snow { border-radius: 0 0 10px 10px; border-color: #d8e7df; }
.admin-app .gradient-card { background: linear-gradient(135deg, #115e59, #178678) !important; }
.admin-app .stat-value { font-family: 'Parkinsans', sans-serif; font-size: 2rem; }
.admin-app .quick-action-btn { border: 1px solid #e1ece6; }
.admin-app .footer { color: #627875 !important; }
.admin-app :focus-visible, .login-page :focus-visible { outline: 3px solid #14b8a6; outline-offset: 3px; }

.login-page { min-height: 100vh; overflow-x: hidden; overflow-y: auto; background: radial-gradient(ellipse at top right, #d2f1e5, transparent 55%), #f3f9f7; }
.login-page::before, .login-page::after { display: none; }
.login-page .login-container { max-width: 1200px; margin: auto; gap: clamp(32px, 6vw, 90px); padding-block: 48px; padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
.login-intro { flex: 1; max-width: 570px; }
.login-brand { display: flex; align-items: center; gap: 14px; color: #115e59; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.school-emblem { width: 56px; height: 56px; object-fit: contain; }
.login-eyebrow { display: inline-block; margin: 48px 0 20px; padding: 8px 14px; border-radius: 99px; color: #115e59; background: #deeee5; font-size: .75rem; font-weight: 600; }
.login-intro h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.2; color: #103f38; font-weight: 700; letter-spacing: -.04em; }
.login-intro > p { color: #627875; line-height: 1.9; max-width: 450px; margin-block: 24px; }
.login-photo { width: 100%; max-height: 210px; object-fit: cover; border-radius: 22px; margin-top: 8px; }
.login-page .login-card { flex-shrink: 0; border: 1px solid #e0ebe4; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 70px #174f4212; }
.login-page .accent-bar { background: linear-gradient(90deg, #115e59, #5eead4); }
.login-page .login-logo { background: #edf7f1; box-shadow: none; width: 76px; height: 76px; }
.login-page .login-title { color: #115e59; font-size: 1.6rem; }
.login-page .login-subtitle, .login-page .login-footer { color: #627875; line-height: 1.7; }
.login-page .form-floating-custom { margin-bottom: 22px; }
.login-page .form-floating-custom .form-control { height: 54px; padding-right: 46px; }
.login-page .form-floating-custom .form-control:focus { border-color: #0f766e; box-shadow: 0 0 0 3px #14b8a619; }
.login-page .form-floating-custom label, .login-page .form-floating-custom .form-control:focus ~ .input-icon { color: #52746a; }
.login-page .form-floating-custom .form-control:focus ~ label, .login-page .form-floating-custom .form-control:not(:placeholder-shown) ~ label { color: #115e59; }
.login-page .btn-login { background: #115e59; height: 52px; box-shadow: 0 6px 16px #115e5920; }
.login-page .btn-login:hover { background: #0f766e; color: white; box-shadow: 0 8px 20px #115e5930; }
.login-back { display: block; margin-top: 24px; text-align: center; color: #115e59; text-decoration: none; font-size: .85rem; }
.login-back:hover { text-decoration: underline; }
@media (max-width: 991px) {
  .login-page .login-container { flex-direction: column; gap: 28px; }
  .login-intro { text-align: center; max-width: 500px; }
  .login-brand { justify-content: center; }
  .login-eyebrow { margin: 24px 0 12px; }
  .login-intro > p { margin: 16px auto 0; }
  .login-photo { display: none; }
  .admin-header-label { display: none; }
}
@media (max-width: 575px) {
  .admin-app .main { padding: 20px 14px !important; }
  .admin-app .header { padding-inline: 14px !important; }
  .admin-app .header .btn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-app .card-body { padding: 16px; }
  .admin-app .footer .d-flex { flex-wrap: wrap; gap: 8px; }
  .login-page .login-container { padding-block: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .login-page .login-card .card-body { padding: 28px 22px; }
  .login-page .login-card { width: min(100%, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .admin-app *, .login-page * { transition: none !important; animation: none !important; }
}
