/* ===== Flutter Design System — ASW School Management ===== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --primary: #1B83FE;
  --primary-dark: #001C41;
  --sidebar-bg: #11152B;
  --scaffold-bg: #F8F8F9;
  --card-bg: #FFFFFF;
  --hint-color: #979797;
  --hint-15: rgba(151,151,151,0.15);
  --hint-25: rgba(151,151,151,0.25);
  --error: #E84D4F;
  --gold: #FDA401;
  --purple: #7D64FF;
  --green: #30C28D;
  --light-blue: #4CACE9;

  --font-family: 'Open Sans', sans-serif;
  --sidebar-width: 265px;
  --header-height: 70px;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  --radius-pill: 40px;

  --shadow-card: 0 0 1px 1px rgba(151,151,151,0.25);
  --shadow-btn: 0 3px 0 0 #001C41;
  --shadow-web: 1px 1px 5px rgba(27,131,254,0.12);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 14px; }

body {
  font-family: var(--font-family);
  background: var(--scaffold-bg);
  color: #333;
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #1565c0; }

/* ── Layout Shell ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 100;
  transition: width 0.25s ease, min-width 0.25s ease;
}

.app-sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.sidebar-logo {
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img {
  height: 45px;
  object-fit: contain;
}

.sidebar-logo .logo-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-search {
  padding: 12px 15px;
}

.sidebar-search input {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 0 15px 0 38px;
  font-size: 13px;
  outline: none;
  transition: background 0.2s;
}

.sidebar-search input::placeholder { color: rgba(255,255,255,0.4); }
.sidebar-search input:focus { background: rgba(255,255,255,0.18); }

.sidebar-search-wrap {
  position: relative;
}

.sidebar-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  pointer-events: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px 0;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nav-section-title {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 600;
  padding: 12px 15px 6px;
}

.sidebar-item {
  padding: 2px 10px;
}

.sidebar-item > .sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-item > .sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-item > .sidebar-link.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.sidebar-item > .sidebar-link .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-item > .sidebar-link .nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item > .sidebar-link .nav-arrow {
  font-size: 12px;
  transition: transform 0.25s;
  flex-shrink: 0;
}

.sidebar-item.open > .sidebar-link .nav-arrow {
  transform: rotate(90deg);
}

/* Child items */
.sidebar-children {
  padding-left: 20px;
  display: none;
}

.sidebar-item.open > .sidebar-children {
  display: block;
}

.sidebar-child-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-child-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sidebar-child-link.active {
  color: var(--primary);
  font-weight: 600;
}

.sidebar-child-link .child-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 15px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-footer a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ── Main Content Area ── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Header ── */
.app-header {
  height: var(--header-height);
  background: var(--card-bg);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: var(--shadow-card);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: background 0.2s;
}

.hamburger-btn:hover { background: #f0f0f0; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-dropdown {
  position: relative;
}

.header-dropdown select {
  height: 38px;
  border: 0.5px solid var(--hint-color);
  border-radius: var(--radius-sm);
  padding: 0 30px 0 12px;
  font-size: 13px;
  color: #444;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23979797' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 150px;
}

.header-dropdown select:focus { outline: none; border-color: var(--primary); }

.header-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #555;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}

.header-icon-btn:hover { background: #f0f0f0; }

.header-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: transparent;
}

.header-profile:hover { background: #f0f0f0; }

.header-profile .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.header-profile .profile-name {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

/* ── Content ── */
.app-content {
  flex: 1;
  padding: 20px 25px;
  max-width: 1170px;
  width: 100%;
  margin: 0 auto;
}

/* ── Footer ── */
.app-footer {
  padding: 15px 25px;
  text-align: center;
  font-size: 12px;
  color: var(--hint-color);
  border-top: 1px solid #eee;
}

/* ── Cards (Bootstrap .card override) ── */
.card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #eee;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.card-header .card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.card-header .card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: transparent;
  border-top: 1px solid #eee;
  padding: 15px 20px;
  border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
}

/* ── Tables ── */
.table-responsive {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow-x: auto;
}

.table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: rgba(27,131,254,0.12);
  color: #444;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 12px 15px;
  border: none;
  white-space: nowrap;
}

.table thead th:first-child {
  border-radius: 0;
}

.table thead th:last-child {
  border-radius: 0;
}

.table tbody tr {
  transition: background 0.15s;
}

.table tbody tr:hover {
  background: rgba(27,131,254,0.04);
}

.table tbody td {
  padding: 10px 15px;
  border-top: 0.25px solid rgba(151,151,151,0.3);
  vertical-align: middle;
  font-size: 13px;
  color: #444;
}

.table tbody tr:first-child td {
  border-top: none;
}

/* ── Buttons ── */
.btn {
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: all 0.2s;
  cursor: pointer;
  line-height: 1;
}

.btn:focus { box-shadow: none; outline: none; }

.btn-sm {
  height: 30px;
  font-size: 12px;
  padding: 0 10px;
}

.btn-lg {
  height: 44px;
  font-size: 15px;
  padding: 0 24px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: #1578e6; }

.btn-secondary {
  background: #e9ecef;
  color: #555;
}

.btn-secondary:hover { background: #dee2e6; }

.btn-info {
  background: rgba(27,131,254,0.1);
  color: var(--primary);
}

.btn-info:hover { background: rgba(27,131,254,0.18); }

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover { background: #d04042; }

.btn-success {
  background: var(--green);
  color: #fff;
}

.btn-warning {
  background: var(--gold);
  color: #fff;
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--hint-color);
  color: #666;
}

.btn-outline-secondary:hover { background: #f5f5f5; }

/* ── Form Controls ── */
.form-control {
  height: 38px;
  border: 0.5px solid rgba(151,151,151,0.4);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  color: #444;
  background: #fff;
  transition: border-color 0.2s;
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: none;
  outline: none;
}

.form-control::placeholder { color: var(--hint-color); }

.form-control[type="file"] {
  padding: 6px 12px;
  height: auto;
}

select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23979797' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  padding-right: 30px;
}

textarea.form-control {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.form-group { margin-bottom: 15px; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
  display: block;
}

.form-text { font-size: 12px; color: var(--hint-color); }

/* ── Badges ── */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.badge.bg-success { background: rgba(48,194,141,0.15) !important; color: #1a8a5e; }
.badge.bg-danger { background: rgba(232,77,79,0.15) !important; color: var(--error); }
.badge.bg-warning { background: rgba(253,164,1,0.15) !important; color: #b87a00; }
.badge.bg-info { background: rgba(27,131,254,0.15) !important; color: var(--primary); }
.badge.bg-primary { background: var(--primary) !important; color: #fff; }
.badge.bg-secondary { background: #e9ecef !important; color: #666; }

/* ── Alerts ── */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
}

.alert-dismissible .btn-close {
  font-size: 14px;
  padding: 14px;
}

.alert-success { background: rgba(48,194,141,0.12); color: #1a8a5e; }
.alert-danger { background: rgba(232,77,79,0.12); color: var(--error); }
.alert-info { background: rgba(27,131,254,0.12); color: var(--primary); }
.alert-warning { background: rgba(253,164,1,0.12); color: #b87a00; }

/* ── Dashboard ── */
.dashboard-welcome h1 {
  font-size: 24px;
  font-weight: 600;
  color: #222;
  margin: 0 0 4px 0;
}

.dashboard-welcome p {
  font-size: 14px;
  color: var(--hint-color);
  margin: 0 0 20px 0;
}

.summary-card {
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
  min-height: 100px;
}

.summary-card .summary-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.summary-card .summary-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.summary-card .summary-info p {
  font-size: 13px;
  margin: 4px 0 0 0;
  opacity: 0.85;
}

.summary-card.card-sidebar { background: var(--sidebar-bg); }
.summary-card.card-green { background: var(--green); }
.summary-card.card-blue { background: var(--light-blue); }
.summary-card.card-primary { background: var(--primary); }
.summary-card.card-gold { background: var(--gold); }
.summary-card.card-purple { background: var(--purple); }

/* ── Dropdown Menus (Bootstrap override) ── */
.dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 180px;
}

.dropdown-item {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #444;
}

.dropdown-item:hover { background: #f5f7fa; }
.dropdown-item.text-danger:hover { background: rgba(232,77,79,0.08); }
.dropdown-divider { margin: 4px 0; border-color: #eee; }

/* ── Pagination ── */
.pagination {
  gap: 4px;
}

.page-link {
  border: none;
  border-radius: 6px !important;
  padding: 8px 14px;
  font-size: 13px;
  color: #555;
  background: transparent;
  transition: all 0.15s;
}

.page-link:hover { background: #f0f0f0; color: #333; }

.page-item.active .page-link {
  background: var(--primary);
  color: #fff;
}

.page-item.disabled .page-link { color: #ccc; pointer-events: none; }

/* ── Modal ── */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid #eee;
  padding: 16px 20px;
}

.modal-header .modal-title { font-size: 16px; font-weight: 600; }
.modal-header .btn-close { font-size: 14px; }

.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid #eee; padding: 12px 20px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .app-sidebar.collapsed {
    transform: translateX(0);
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
  }

  .sidebar-overlay.show { display: block; }

  .app-header {
    padding: 0 15px;
  }

  .app-content {
    padding: 15px;
  }

  .header-right > .header-dropdown { display: none; }

  .header-right > .header-dropdown.mobile-show { display: block; }
}

/* ── Utility ── */
.text-muted { color: var(--hint-color) !important; }
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--error) !important; }
.text-success { color: var(--green) !important; }
.text-warning { color: var(--gold) !important; }

.bg-primary { background: var(--primary) !important; }
.bg-success { background: var(--green) !important; }
.bg-danger { background: var(--error) !important; }
.bg-warning { background: var(--gold) !important; }
.bg-info { background: var(--light-blue) !important; }

.overflow-auto { overflow: auto; }

/* ── Small-box (AdminLTE compatibility for dashboard cards) ── */
.small-box {
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.small-box .inner {
  padding: 20px;
}

.small-box .inner h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.small-box .inner p {
  font-size: 13px;
  margin: 4px 0 0 0;
  opacity: 0.85;
}

.small-box .icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 48px;
  opacity: 0.2;
  color: #fff;
}

.small-box .small-box-footer {
  display: block;
  padding: 8px 20px;
  background: rgba(0,0,0,0.1);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.small-box .small-box-footer:hover { background: rgba(0,0,0,0.15); }

.small-box.bg-info { background: var(--sidebar-bg) !important; }
.small-box.bg-success { background: var(--green) !important; }
.small-box.bg-warning { background: var(--light-blue) !important; }
.small-box.bg-danger { background: var(--primary) !important; }

/* ── Image Upload Box ── */
.img-upload-box {
  position: relative;
  overflow: hidden;
  border: 1px dashed rgba(151,151,151,0.4);
  border-radius: var(--radius-sm);
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  transition: border-color 0.2s;
}

.img-upload-box:hover { border-color: var(--primary); }

.img-upload-box:hover .upload-overlay { opacity: 1; }

.img-upload-box img { width: 100%; height: 100%; object-fit: cover; }

.img-upload-box .upload-placeholder {
  font-size: 12px;
  color: var(--hint-color);
  text-align: center;
  padding: 8px;
}

.img-upload-box .upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

/* ── Nav tabs ── */
.nav-tabs {
  border-bottom: 1px solid #eee;
  gap: 0;
}

.nav-tabs .nav-link {
  border: none;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #777;
  transition: all 0.2s;
  position: relative;
}

.nav-tabs .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s;
}

.nav-tabs .nav-link:hover { color: #444; }

.nav-tabs .nav-link.active {
  color: var(--primary);
  background: transparent;
}

.nav-tabs .nav-link.active::after { width: 60%; }

/* ── Grid gap utility ── */
.g-3 { gap: 1rem !important; }

/* ── Bordered table ── */
.table-bordered {
  border: 0.25px solid rgba(151,151,151,0.25);
}

.table-bordered thead th,
.table-bordered tbody td {
  border: 0.25px solid rgba(151,151,151,0.25);
}

/* ── Colored card headers ── */
.card-primary > .card-header { background: rgba(27,131,254,0.08); border-bottom-color: rgba(27,131,254,0.15); }
.card-info > .card-header { background: rgba(76,172,233,0.08); border-bottom-color: rgba(76,172,233,0.15); }
.card-success > .card-header { background: rgba(48,194,141,0.08); border-bottom-color: rgba(48,194,141,0.15); }
.card-warning > .card-header { background: rgba(253,164,1,0.08); border-bottom-color: rgba(253,164,1,0.15); }
.card-danger > .card-header { background: rgba(232,77,79,0.08); border-bottom-color: rgba(232,77,79,0.15); }

.card-primary > .card-header .card-title { color: var(--primary); }
.card-info > .card-header .card-title { color: var(--light-blue); }
.card-success > .card-header .card-title { color: var(--green); }
.card-warning > .card-header .card-title { color: var(--gold); }
.card-danger > .card-header .card-title { color: var(--error); }

/* ── Input group ── */
.input-group-text {
  background: #f8f9fa;
  border: 0.5px solid rgba(151,151,151,0.4);
  color: var(--hint-color);
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.input-group > .form-control:not(:first-child) { border-left: none; }
.input-group > .form-control:not(:last-child) { border-right: none; }
.input-group:focus-within .input-group-text { border-color: var(--primary); }

/* ── List group ── */
.list-group {
  border-radius: var(--radius-md);
  border: none;
}

.list-group-item {
  border: 0.25px solid rgba(151,151,151,0.2);
  padding: 12px 16px;
  font-size: 13px;
  color: #444;
  background: var(--card-bg);
}

.list-group-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.list-group-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }

/* ── Button group ── */
.btn-group { gap: 4px; }
.btn-group > .btn { border-radius: var(--radius-sm) !important; }

/* ── Button block ── */
.btn-block { width: 100%; display: flex; justify-content: center; }

/* ── Form check ── */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  font-size: 13px;
  color: #555;
}

/* ── Table-sm ── */
.table-sm thead th { padding: 8px 10px; font-size: 11px; }
.table-sm tbody td { padding: 6px 10px; font-size: 12px; }

/* ── Responsive tables already in Bootstrap, ensure Flutter font ── */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Label standalone (not in .form-group) ── */
label:not(.form-check-label):not(.form-label) {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
  display: block;
}

/* ── Form-label (Bootstrap) ── */
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
}

/* ── Print styles ── */
@media print {
  .app-sidebar, .app-header, .app-footer, .sidebar-overlay,
  .no-print, .btn, .card-tools, .hamburger-btn { display: none !important; }
  .app-content { max-width: 100%; padding: 0; margin: 0; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ── Image inside card body explicit height fix ── */
.card-body img { max-width: 100%; height: auto; }

/* ── Figure (for result card preview) ── */
figure { margin: 0; }
