:root {
  --navy: #16335b;
  --navy-dark: #0f2544;
  --blue: #2b72b8;
  --blue-hover: #215a93;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --cover-bg: #e8f0f8;
  --border: #dbe3ee;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --green: #15803d;
  --green-bg: #dcfce7;
  --orange: #d97706;
  --orange-bg: #fef3c7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --info-blue: #0369a1;
  --info-bg: #e0f2fe;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* TOPBAR */
.navbar {
  background-color: var(--navy);
  color: #ffffff;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.nav-inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff;
  text-decoration: none;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.nav-btn:hover,
.nav-btn.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* APP SHELL & SIDEBAR */
.app-shell {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.app-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-header {
  padding: 0 8px 10px;
  border-bottom: 1px solid #eef2f7;
}

.sidebar-role-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 12px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.15s ease;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.sidebar-link.active {
  background: var(--cover-bg);
  color: var(--navy);
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}

.sidebar-logout {
  color: var(--red);
}

.sidebar-logout:hover {
  background: var(--red-bg);
  color: var(--red);
}

.main-workspace {
  flex: 1;
  min-width: 0;
  padding: 28px 24px 44px;
}

.page-container {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

/* PAGE HEADER */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-header-row h1 {
  color: var(--navy);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s ease;
}

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--blue-hover);
}

.btn-outline {
  background-color: #ffffff;
  color: var(--navy);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
  background-color: #f8fbff;
}

.btn-white {
  background-color: #ffffff;
  color: var(--navy);
}

.btn-white:hover {
  background-color: #f1f5f9;
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background-color: var(--red);
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

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

.btn-success:hover:not(:disabled) {
  background-color: #166534;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 0.76rem;
}

.btn-full {
  width: 100%;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* KPI CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.kpi-dot-navy { background: var(--navy); }
.kpi-dot-green { background: var(--green); }
.kpi-dot-blue { background: var(--blue); }
.kpi-dot-orange { background: var(--orange); }
.kpi-dot-red { background: var(--red); }

.kpi-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 6px 0 2px;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* PANELS & CHARTS */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.panel-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.charts-grid .panel-card {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
}

.chart-container {
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-footnote {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.demo-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--orange-bg);
  color: var(--orange);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.traffic-layout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 18px;
  flex-wrap: wrap;
}

.traffic-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
}

.traffic-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
}

.traffic-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.traffic-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* QUICK ACTIONS */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-action-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: 0.15s ease;
  font-family: inherit;
}

.quick-action-btn:hover {
  border-color: var(--blue);
  background: var(--cover-bg);
}

.qa-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}

.qa-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* SEARCH & FILTER BAR */
.filter-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
}

.filter-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.result-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* BOOK CARDS */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.book-card-top {
  display: flex;
  gap: 14px;
}

.book-cover-box {
  width: 84px;
  height: 116px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  padding: 8px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.book-cover-code {
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.book-cover-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 4px;
}

.book-info {
  min-width: 0;
  flex: 1;
}

.book-info h4 {
  color: var(--navy);
  font-size: 1.02rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.book-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.category-chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cover-bg);
  color: var(--navy);
  margin-top: 4px;
}

.book-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.stock-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stock-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* BOOK DETAILS */
.detail-layout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.detail-cover {
  width: 210px;
  height: 286px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(150deg, var(--navy), var(--blue));
  flex-shrink: 0;
}

.detail-cover-code {
  font-size: 2.3rem;
  font-weight: 700;
}

.detail-cover-cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
  margin-top: 8px;
}

.detail-info {
  flex: 1;
  min-width: 260px;
}

.detail-info h2 {
  color: var(--navy);
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.spec-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.spec-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2px;
}

.availability-banner {
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.9rem;
}

.availability-banner.is-available {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #86efac;
}

.availability-banner.is-out {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fca5a5;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* TABLES & BADGES */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.panel-card .table-wrapper {
  box-shadow: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: var(--navy);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 12px 14px;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-borrowed,
.badge-member {
  background: var(--info-bg);
  color: var(--info-blue);
}

.badge-returned,
.badge-active,
.badge-available {
  background: var(--green-bg);
  color: var(--green);
}

.badge-overdue {
  background: var(--orange-bg);
  color: var(--orange);
}

.badge-inactive,
.badge-out {
  background: var(--red-bg);
  color: var(--red);
}

.badge-admin {
  background: #ede9fe;
  color: #5b21b6;
}

/* AUTH CARDS */
.auth-card {
  max-width: 440px;
  margin: 24px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.auth-card-wide {
  max-width: 580px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--navy);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
}

.auth-card h2 {
  color: var(--navy);
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.form-group {
  margin-top: 14px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 68px;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-card .btn-full {
  margin-top: 20px;
}

.demo-credentials {
  margin-top: 18px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.demo-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.demo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* ALERTS & STATES */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  margin: 12px 0;
}

.alert-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fca5a5;
}

.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #86efac;
}

.status-banner {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--info-bg);
  color: var(--info-blue);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* MODALS */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-header h2 {
  color: var(--navy);
  font-size: 1.2rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.detail-kv-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.detail-kv-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.detail-kv-key {
  color: var(--text-muted);
  font-weight: 600;
}

.detail-kv-val {
  color: var(--navy);
  font-weight: 500;
  text-align: right;
}

/* TOAST & FOOTER */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  z-index: 100;
  max-width: 380px;
}

.toast.toast-error {
  background: var(--red);
}

.toast.toast-success {
  background: var(--green);
}

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.auth-switch-muted {
  margin-top: 8px;
  font-size: 0.84rem;
}

/* OUR TEAM PAGE */
.team-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e4780 60%, var(--blue) 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 40px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.team-hero-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.team-hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.team-hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: #dbeafe;
  margin-bottom: 12px;
}

.team-hero-desc {
  max-width: 760px;
  font-size: 0.94rem;
  color: #e2e8f0;
  line-height: 1.65;
}

.team-section {
  margin-bottom: 36px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 700;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.team-photo-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--cover-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.team-avatar-box {
  width: 100%;
  padding: 28px 18px;
  background: linear-gradient(145deg, #eef4fc 0%, #e0ecfa 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-avatar-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(22, 51, 91, 0.18);
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.team-role-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--cover-bg);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.team-name {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.team-meta {
  font-size: 0.83rem;
  color: var(--text-muted);
  word-break: break-word;
}

.team-meta strong {
  color: var(--text-dark);
}

.team-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 6px;
}

.contributions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contribution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.contribution-card h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contribution-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.api-notice-card {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mobile-only {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 45;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mobile-only {
    display: inline-flex;
  }

  .nav-inner {
    padding: 0 14px;
  }

  .user-badge {
    display: none;
  }

  .app-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .main-workspace {
    padding: 20px 14px 36px;
  }

  .kpi-grid,
  .quick-actions-grid,
  .form-row,
  .team-grid,
  .contributions-grid {
    grid-template-columns: 1fr;
  }

  .team-hero {
    padding: 28px 20px;
  }

  .team-hero h1 {
    font-size: 1.65rem;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .detail-layout {
    padding: 18px;
  }

  .detail-cover {
    width: 100%;
    max-width: 240px;
    height: 220px;
  }
}
