:root {
  --bg-main: #f4f7fb;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-solid: #ffffff;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --text-muted: #94a3b8;

  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: #dbeafe;

  --success: #16a34a;
  --success-soft: #dcfce7;

  --warning: #d97706;
  --warning-soft: #fef3c7;

  --danger: #dc2626;
  --danger-soft: #fee2e2;

  --dark-1: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;

  --border-soft: rgba(148, 163, 184, 0.18);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-medium: 0 18px 40px rgba(15, 23, 42, 0.10);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  font-family: "Cairo", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 22%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.07), transparent 28%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100%;
}

body {
  margin: 0;
}

.page-shell {
  min-height: calc(100vh - 82px);
}

.bg-soft {
  background: transparent;
}

/* ===== Topbar ===== */
.topbar {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.95));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  min-height: 82px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-subtitle {
  color: rgba(255,255,255,0.58);
  font-size: 0.78rem;
  font-weight: 600;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 8px 12px;
}

.user-chip-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-chip-content {
  line-height: 1.1;
}

.user-chip-name {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.user-chip-role {
  color: rgba(255,255,255,0.65);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-logout {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== Sidebar ===== */
.app-sidebar {
  background: transparent !important;
  border-left: 0 !important;
}

.sidebar-inner {
  min-height: 100%;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-left: 1px solid rgba(226,232,240,0.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
  color: var(--primary-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sidebar-heading {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-weight: 600;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 700;
  transition: all 0.18s ease;
}

.sidebar-link:hover {
  background: var(--primary-soft);
  color: var(--primary-2);
  transform: translateX(-2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.sidebar-link.active .sidebar-link-icon {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.sidebar-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-2);
  transition: all 0.18s ease;
}

.sidebar-footer {
  border-top: 1px dashed rgba(148,163,184,0.25);
  padding-top: 18px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 18px;
  padding: 12px;
}

.sidebar-user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 700;
}

/* ===== Main ===== */
main {
  padding: 24px !important;
}

.dropdown-menu .dropdown-item {
  font-weight: 600;
}

.dropdown-menu .dropdown-item:hover {
  background: #f8fafc;
}

/* ===== Hero ===== */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 25%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #334155);
  color: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.dashboard-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px;
  flex-wrap: wrap;
}

.dashboard-hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.10);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.dashboard-hero-title {
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-hero-text {
  color: rgba(255,255,255,0.76);
  max-width: 720px;
  font-size: 0.98rem;
  line-height: 1.8;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================
   Operations Room
========================= */

.operations-room-header {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-radius: 22px;
  padding: 1.2rem 1.25rem;
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.operations-room-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.operations-room-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .7rem;
}

.operations-room-title {
  color: #fff;
  font-weight: 800;
}

.operations-room-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.operations-kpi-card {
  min-height: 118px;
}

.operations-filter-card .form-label {
  font-weight: 700;
  font-size: .88rem;
  color: #334155;
}

.operations-table-card {
  overflow: hidden;
}

.operations-table-wrap {
  overflow-x: auto;
}

.operations-table thead th {
  white-space: nowrap;
  background: #f8fafc;
  color: #475569;
  font-size: .84rem;
  font-weight: 800;
  border-bottom: 1px solid #e2e8f0;
}

.operations-name-cell .operations-name {
  font-weight: 800;
  color: #0f172a;
}

.operations-name-cell .operations-meta {
  font-size: .78rem;
  color: #64748b;
  margin-top: .25rem;
}

.operation-status-badge {
  font-size: .78rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-weight: 700;
}

.operations-status-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .65rem;
  min-width: 320px;
}

.operations-quick-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

@media (min-width: 1200px) {
  .operations-quick-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.operations-status-form .quick-status-btn,
.operations-status-form .operation-save-btn {
  white-space: nowrap;
  min-height: 38px;
  font-size: .82rem;
  font-weight: 700;
}

.operations-status-form .quick-status-btn {
  border-width: 1.5px;
}
.operations-status-form .btn-outline-secondary {
  border-color: #cbd5e1;
  color: #475569;
  background: #fff;
}

.operations-status-form .btn-outline-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}
.operations-form-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}

.operations-insights-card {
  overflow: hidden;
}

.operations-accordion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.operations-collapse-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.operations-collapse-card summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
  user-select: none;
}

.operations-collapse-card summary::-webkit-details-marker {
  display: none;
}

.operations-collapse-card[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.operations-collapse-body {
  padding: 1rem;
}

.operations-collapse-card summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: .85rem;
  color: #64748b;
  transition: transform .2s ease;
}

.operations-collapse-card[open] summary::after {
  transform: rotate(180deg);
}

@media (min-width: 1200px) {
  .operations-accordion-grid {
    grid-template-columns: 1fr 1fr;
  }
}


.operations-quick-tools .card-body {
  padding: 1rem;
}

.operations-quick-search-form {
  width: 100%;
  max-width: 460px;
}

.operations-quick-search-form .input-group-text {
  border-radius: 14px 0 0 14px;
}

.operations-quick-search-form .form-control,
.operations-quick-search-form .btn {
  min-height: 44px;
}

.operations-mobile-card .card-body {
  padding: 1rem;
}

.mobile-quick-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 991.98px) {
  .operations-quick-tools .d-flex.flex-wrap.gap-2.align-items-center.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
  }

  .operations-quick-search-form {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .mobile-quick-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .operations-mobile-card .operation-save-btn {
    min-height: 42px;
  }

  .operations-mobile-card .operation-note-input {
    min-height: 42px;
  }
}

.operations-mini-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 16px;
  margin-bottom: .75rem;
  transition: all .2s ease;
}

.operations-mini-card:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.operations-mini-card-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .operations-mini-card {
    flex-direction: column;
    align-items: stretch;
  }

  .operations-mini-card-actions {
    justify-content: flex-start;
  }
}

.operation-status-select,
.operation-note-input {
  min-height: 40px;
}

.operation-note-input {
  font-size: .88rem;
}

.operations-pagination-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  padding: 1rem;
  border-top: 1px solid #edf2f7;
  background: #fcfcfd;
}

.operations-pagination .page-link {
  border-radius: 12px !important;
  min-width: 42px;
  text-align: center;
  font-weight: 700;
  color: #334155;
  border: 1px solid #e2e8f0;
  margin-inline: .12rem;
}

.operations-pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #fff;
}

.operations-pagination .page-item.disabled .page-link {
  background: #f8fafc;
  color: #94a3b8;
}

@media (min-width: 992px) {
  .operations-form-bottom {
    grid-template-columns: 1fr 110px;
    align-items: center;
  }
}

@media (max-width: 991.98px) {
  .operations-room-actions {
    width: 100%;
  }

  .operations-room-actions .btn {
    flex: 1 1 auto;
  }

  .operations-filter-card .btn {
    min-height: 46px;
  }

  .operations-pagination-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .operations-pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: .2rem;
  }
}

@media (max-width: 767.98px) {
  .operations-room-header {
    padding: 1rem;
    border-radius: 18px;
  }

  .operations-room-title {
    font-size: 1.15rem;
  }

  .operations-kpi-card {
    min-height: 100px;
  }

  .operations-table thead {
    display: none;
  }

  .operations-table,
  .operations-table tbody,
  .operations-table tr,
  .operations-table td {
    display: block;
    width: 100%;
  }

  .operations-table tbody tr {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
  }

  .operations-table tbody tr:last-child {
    border-bottom: 0;
  }

  .operations-table td {
    padding: .45rem 0 !important;
    border: 0 !important;
    text-align: right !important;
  }

  .operations-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .76rem;
    font-weight: 800;
    color: #64748b;
    margin-bottom: .28rem;
  }

  .operations-status-form {
    min-width: 100%;
  }

  .operations-quick-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-status-form .quick-status-btn,
  .operations-status-form .operation-save-btn {
    min-height: 42px;
    font-size: .8rem;
  }

  .operations-pagination .page-link {
    min-width: 38px;
    padding: .45rem .65rem;
    font-size: .86rem;
  }
}


/* ===== Cards ===== */
.card-soft {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.card-soft .card-body {
  padding: 1.35rem;
}

.section-title {
  font-weight: 800;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
}




/* ===== Login Page ===== */
.login-side-panel {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.22), transparent 35%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #334155);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-mini-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.login-form-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.login-input-group .input-group-text {
  border-radius: 14px 0 0 14px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: #f8fafc;
  color: #475569;
}

.login-input-group .form-control {
  border-radius: 0 14px 14px 0 !important;
}

[dir="rtl"] .login-input-group .input-group-text {
  border-radius: 0 14px 14px 0;
}

[dir="rtl"] .login-input-group .form-control {
  border-radius: 14px 0 0 14px !important;
}

@media (max-width: 767.98px) {
  .login-side-panel {
    min-height: 220px;
  }
}


/* Mobile Sidebar */
.mobile-sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: .85rem 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mobile-sidebar-toggle {
  min-height: 42px;
  font-weight: 700;
}

.mobile-sidebar-user {
  text-align: left;
}

.mobile-sidebar-user-name {
  font-weight: 800;
  color: #0f172a;
  font-size: .92rem;
}

.mobile-sidebar-user-role {
  font-size: .78rem;
  color: #64748b;
}

.mobile-sidebar-offcanvas {
  width: 310px;
}

.mobile-sidebar-offcanvas .offcanvas-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1rem;
}

.mobile-sidebar-offcanvas .offcanvas-body {
  padding: 1rem;
}

.mobile-sidebar-offcanvas .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.mobile-sidebar-offcanvas .sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: 14px;
  padding: .8rem .9rem;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    display: none !important;
  }
}

/* ===== KPI / Stats Cards ===== */
.kpi {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.kpi .num {
  font-size: 1.6rem;
  font-weight: 800;
}

.kpi .label {
  color: #64748b;
  font-size: .85rem;
}

.stats-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  min-height: 178px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.stats-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -35px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
}

.stats-card-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.stats-card-success {
  background: linear-gradient(135deg, #059669, #10b981);
}

.stats-card-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.stats-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255,255,255,0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.stats-card-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255,255,255,0.86);
  margin-bottom: 8px;
}

.stats-card-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.stats-card-meta {
  margin-top: 10px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.78);
}

/* ===== Support boxes ===== */
.support-box {
  border-radius: 18px;
  padding: 18px;
  height: 100%;
  border: 1px solid transparent;
}

.support-box-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.support-box-value {
  font-size: 1.75rem;
  font-weight: 800;
}

.support-box-guaranteed {
  background: var(--success-soft);
  border-color: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.support-box-likely {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.support-box-undecided {
  background: var(--warning-soft);
  border-color: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.support-box-opposed {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

/* ===== Quick metrics ===== */
.quick-metric-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(226,232,240,0.85);
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
}

.quick-metric-item span {
  color: var(--text-soft);
}

.quick-metric-item strong {
  color: var(--text-main);
  font-size: 1rem;
}

/* ===== Buttons ===== */
.btn-rounded {
  border-radius: 14px !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  border: 0;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  transform: translateY(-1px);
}

.btn-light {
  background: #fff;
  border: 1px solid rgba(203, 213, 225, 0.75);
  color: var(--text-main);
  font-weight: 700;
}

.btn-light:hover {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.5);
}

/* ===== Tables ===== */
.table {
  margin-bottom: 0;
}

.table thead th {
  font-size: .84rem;
  color: var(--text-soft);
  font-weight: 800;
  background: #f8fafc !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  white-space: nowrap;
}

.table tbody td {
  border-color: rgba(226, 232, 240, 0.65);
  vertical-align: middle;
}

.table-hover > tbody > tr:hover {
  background: rgba(37, 99, 235, 0.035);
}

/* ===== Forms ===== */
.form-control,
.form-select {
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  padding: 0.78rem 0.95rem;
  box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.12) !important;
}

.form-label {
  font-weight: 700;
  color: var(--text-main);
}

/* ===== Badge ===== */
.badge-soft {
  background: var(--primary-soft);
  color: var(--primary-2);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.5em 0.75em;
}

.alert {
  border-radius: 16px;
  border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .sidebar-inner {
    min-height: auto !important;
    border-left: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  main {
    padding: 16px !important;
  }

  .user-chip {
    display: none;
  }

  .dashboard-hero-content {
    padding: 22px;
  }

  .dashboard-hero-title {
    font-size: 1.5rem;
  }
  
  
  /* ===== Families / Reports Enhancements ===== */

.family-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.soft-info-box {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 14px 16px;
}

.soft-info-box .title {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.soft-info-box .meta {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.8;
}

.table td .mini-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.8rem;
}

.table td .mini-stat.success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.table td .mini-stat.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.table td .mini-stat.info {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.section-subtitle strong {
  color: #0f172a;
}

.card-soft .table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.card-soft .table tbody tr:hover {
  background: rgba(59, 130, 246, 0.03);
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-note {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.8;
}

.family-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.family-summary-item {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 14px;
}

.family-summary-item .label {
  color: #64748b;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.family-summary-item .value {
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
}

.cleanup-form-box {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 18px;
}

@media (max-width: 767.98px) {
  .inline-actions {
    flex-direction: column;
  }

  .family-chip {
    width: 100%;
    justify-content: center;
  }
}
}