/*
 * modern.css
 * Loaded AFTER vendors.css and application.css (see layouts/app.blade.php).
 * Keeps Bootstrap 3 markup and Bootswatch themes working; only reshapes
 * spacing, radius, borders, type and the sidebar. Uses translucent greys
 * for lines/hovers so it also holds up on dark Bootswatch themes.
 */

:root {
  --ui-accent: #d93025;
  --ui-accent-soft: rgba(217, 48, 37, .10);
  --ui-line: rgba(127, 127, 127, .24);
  --ui-hover: rgba(127, 127, 127, .10);
  --ui-surface: #fff; /* replaced at runtime with the theme's real page colour */
  --ui-radius: 10px;
  --ui-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
body {
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--ui-font);
  font-weight: 600;
  letter-spacing: -.01em;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

/* ---------- Panels, wells, alerts ---------- */
.panel {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  box-shadow: none;
}
.panel > .panel-heading,
.panel-default > .panel-heading {
  background: transparent;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 12px 12px 0 0;
  font-weight: 600;
}
.well { border-radius: 12px; box-shadow: none; }
.alert { border-radius: var(--ui-radius); }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn-sm { border-radius: 7px; }
.btn-xs { border-radius: 6px; }
.btn:active,
.btn.active { box-shadow: none; }

/* ---------- Forms ---------- */
.form-control {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  box-shadow: none;
}
.form-control:focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-soft);
}
.control-label { font-weight: 600; }
.help-block { font-size: 12px; }

/* ---------- Tables ---------- */
.table > thead > tr > th {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--ui-line);
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 10px 12px;
  vertical-align: middle;
  border-top-color: var(--ui-line);
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
  border-color: var(--ui-line);
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tbody > tr > td { padding: 6px 8px; }
.table-hover > tbody > tr:hover { background-color: var(--ui-hover); }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: rgba(127, 127, 127, .05); }
.table-responsive { border: 0; }

/* ---------- Labels / badges ---------- */
.label {
  padding: .35em .8em;
  border-radius: 999px;
  font-size: 75%;
  font-weight: 600;
}
.badge { border-radius: 999px; font-weight: 600; }

/* ---------- Modals & dropdowns ---------- */
.modal-content {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--ui-line); }
.modal-footer { border-top: 1px solid var(--ui-line); }
.modal-title { font-weight: 600; }
.dropdown-menu {
  padding: 6px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.dropdown-menu > li > a,
.dropdown-menu .dropdown-item { border-radius: 6px; padding: 7px 12px; }

/* ---------- Sidebar ---------- */
#side-navbar { padding: 12px 10px 20px; }

@media (min-width: 992px) {
  #side-navbar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .05);
  }
  /* sidebar is col-md-2, content col-md-9: use the leftover column too */
  #side-navbar + .col-md-9 { width: 83.33333333%; }
}

#side-navbar ul.nav,
#side-navbar .sidebar-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
#side-navbar .nav-item {
  display: block;
  float: none;
  margin: 2px 0;
  list-style: none;
  background: transparent;
  border-radius: var(--ui-radius);
}

/* every row: icon tile + label (+ chevron) */
#side-navbar .nav-link {
  --tone: #546e7a;
  --tone-soft: rgba(84, 110, 123, .12);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 8px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
#side-navbar .nav-link:hover,
#side-navbar .nav-link:focus { background: var(--ui-hover); color: inherit; }
#side-navbar .nav-link:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: -2px; }
#side-navbar .nav-link-text { flex: 1; padding-left: 0; }

/* colour per menu item (matched by href / aria-controls, blade stays as is) */
#side-navbar a[href$="/home"] { --tone: #3949ab; --tone-soft: rgba(57, 73, 171, 0.12); }
#side-navbar a[aria-controls="menu-attendance"] { --tone: #00897b; --tone-soft: rgba(0, 137, 123, 0.12); }
#side-navbar a[href*="/attendances/"] { --tone: #00897b; --tone-soft: rgba(0, 137, 123, 0.12); }
#side-navbar a[href*="sections?course"] { --tone: #e37400; --tone-soft: rgba(227, 116, 0, 0.12); }
#side-navbar a[href*="/users/"][href$="/1/0"] { --tone: #1a73e8; --tone-soft: rgba(26, 115, 232, 0.12); }
#side-navbar a[href*="/users/"][href$="/0/1"] { --tone: #188038; --tone-soft: rgba(24, 128, 56, 0.12); }
#side-navbar a[aria-controls="menu-exams"] { --tone: #8e24aa; --tone-soft: rgba(142, 36, 170, 0.12); }
#side-navbar a[href*="/grades"] { --tone: #f4511e; --tone-soft: rgba(244, 81, 30, 0.12); }
#side-navbar a[aria-controls="menu-results"] { --tone: #d81b60; --tone-soft: rgba(216, 27, 96, 0.12); }
#side-navbar a[href*="/results"] { --tone: #d81b60; --tone-soft: rgba(216, 27, 96, 0.12); }
#side-navbar a[href*="/academic/routine"] { --tone: #0288d1; --tone-soft: rgba(2, 136, 209, 0.12); }
#side-navbar a[href*="/academic/syllabus"] { --tone: #5e35b1; --tone-soft: rgba(94, 53, 177, 0.12); }
#side-navbar a[href*="/academic/notice"] { --tone: #d93025; --tone-soft: rgba(217, 48, 37, 0.12); }
#side-navbar a[href*="/academic/event"] { --tone: #00acc1; --tone-soft: rgba(0, 172, 193, 0.12); }
#side-navbar a[href*="/settings"] { --tone: #546e7a; --tone-soft: rgba(84, 110, 122, 0.12); }
#side-navbar a[aria-controls="menu-gpa"] { --tone: #6d4c41; --tone-soft: rgba(109, 76, 65, 0.12); }
#side-navbar a[aria-controls="menu-fees"] { --tone: #c77700; --tone-soft: rgba(199, 119, 0, 0.12); }
#side-navbar a[aria-controls="menu-accounts"] { --tone: #0277bd; --tone-soft: rgba(2, 119, 189, 0.12); }
#side-navbar a[aria-controls="menu-library"] { --tone: #7b1fa2; --tone-soft: rgba(123, 31, 162, 0.12); }
#side-navbar a[href*="/teacher-attendance"] { --tone: #00897b; --tone-soft: rgba(0, 137, 123, 0.12); }
#side-navbar a[href*="/teacher-leaves"] { --tone: #e37400; --tone-soft: rgba(227, 116, 0, 0.12); }
#side-navbar a[href*="/student-attendance"] { --tone: #1a73e8; --tone-soft: rgba(26, 115, 232, 0.12); }
#side-navbar a[href*="/teacher-accounts"] { --tone: #5e35b1; --tone-soft: rgba(94, 53, 177, 0.12); }
#side-navbar a[aria-controls="menu-leave"] { --tone: #f4511e; --tone-soft: rgba(244, 81, 30, 0.12); }
#side-navbar a[href*="/courses/"] { --tone: #1a73e8; --tone-soft: rgba(26, 115, 232, 0.12); }
#side-navbar a[href*="/stripe/charge"] { --tone: #c77700; --tone-soft: rgba(199, 119, 0, 0.12); }
#side-navbar a[href*="/stripe/receipts"] { --tone: #00acc1; --tone-soft: rgba(0, 172, 193, 0.12); }

/* icon tile: soft tint at rest, solid colour on hover */
#side-navbar .nav-link > .material-icons:not(.nav-chevron) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 19px;
  line-height: 1;
  opacity: 1;
  transition: background-color .15s, color .15s, transform .15s;
}
#side-navbar .nav-link:hover > .material-icons:not(.nav-chevron),
#side-navbar .nav-link:focus > .material-icons:not(.nav-chevron) {
  background: var(--tone);
  color: #fff;
}

#side-navbar .nav-chevron {
  flex: none;
  font-size: 20px;
  opacity: .45;
  transition: transform .15s;
}
#side-navbar .nav-item.open > .nav-link .nav-chevron { transform: rotate(180deg); }

/* current page */
#side-navbar .nav-item.active > .nav-link {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
  font-weight: 600;
}
#side-navbar .nav-item.active > .nav-link::before {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ui-accent);
}
#side-navbar .nav-item.active > .nav-link > .material-icons:not(.nav-chevron) {
  background: var(--ui-accent);
  color: #fff;
}

/* group that contains the current page */
#side-navbar .nav-item.has-active > .nav-link { color: var(--ui-accent); font-weight: 600; }
#side-navbar .nav-item.has-active > .nav-link > .material-icons:not(.nav-chevron) {
  background: var(--tone);
  color: #fff;
}

/* sub menus: guide line under the icon tiles, dot before each label */
#side-navbar .submenu {
  display: none;
  margin: 2px 0 8px 28px;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 1px solid var(--ui-line);
}
#side-navbar .nav-item.open > .submenu { display: block; }
#side-navbar .submenu .nav-link {
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
}
#side-navbar .submenu .nav-link::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(127, 127, 127, .5);
}
#side-navbar .submenu .nav-item.active > .nav-link { font-weight: 600; }
#side-navbar .submenu .nav-item.active > .nav-link::before {
  position: static;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ui-accent);
}

/* "NEW" pill takes the colour of its menu item */
#side-navbar .nav-badge {
  background: var(--tone);
  letter-spacing: .5px;
}

#side-navbar .nav-divider {
  height: 1px;
  margin: 10px 12px;
  padding: 0;
  background: var(--ui-line);
}

/* ---------- Mobile: sidebar becomes a drawer ---------- */
.sidebar-toggle,
.sidebar-scrim { display: none; }

@media (max-width: 991px) {
  body.has-sidebar .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1040;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--ui-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  }
  #side-navbar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    width: 290px;
    max-width: 86vw;
    padding-top: 20px;
    overflow-y: auto;
    background: var(--ui-surface);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  body.sidebar-open #side-navbar {
    visibility: visible;
    transform: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    transition-delay: 0s;
  }
  body.sidebar-open .sidebar-scrim {
    display: block;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1045;
    background: rgba(0, 0, 0, .4);
  }
}

@media (prefers-reduced-motion: reduce) {
  #side-navbar,
  #side-navbar .nav-chevron,
  #side-navbar .nav-link > .material-icons,
  .btn { transition: none !important; }
}

/* ---------- Top navbar ---------- */
.navbar { margin-bottom: 20px; border-radius: 0; } /* Bootstrap ka default gap, taaki content navbar se na chipke */
.navbar-static-top { border-width: 0 0 1px; }
.navbar-brand { font-weight: 700; letter-spacing: -.01em; }

/* ---------- Role colours (body class comes from layouts/app.blade.php) ---------- */
body.role-admin      { --ui-accent: #d93025; --ui-accent-soft: rgba(217, 48, 37, .10); }
body.role-teacher    { --ui-accent: #188038; --ui-accent-soft: rgba(24, 128, 56, .10); }
body.role-student    { --ui-accent: #1967d2; --ui-accent-soft: rgba(25, 103, 210, .10); }
body.role-accountant { --ui-accent: #b06000; --ui-accent-soft: rgba(176, 96, 0, .10); }
body.role-librarian  { --ui-accent: #8e24aa; --ui-accent-soft: rgba(142, 36, 170, .10); }
body.role-master     { --ui-accent: #455a64; --ui-accent-soft: rgba(69, 90, 100, .10); }

/* ---------- Tones: one colour per item, used by chips, cards and tiles ---------- */
.tone-blue   { --tone: #1a73e8; --tone-soft: rgba(26, 115, 232, .10); }
.tone-green  { --tone: #188038; --tone-soft: rgba(24, 128, 56, .10); }
.tone-amber  { --tone: #e37400; --tone-soft: rgba(227, 116, 0, .12); }
.tone-purple { --tone: #8e24aa; --tone-soft: rgba(142, 36, 170, .10); }
.tone-red    { --tone: #d93025; --tone-soft: rgba(217, 48, 37, .10); }
.tone-teal   { --tone: #00897b; --tone-soft: rgba(0, 137, 123, .10); }

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tone);
  color: #fff;
}
.chip .material-icons { font-size: 24px; opacity: 1; color: #fff; }
.chip-sm { width: 28px; height: 28px; border-radius: 8px; }
.chip-sm .material-icons { font-size: 18px; }

/* ---------- Dashboard ---------- */
.dash-hero {
  margin: 0 0 22px;
  padding: 24px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
}
.dash-hero h1 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.dash-hero p { max-width: 62ch; margin: 0; opacity: .92; }
.dash-date { display: block; margin-top: 10px; font-size: 13px; opacity: .85; }

/* summary cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.dash-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--tone-soft);
  color: inherit;
  text-decoration: none;
}
a.dash-stat:hover,
a.dash-stat:focus { color: inherit; text-decoration: none; box-shadow: inset 0 0 0 2px var(--tone); }
.dash-stat-text { min-width: 0; }
.dash-stat-text > span { display: block; }
.dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.dash-stat-label { margin-top: 2px; font-size: 13px; opacity: .75; }

/* quick links */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  color: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}
.quick:hover,
.quick:focus {
  border-color: var(--tone);
  background: var(--tone-soft);
  color: inherit;
  text-decoration: none;
}

.dash-section { margin-bottom: 28px; }
.dash-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.dash-table {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}
.dash-table .table { margin-bottom: 0; }
.dash-table .table > thead > tr > th { border-top: 0; }
.dash-table .table > tbody > tr:last-child > td { border-bottom: 0; }

/* download lists: notices, events, routines, syllabus */
.feed {
  max-height: 320px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}
.feed > li + li { border-top: 1px solid var(--ui-line); }
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}
.feed-item:hover,
.feed-item:focus { background: var(--tone-soft, var(--ui-hover)); color: inherit; text-decoration: none; }
.feed-text { flex: 1; min-width: 0; }
.feed-text > span { display: block; }
.feed-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.feed-meta { margin-top: 2px; font-size: 12px; opacity: .65; }
.feed-item .material-icons { flex: none; font-size: 20px; color: var(--tone, currentColor); opacity: 1; }
.feed-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--ui-line);
  border-radius: 12px;
  opacity: .8;
}

/* ---------- DataTables: sort icons ko jagah do ---------- */
/* ".table > thead > th" ka padding upar sort arrows ko text par chadha deta tha */
table.dataTable.table > thead > tr > th.sorting,
table.dataTable.table > thead > tr > th.sorting_asc,
table.dataTable.table > thead > tr > th.sorting_desc,
table.dataTable.table > thead > tr > th.sorting_asc_disabled,
table.dataTable.table > thead > tr > th.sorting_desc_disabled {
  padding-right: 30px;
}

/* ---------- Table links: line sirf hover par ---------- */
.table a:not(.btn) { text-decoration: none; }
.table a:not(.btn):hover,
.table a:not(.btn):focus { text-decoration: underline; }

/* ---------- Page header + settings cards ---------- */
.page-head { margin: 0 0 24px; }
.page-head h1 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.school-meta { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 0; }
.school-meta dt { font-size: 12px; font-weight: 600; opacity: .65; }
.school-meta dd { margin: 0; font-size: 16px; font-weight: 600; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.settings-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
}
.settings-card-head { display: flex; align-items: center; gap: 12px; }
.settings-card-title { margin: 0; font-size: 15px; font-weight: 600; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-bulk {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--ui-line);
}
.settings-bulk h5 { margin: 0 0 8px; font-size: 13px; font-weight: 600; opacity: .8; }

.settings-collapse {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
}
.settings-collapse-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.class-grid .btn { width: 100%; text-align: left; }

/* ---------- Old page headings, breadcrumb ---------- */
.page-panel-title { font-weight: 700; color: inherit; letter-spacing: -.01em; }
.page-sub { margin: -6px 0 18px; opacity: .75; }
.breadcrumb {
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  font-size: 13px;
}
.breadcrumb > li > a { font-weight: 600; }

/* ---------- Form pages ---------- */
.form-card {
  max-width: 880px;
  padding: 24px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
}
.form-card-narrow { max-width: 520px; }
.form-card .form-group > label { font-size: 13px; font-weight: 600; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2px 20px;
}
.form-grid .form-group { margin-bottom: 14px; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-section-title {
  grid-column: 1 / -1;
  margin: 10px 0 6px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-line);
  font-size: 15px;
  font-weight: 600;
}
.form-grid > .form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.pw-field { position: relative; }
.pw-field .form-control { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .6;
  transform: translateY(-50%);
}
.pw-toggle:hover,
.pw-toggle:focus { opacity: 1; }
.pw-toggle .material-icons { font-size: 20px; }

/* ---------- Profile page ---------- */
.profile {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 767px) {
  .profile { grid-template-columns: 1fr; }
  .profile-side { max-width: 200px; }
}
.profile-side img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
.profile-upload { margin-top: 12px; font-size: 11px; }

.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.profile-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.profile-head .btn { margin-left: auto; }
.profile-sub { margin: 6px 0 20px; opacity: .8; }

.detail-card {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
}
.detail-card > h2 {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-hover);
  font-size: 14px;
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin: 0;
  padding: 6px 0;
}
.detail-grid > div { min-width: 0; padding: 10px 18px; }
.detail-grid .span-all { grid-column: 1 / -1; }
.detail-grid dt { margin: 0 0 2px; font-size: 12px; font-weight: 600; opacity: .6; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }

/* board exam accordion */
.panel-group .panel + .panel { margin-top: 10px; }
.panel-group .panel > .page-panel-title {
  padding: 0;
  border: 0;
  font-size: inherit;
}
.panel-group .page-panel-title > a.panel-title {
  display: block;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
}
.panel-group .page-panel-title > a.panel-title:hover { background: var(--ui-hover); }
.panel-group .page-panel-title h5 { margin: 0; font-size: 15px; font-weight: 600; }

/* ---------- Teacher attendance ---------- */
.punch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--tone-soft);
}
.punch-main { display: flex; flex: 1 1 280px; align-items: center; gap: 14px; min-width: 0; }
.punch-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.punch-sub { font-size: 13px; opacity: .8; }
.punch-side { text-align: right; }
.punch-clock {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.punch-timer { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; }
.punch-action .btn { min-width: 140px; padding: 12px 24px; border-radius: 12px; font-size: 16px; }

.month-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.month-nav strong { min-width: 110px; text-align: center; }
.month-nav .pull-right { margin-left: auto; }

.btn .material-icons { font-size: 18px; vertical-align: middle; }
.btn-lg .material-icons { font-size: 22px; }
.row-muted > td { opacity: .65; }
.nav-pills > li > a { border-radius: 999px; }
