/* Bookflix UI system — aligned with the LabFlow visual language. */
:root {
  --ink: #17212d;
  --muted: #6e7a89;
  --line: #dde4e8;
  --canvas: #f4f7f6;
  --panel: #ffffff;
  --navy: #102a37;
  --navy-light: #1c3a46;
  --teal: #176a7b;
  --teal-soft: #e2f2f4;
  --lime: #d5f48e;
  --purple: #6657a7;
  --purple-soft: #eeeafb;
  --amber: #bc7813;
  --amber-soft: #fff1d9;
  --red: #b74e4e;
  --red-soft: #fce8e6;
  --success: #267a64;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 4px 18px rgba(24, 42, 50, .05);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: Manrope, "DM Sans", sans-serif; color: var(--ink); }

/* Brand */
.bookflix-logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; font: 800 19px/1 Manrope, sans-serif; letter-spacing: -.055em; }
.bookflix-logo > span:last-child > span { color: var(--lime); }
.bookflix-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #17333d; background: var(--lime); font-size: 19px; letter-spacing: -.1em; }
.bookflix-logo--large { color: var(--ink); font-size: 25px; gap: 12px; }
.bookflix-logo--large .bookflix-mark { width: 43px; height: 43px; font-size: 24px; border-radius: 13px; }
.bookflix-logo--large > span:last-child > span { color: var(--teal); }

/* Login */
.login-page { min-height: 100vh; background: radial-gradient(circle at 16% 0%, #e2f2f4 0, rgba(226, 242, 244, 0) 33%), radial-gradient(circle at 85% 90%, #e9f7c8 0, rgba(233, 247, 200, 0) 31%), var(--canvas); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(100%, 440px); padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 18px 55px rgba(16, 42, 55, .13); }
.login-card--status { text-align: center; }
.login-card h1 { margin: 17px 0 5px; font-size: 28px; font-weight: 800; letter-spacing: -.055em; }
.login-eyebrow { margin: 20px 0 0; color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.login-intro { margin: 0 0 25px; color: var(--muted); font-size: 14px; }
.login-card label { display: block; margin: 16px 0 7px; color: #34424e; font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #dfe6e8; border-radius: 8px; background: #fff; color: var(--ink); outline-color: var(--teal); font: inherit; }
.login-card input:focus { border-color: #72aeba; box-shadow: 0 0 0 3px rgba(23, 106, 123, .12); }
.login-submit, .google-login { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 46px; border-radius: 8px; font: 800 13px/1 "DM Sans", sans-serif; transition: .18s ease; }
.login-submit { margin-top: 21px; border: 0; color: #fff; background: var(--teal); }
.login-submit:hover { background: #105b69; transform: translateY(-1px); }
.google-login { border: 1px solid #dbe3e5; color: #33404a; background: #fff; }
.google-login:hover { border-color: #b8c9ce; background: #f8fbfb; }
.google-g { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #fff; background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); font: 800 12px/1 Arial, sans-serif; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 3px; color: #89969e; font-size: 11px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: #e5eaec; }
.login-help { margin: 24px 0 0; color: #84909a; text-align: center; font-size: 12px; }
.login-alert { margin: 18px 0; padding: 11px 13px; border: 1px solid #efc3bd; border-radius: 8px; color: #933f35; background: var(--red-soft); font-size: 13px; }

/* App chrome */
.app-header { position: relative; z-index: 2; padding: 16px 28px; color: #fff; background: var(--navy); border-bottom: 1px solid #254653; }
.app-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1600px; margin: 0 auto; }
.app-header__meta { display: flex; align-items: center; gap: 18px; }
.app-header__welcome { color: #a8c0c6; font-size: 12px; }
.logout-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #385865; border-radius: 7px; color: #d9e8eb; background: transparent; font-size: 12px; font-weight: 700; }
.logout-btn:hover { color: #fff; border-color: #66858e; background: var(--navy-light); }
.page-wrap { display: flex; min-height: calc(100vh - 67px); }
.sidebar { flex: 0 0 248px; padding: 26px 18px 20px; color: #d9e8eb; background: var(--navy); }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar-label { margin: 0 10px 9px; color: #91b0b9; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.sidebar-label--secondary { margin-top: 28px; }
.sidebar li + li { margin-top: 4px; }
.sidebar li a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; color: #b4cad0; font-size: 14px; font-weight: 600; }
.sidebar li a i { width: 17px; text-align: center; font-size: 13px; }
.sidebar li a:hover { color: #fff; background: var(--navy-light); }
.sidebar li a.active { color: #fff; background: #27505d; font-weight: 800; box-shadow: inset 3px 0 0 var(--lime); }
.sidebar-footer { margin: 34px 10px 0; padding-top: 18px; border-top: 1px solid #2a4a55; color: #91b0b9; font-size: 11px; }
.sidebar-footer span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); }
.main-content { flex: 1; min-width: 0; max-width: 1440px; padding: 38px clamp(24px, 5vw, 76px) 58px; }
.main-content > h2, .page-title h2 { margin-bottom: 23px !important; font-size: clamp(23px, 2.5vw, 31px); font-weight: 800; letter-spacing: -.055em; }
.main-content > h2 i, .page-title h2 i { color: var(--teal); }
footer { margin: 0; padding: 18px; color: #91b0b9; background: var(--navy); text-align: center; font-size: 11px; }
footer p { margin: 2px 0; }

/* Panels and dashboards */
.panel, .card, .section { margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.panel h2, .card h2 { margin: 0 0 17px; padding: 0 0 12px; border-bottom: 1px solid #e9eeef; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.panel h2 i, .card h2 i { color: var(--teal); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink) !important; background: var(--panel) !important; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(24, 42, 50, .09); }
.stat-card-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-card h3 { margin: 0; color: var(--ink) !important; font-size: 25px; font-weight: 800; letter-spacing: -.06em; }
.stat-card p { margin: 2px 0 0; color: var(--muted) !important; font-size: 11px; font-weight: 600; }
.stat-card i { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--teal) !important; background: var(--teal-soft); font-size: 16px; opacity: 1; }
.stat-card-2 i { color: var(--purple) !important; background: var(--purple-soft); }
.stat-card-3 i { color: var(--amber) !important; background: var(--amber-soft); }
.stat-card-4 i { color: var(--red) !important; background: var(--red-soft); }
.recent-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf0f1; }
.recent-row:last-child { border-bottom: 0; }
.empty-note { color: var(--muted); text-align: center; }

/* Forms */
label, .form-label { color: #35424c; font-size: 13px; font-weight: 700; }
.form-control, .form-select, textarea, input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="email"], select { border-color: #dfe6e8 !important; border-radius: 8px !important; color: var(--ink) !important; }
.form-control:focus, .form-select:focus, textarea:focus { border-color: #72aeba !important; box-shadow: 0 0 0 3px rgba(23, 106, 123, .12) !important; }
.input-group .input-group-text { border-color: #dfe6e8; border-radius: 8px 0 0 8px !important; color: #50606b; background: #f7faf9; font-weight: 700; }
.input-group .form-control { border-radius: 0 8px 8px 0 !important; }
.input-group .form-control, .input-group .btn { min-height: 46px; }
.btn, .btn-primary { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: .45rem !important; padding: 10px 13px !important; border: 0 !important; border-radius: 8px !important; color: #fff !important; background: var(--teal) !important; font-size: 13px !important; font-weight: 800 !important; }
.btn:hover { color: #fff !important; background: #105b69 !important; }
.btn-success { background: var(--success) !important; }
.btn-info { background: var(--purple) !important; }
.btn-warning { color: #513a0d !important; background: #f5c760 !important; }
.btn-danger { background: var(--red) !important; }
.btn-dark { background: var(--navy) !important; }
.btn-outline-secondary, .btn-outline-primary, .btn-outline-success, .btn-outline-danger, .btn-outline-dark { border: 1px solid #cfdadd !important; color: #42515b !important; background: #fff !important; }
.btn-outline-secondary:hover, .btn-outline-primary:hover, .btn-outline-success:hover, .btn-outline-danger:hover, .btn-outline-dark:hover { color: var(--ink) !important; background: #f3f7f7 !important; }
.btn-icon { width: 34px; height: 34px; padding: 0 !important; }

/* Tables, messages and page helpers */
.table-responsive { border: 1px solid #e6ecee; border-radius: 10px; }
.table { margin-bottom: 0; color: var(--ink); }
.table thead { color: #75828a; background: #f7faf9 !important; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.table thead th { padding: 12px 13px; border-bottom: 1px solid #dfe7e9 !important; color: #75828a !important; white-space: nowrap; }
.table td { padding: 12px 13px; border-color: #edf0f1; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f7faf9 !important; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: #fbfcfc; }
.genre-col { width: 220px; max-width: 220px; }
.genre-badge { display: inline-block !important; max-width: 220px; overflow: hidden; padding: .36rem .55rem !important; border-radius: 99px !important; white-space: nowrap; text-overflow: ellipsis; cursor: help; }
.badge { display: inline-flex !important; align-items: center; gap: .35rem; padding: .4rem .58rem !important; border-radius: 999px !important; font-size: 11px; font-weight: 800; }
.badge-available { color: #176a58 !important; background: #daf3e9 !important; }
.badge-unavailable { color: #984439 !important; background: var(--red-soft) !important; }
.alert { border: 1px solid #dce7e9; border-radius: 9px !important; box-shadow: none; }
.alert-success { color: #176a58; background: #e5f5ed; }
.alert-info { color: #246171; background: #e7f3f5; }
.alert-warning { color: #775a18; background: #fff5db; }
.alert-danger { color: #943e35; background: #fce9e6; }
.text-muted { color: var(--muted) !important; }
.teacher-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #c9e2e6; border-radius: 999px; color: #28626e; background: #edf7f8; font-size: .82rem; font-weight: 800; }
.selected-green { padding: 12px; border: 1px solid #c7e9d9; border-radius: 9px; background: #eaf8f1; }
.selected-amber { padding: 12px; border: 1px solid #f4dfaa; border-radius: 9px; background: #fff8e6; }
.overdue-row { background: #fff5f3 !important; }
.page-link { color: var(--teal); border-color: #dce5e7; }
.page-item.active .page-link { border-color: var(--teal); background: var(--teal); }
.cover-shell, .book-cover { border-radius: 10px; }

@media (max-width: 850px) {
  .app-header { padding: 14px 18px; }
  .app-header__welcome { display: none; }
  .page-wrap { display: block; }
  .sidebar { display: block; width: 100%; padding: 12px 15px; overflow-x: auto; white-space: nowrap; }
  .sidebar-label, .sidebar-footer { display: none; }
  .sidebar ul { display: inline-flex; gap: 4px; }
  .sidebar li + li { margin: 0; }
  .sidebar li a { padding: 8px 10px; font-size: 12px; }
  .sidebar-label--secondary { margin: 0; }
  .sidebar ul + .sidebar-label--secondary { display: none; }
  .main-content { padding: 26px 18px 40px; }
}

@media (max-width: 520px) {
  .login-shell { padding: 16px; }
  .login-card { padding: 27px 22px; }
  .app-header__inner { align-items: center; }
  .bookflix-logo { font-size: 17px; }
  .bookflix-mark { width: 30px; height: 30px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel, .card, .section { padding: 16px; }
}

/* FlowLab visual language: Sierra Bernia School edition. */
:root {
  --ink: #24323d;
  --muted: #647886;
  --line: #dce4e8;
  --canvas: #f7f9fa;
  --panel: #fff;
  --teal: #154b73;
  --navy: #0b2d49;
  --navy-light: #174f76;
  --teal-soft: #e9f1f6;
  --lime: #fff;
}
body { background: var(--canvas); color: var(--ink); font-family: Lato, Arial, Helvetica, sans-serif; }
h1, h2, h3, h4, h5 { font-family: Georgia, "Times New Roman", serif; }

/* Fixed FlowLab-style rail and understated top account controls. */
.page-wrap { display: block; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; flex-direction: column;
  width: 248px; padding: 28px 18px 18px; color: #d9e8eb;
  background: linear-gradient(#123f63, #0b2d49); box-shadow: 2px 0 12px rgba(17, 46, 70, .12);
}
.brand { display: flex; align-items: center; gap: 18px; padding: 4px 10px 32px; color: #fff; }
.school-crest { display: grid; flex: 0 0 auto; width: 46px; height: 46px; padding: 2px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; }
.brand-logo { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; }
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 18px; letter-spacing: -.035em; }
.brand small { margin-top: 2px; color: #d3e0e9; font-size: 12px; letter-spacing: 0; }
.sidebar nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 4px; color: #d5e0e7; font-size: 14px; text-align: left; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-link.active { color: #154b73; background: #fff; font-weight: 700; box-shadow: none; }
.nav-dot { width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-link.active .nav-dot { border-color: #154b73; background: #154b73; }
.sidebar-bottom { margin-top: auto; padding: 18px 10px 2px; border-top: 1px solid rgba(255, 255, 255, .2); color: #dce7ed; font-size: 12px; letter-spacing: .02em; }
.demo-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d5f48e; }
.app-header { position: absolute; top: 25px; right: clamp(24px, 5vw, 76px); z-index: 3; padding: 0; border: 0; background: transparent; color: var(--ink); }
.app-header__inner { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.signed-in-staff { display: grid; justify-items: end; }
.signed-in-staff b { color: #24323d; font-size: 12px; }
.signed-in-staff small { margin-top: 2px; color: #718392; font-size: 10px; text-transform: capitalize; }
.main-content { max-width: none; min-height: 100vh; margin-left: 248px; padding: 42px clamp(24px, 5vw, 76px) 64px; background: linear-gradient(#fff 0, #f7f9fa 210px); }
footer { margin-left: 248px; padding: 18px; color: #718392; background: #f7f9fa; border-top: 1px solid var(--line); }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.topbar h1 { margin: 0; color: #154b73; font-size: clamp(25px, 3vw, 34px); font-weight: 700; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 7px; color: #5e7585; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.main-content > h2, .page-title h2 { color: #154b73; font-family: Georgia, "Times New Roman", serif; }
.main-content > h2 i, .page-title h2 i { color: #154b73; }
.panel, .card, .section { border-color: var(--line); border-radius: 7px; box-shadow: 0 4px 18px rgba(22, 57, 83, .06); }
.panel h2, .card h2 { color: var(--ink); font-family: Georgia, "Times New Roman", serif; }
.panel h2 i, .card h2 i { color: #154b73; }
.stat-card { border-radius: 7px; }
.stat-card i { color: #154b73 !important; background: #e9f1f6; }
.btn, .btn-primary, .primary-button { background: #154b73 !important; border-radius: 4px !important; }
.btn:hover, .primary-button:hover { background: #0d395b !important; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; border: 1px solid #cedadd; border-radius: 5px; color: #154b73; background: #fff; font-size: 11px; font-weight: 800; }
.outline-button:hover { color: #0d395b; border-color: #6d9dbb; background: #f6fbff; }
.table thead { background: #f7faf9 !important; }
.table thead th { color: #647886 !important; }

/* FlowLab-matched Google sign-in and school crest treatment. */
.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 10%, #e4f0f7, #f7f9fa 46%, #e8eef2); }
.login-card { width: min(100%, 440px); padding: 42px; border: 1px solid #d5e1e8; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(23, 65, 92, .14); text-align: center; }
.login-crest-wrap { display: inline-grid; place-items: center; width: 104px; height: 104px; margin-bottom: 17px; padding: 5px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px #eaf2f7; }
.login-crest { width: 94px; height: 94px; border-radius: 50%; object-fit: contain; background: #fff; }
.login-card h1 { margin: 2px 0 9px; color: #154b73; font-size: 36px; font-weight: 700; letter-spacing: -.05em; }
.login-card > p:not(.eyebrow):not(.login-error) { max-width: 345px; margin: 0 auto 23px; color: #5e7180; font-size: 14px; line-height: 1.55; }
.login-card > small { display: block; margin-top: 17px; color: #778894; font-size: 11px; line-height: 1.45; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 15px; border: 1px solid #bdcbd5; border-radius: 5px; color: #263640; background: #fff; box-shadow: 0 2px 5px rgba(33, 55, 70, .08); font-size: 13px; font-weight: 800; }
.google-button:hover { border-color: #6d9dbb; color: #263640; background: #f6fbff; }
.google-button span { color: #4285f4; font-size: 18px; font-weight: 900; }
.login-error { margin: 0 0 18px; padding: 10px; border: 1px solid #efc7c2; border-radius: 5px; color: #9a453b; background: #fff2f0; font-size: 12px; line-height: 1.45; text-align: left; }

/* Staff approval workspace. */
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 23px 17px; }
.panel-heading h2 { margin: 0; padding: 0; border: 0; font-size: 19px; }
.lock-note { padding: 5px 8px; border-radius: 6px; color: #5d777d; background: #eff5f4; font-size: 10px; font-weight: 700; }
.count-badge { display: inline-block; padding: 5px 8px; border-radius: 999px; color: #39707a; background: #edf5f4; font-size: 10px; font-weight: 800; }
.count-badge.warning { color: #a76810; background: #fff1db; }
.empty-state { margin: 4px 23px 23px; color: #7c8991; font-size: 12px; }
.staff-list { padding: 0 23px 18px; }
.staff-row { display: grid; grid-template-columns: 32px minmax(120px, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid #e8eeee; }
.staff-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #154b73; background: #e8f0f6; font-size: 10px; font-weight: 900; }
.staff-row strong, .staff-row small { display: block; }
.staff-row strong { color: #2b3c47; font-size: 12px; }
.staff-row small { margin-top: 2px; overflow-wrap: anywhere; color: #75858e; font-size: 10px; }
.staff-state { padding: 4px 6px; border-radius: 999px; color: #557180; background: #edf3f6; font-size: 9px; font-style: normal; font-weight: 800; text-transform: capitalize; }
.staff-state.pending { color: #a66410; background: #fff2dc; }
.staff-state.active { color: #357560; background: #e8f4ed; }
.staff-actions { display: flex; flex-wrap: wrap; grid-column: 2 / -1; gap: 6px; }
.staff-actions select { height: 34px; border: 1px solid #dce5e7; border-radius: 4px; padding: 0 8px; color: #263640; background: #fff; font-size: 11px; }
.staff-actions .primary-button { margin: 0; padding: 8px 9px; border: 0; color: #fff; }
.staff-actions .outline-button { align-self: auto; padding: 8px 9px; }
.danger-button { color: #ad4e48; }
.staff-self { grid-column: 2 / -1; color: #557685 !important; font-weight: 800; }

/*
 * Some inherited LMS pages load Bootstrap after this stylesheet.  Keep the
 * Bookflix navigation and the account controls readable even on those pages.
 */
.sidebar .nav-link {
  color: #d5e0e7 !important;
  background: transparent !important;
  text-decoration: none !important;
}
.sidebar .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .12) !important;
}
.sidebar .nav-link.active {
  color: #154b73 !important;
  background: #fff !important;
  font-weight: 700 !important;
}
.sidebar .nav-link.active .nav-dot {
  border-color: #154b73 !important;
  background: #154b73 !important;
}
/* Keep page action buttons clear of the persistent account area. */
.page-title,
.topbar,
.main-content > .d-flex.justify-content-between.align-items-center {
  padding-right: 200px;
}

/* Resolve legacy Bootstrap variant clashes: every button retains readable text. */
.btn.btn-primary, .btn.btn-info, .btn.btn-dark {
  color: #fff !important;
  background: #154b73 !important;
}
.btn.btn-success {
  color: #fff !important;
  background: #267a64 !important;
}
.btn.btn-warning {
  color: #513a0d !important;
  background: #f5c760 !important;
}
.btn.btn-danger {
  color: #fff !important;
  background: #b74e4e !important;
}
.btn.btn-outline-secondary,
.btn.btn-outline-primary,
.btn.btn-outline-success,
.btn.btn-outline-danger,
.btn.btn-outline-dark {
  border: 1px solid #bfcfd7 !important;
  color: #154b73 !important;
  background: #fff !important;
}
.btn.btn-outline-success { color: #176a58 !important; border-color: #9ecbb9 !important; }
.btn.btn-outline-danger { color: #a9433d !important; border-color: #e1b1ad !important; }
.btn.btn-outline-dark { color: #24323d !important; border-color: #bfcbd2 !important; }
.btn.btn-outline-secondary:hover,
.btn.btn-outline-primary:hover,
.btn.btn-outline-success:hover,
.btn.btn-outline-danger:hover,
.btn.btn-outline-dark:hover {
  background: #eef5f8 !important;
}

@media (max-width: 700px) {
  .sidebar { position: static; width: 100%; padding: 14px; }
  .brand { padding: 4px 6px 12px; }
  .school-crest, .brand-logo { width: 38px; height: 38px; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 6px; }
  .nav-link { flex: 0 0 auto; width: auto; padding: 8px 10px; white-space: nowrap; }
  .sidebar-bottom { display: none; }
  .app-header { top: 82px; right: 16px; }
  .main-content { margin-left: 0; padding: 25px 16px 40px; }
  .page-title, .topbar, .main-content > .d-flex.justify-content-between.align-items-center { padding-right: 0; }
  footer { margin-left: 0; }
  .login-card { padding: 30px 22px; }
  .signed-in-staff { display: none; }
  .staff-row { grid-template-columns: 32px minmax(0, 1fr); }
  .staff-state { grid-column: 2; justify-self: start; }
  .staff-actions { grid-column: 1 / -1; }
}
