:root {
  --tyt-bg: #f1f4fa;
  --tyt-surface: #fff;
  --tyt-surface-raised: rgba(255, 255, 255, 0.9);
  --tyt-primary: #3159c9;
  --tyt-secondary: #60718e;
  --tyt-accent: #e9a83a;
  --tyt-success: #27936a;
  --tyt-warning: #d8951e;
  --tyt-danger: #c65353;
  --tyt-info: #3989af;
  --tyt-dark: #17243c;
  --tyt-muted: #73819a;
  --tyt-border: rgba(75, 96, 133, 0.14);
  --tyt-radius-sm: 0.6rem;
  --tyt-radius-md: 0.9rem;
  --tyt-radius-lg: 1.15rem;
  --tyt-space-1: 0.35rem;
  --tyt-space-2: 0.65rem;
  --tyt-space-3: 1rem;
  --tyt-space-4: 1.4rem;
  --tyt-shadow-soft: 0 8px 26px rgba(31, 48, 82, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --tyt-motion-fast: 140ms ease;
  --tyt-motion: 180ms ease;
  --glass-shadow: var(--tyt-shadow-soft);
}

body.app-shell {
  background:
    radial-gradient(circle at top left, rgba(31, 75, 153, 0.15), transparent 30%),
    linear-gradient(180deg, #f7fafc 0%, var(--tyt-bg) 100%);
  color: var(--tyt-dark);
}

.app-navbar {
  background: linear-gradient(90deg, #0f172a, #1f4b99);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.2);
}

.user-greeting {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 600;
}

.app-sidebar {
  min-height: calc(100vh - 56px);
}

.sidebar-card {
  position: sticky;
  top: 1rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--tyt-border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.sidebar-card .nav-link {
  border-radius: 0.75rem;
  color: #334155;
}

.sidebar-card .nav-link:hover {
  background: rgba(31, 75, 153, 0.08);
  color: var(--tyt-primary);
}

.metric-card {
  background: var(--tyt-surface);
  border: 1px solid var(--tyt-border);
  border-radius: 1rem;
  padding: 1.15rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.metric-card span {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-top: 0.35rem;
}

.dashboard-metric {
  min-height: 126px;
  border-top: 4px solid var(--tyt-primary);
}

.dashboard-metric small {
  display: block;
  margin-top: 0.45rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.metric-pending { border-top-color: #f59e0b; }
.metric-resolved { border-top-color: #16a34a; }
.metric-closed { border-top-color: #334155; }
.metric-cancelled { border-top-color: #dc2626; }

.dashboard-chart {
  height: 260px;
  position: relative;
}

.dashboard-status-list { margin-top: 1rem; }
.dashboard-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--tyt-border);
}
.status-dot { display: inline-block; width: 0.7rem; height: 0.7rem; margin-right: 0.5rem; border-radius: 50%; }

.admin-link-card {
  display: block;
  height: 100%;
  padding: 1.25rem;
  color: var(--tyt-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--tyt-border);
  border-radius: 0.95rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-link-card:hover {
  color: var(--tyt-primary);
  border-color: rgba(31, 75, 153, 0.35);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.admin-link-card strong, .admin-link-card span { display: block; }
.admin-link-card span { margin-top: 0.35rem; color: #64748b; font-size: 0.86rem; }

.chart-placeholder {
  min-height: 260px;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(31, 75, 153, 0.05), rgba(255, 183, 3, 0.05));
}

.paste-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.paste-preview .thumb {
  position: relative;
  border: 1px solid var(--tyt-border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.paste-preview img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.paste-preview button {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
}

.timeline-item {
  border: 1px solid rgba(31, 75, 153, 0.24);
  border-left: 5px solid var(--tyt-primary);
  border-radius: 0.8rem;
  background: #f8fbff;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.timeline-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid rgba(31, 75, 153, 0.14);
}

.timeline-event {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 75, 153, 0.12);
  color: var(--tyt-primary);
  font-size: 0.74rem;
  font-weight: 700;
}

.timeline-text {
  white-space: pre-wrap;
}

.ticket-filters {
  padding: 1rem;
  border: 1px solid var(--tyt-border);
  border-radius: 0.85rem;
  background: #f8fbff;
}

.ticket-history-divider {
  margin: 1.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(31, 75, 153, 0.16);
  color: #334155;
  font-weight: 700;
}

.timeline-history-item {
  border-left-color: #64748b;
  background: #fff;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.attachment-preview {
  display: block;
  max-width: 320px;
  max-height: 220px;
  border: 1px solid var(--tyt-border);
  border-radius: 0.5rem;
  object-fit: contain;
}

.card, .alert, .table, .form-control, .form-select, .form-check-input {
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.card {
  border-radius: 0.95rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.form-control, .form-select {
  background-color: #fff;
  border-radius: 0.65rem;
}

.form-control:hover, .form-select:hover {
  border-color: rgba(31, 75, 153, 0.45);
}

.user-create-card .card-body {
  padding: 1.5rem;
}

.user-create-card .form-label {
  display: block;
  margin-bottom: 0.4rem;
  white-space: nowrap;
}

.user-create-card .form-control,
.user-create-card .form-select {
  min-height: 42px;
  width: 100%;
}

.user-create-card .form-check-input {
  margin-top: 0.45rem;
}

.users-table {
  width: 100%;
  min-width: 700px;
  table-layout: fixed;
  font-size: 0.74rem;
  margin-bottom: 0;
}

.users-table th {
  white-space: nowrap;
  padding: 0.4rem 0.3rem;
}

.users-table td {
  overflow-wrap: anywhere;
  vertical-align: middle;
  padding: 0.4rem 0.3rem;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) { width: 6%; }
.users-table th:nth-child(2),
.users-table td:nth-child(2) { width: 9%; }
.users-table th:nth-child(3),
.users-table td:nth-child(3) { width: 12%; }
.users-table th:nth-child(4),
.users-table td:nth-child(4) { width: 18%; }
.users-table th:nth-child(5),
.users-table td:nth-child(5) { width: 10%; }
.users-table th:nth-child(6),
.users-table td:nth-child(6) { width: 11%; }
.users-table th:nth-child(7),
.users-table td:nth-child(7) { width: 11%; }
.users-table th:nth-child(8),
.users-table td:nth-child(8) { width: 23%; white-space: nowrap; }

.users-table td:last-child .d-flex {
  flex-wrap: nowrap;
  gap: 0.3rem !important;
}

.users-table td:last-child .btn {
  padding: 0.2rem 0.28rem;
  font-size: 0.65rem;
}

.form-check-input {
  width: 1.15em;
  height: 1.15em;
  border-radius: 0.3rem;
  background-color: #fff;
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.form-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--tyt-border);
  border-radius: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
  overflow: hidden;
}

.form-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 2.25rem 1.5rem;
  background: linear-gradient(135deg, #f8fbff, #eef4ff);
  border-bottom: 1px solid var(--tyt-border);
}

.form-panel-header h1 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
}

.form-panel-header p, .field-group small, .check-option small {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
  margin: 0;
}

.eyebrow {
  color: var(--tyt-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-id-badge {
  background: #fff;
  border: 1px solid rgba(31, 75, 153, 0.18);
  border-radius: 999px;
  color: var(--tyt-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}

.user-form { padding: 0 2.25rem 2rem; }
.form-section { padding: 1.65rem 0; border-bottom: 1px solid var(--tyt-border); }
.form-section h2 { font-size: 1rem; margin: 0 0 1.1rem; font-weight: 700; }
.field-group .form-label { color: #334155; font-size: 0.86rem; font-weight: 700; margin-bottom: 0.45rem; }
.field-group .form-control, .field-group .form-select { min-height: 48px; border-radius: 0.7rem; padding: 0.65rem 0.85rem; }
.field-group .form-control:focus, .field-group .form-select:focus { border-color: #6d95d8; box-shadow: 0 0 0 0.22rem rgba(31, 75, 153, 0.12); }
.permission-options { display: flex; flex-wrap: wrap; gap: 1rem; }
.check-option { display: flex; align-items: flex-start; gap: 0.7rem; min-width: 220px; padding: 0.9rem 1rem; background: #f8fafc; border: 1px solid var(--tyt-border); border-radius: 0.75rem; }
.check-option .form-check-input { margin-top: 0.2rem; }
.check-option strong { display: block; color: #1e293b; font-size: 0.88rem; }
.form-actions { display: flex; gap: 0.75rem; padding-top: 1.5rem; }
.form-actions .btn { min-height: 44px; border-radius: 0.7rem; font-weight: 600; }

@media (max-width: 575px) {
  .form-panel-header, .user-form { padding-left: 1.2rem; padding-right: 1.2rem; }
  .form-panel-header { flex-direction: column; }
  .form-actions { flex-direction: column; }
}

@media (max-width: 991px) {
  .app-sidebar {
    min-height: auto;
    padding-bottom: 0;
  }

  .sidebar-card {
    position: static;
  }
}

/* Glassmorphism visual refresh. Kept in CSS so every existing screen and
   interaction keeps its original markup and behavior. */
body.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 9% 4%, rgba(92, 143, 255, 0.2), transparent 34rem),
    radial-gradient(ellipse at 94% 22%, rgba(245, 185, 82, 0.16), transparent 30rem),
    linear-gradient(145deg, #f5f8fe 0%, #eaf1fb 55%, #f1f4fb 100%);
  background-attachment: fixed;
  color: var(--tyt-dark);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.app-navbar {
  min-height: 68px;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  background: linear-gradient(110deg, rgba(18, 34, 68, 0.94), rgba(40, 75, 151, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 32px rgba(23, 39, 77, 0.18);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.app-navbar .navbar-brand {
  letter-spacing: -0.035em;
  font-size: 1.12rem;
}

.app-navbar .navbar-brand::before {
  content: "";
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  margin: 0 0.58rem 0.08rem 0;
  border-radius: 0.2rem;
  background: linear-gradient(135deg, #ffd16a, #f5a623);
  box-shadow: 0 0 18px rgba(255, 193, 77, 0.65);
  transform: rotate(12deg);
}

.app-navbar .badge {
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14) !important;
  color: white !important;
  font-weight: 600;
}

.app-navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.38);
  border-radius: 0.65rem;
}

.app-sidebar { padding-top: 1.35rem !important; }

.sidebar-card,
.card,
.form-panel,
.metric-card,
.admin-link-card {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.57));
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.sidebar-card {
  top: 5.8rem;
  padding: 1rem;
  border-radius: 1.2rem;
}

.sidebar-card .nav { gap: 0.24rem !important; }

.sidebar-card .nav-link {
  padding: 0.68rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  color: #465773;
  font-size: 0.88rem;
  font-weight: 550;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-card .nav-link:hover,
.sidebar-card .nav-link:focus-visible {
  background: rgba(65, 105, 205, 0.1);
  border-color: rgba(65, 105, 205, 0.1);
  color: #284cb0;
  transform: translateX(2px);
}

main { min-width: 0; }

main > .d-flex h1,
main h1, main h2, main h3, main h4, main h5, main h6 {
  color: #1c2c49;
  letter-spacing: -0.025em;
}

main > .d-flex h1 { font-weight: 750; }

.card, .form-panel { border-radius: 1.15rem; }
.card { overflow: hidden; }
.card-body { padding: 1.35rem; }

.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover, .admin-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(36, 57, 99, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dashboard-metric { border-top-width: 3px; }
.metric-card strong { color: #1d3156; letter-spacing: -0.05em; }
.metric-card span { color: #5f6f89; font-weight: 550; }

.admin-link-card {
  padding: 1.4rem;
  border-radius: 1.05rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.admin-link-card strong { color: #213659; font-size: 1.02rem; }
.admin-link-card span { color: #62728c; line-height: 1.55; }

.btn {
  border-radius: 0.7rem;
  font-weight: 600;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  --bs-btn-bg: #3159c9;
  --bs-btn-border-color: #3159c9;
  --bs-btn-hover-bg: #274baa;
  --bs-btn-hover-border-color: #274baa;
  --bs-btn-active-bg: #23449b;
  --bs-btn-active-border-color: #23449b;
  box-shadow: 0 7px 16px rgba(49, 89, 201, 0.2);
}

.form-control, .form-select {
  min-height: 42px;
  border-color: rgba(91, 114, 156, 0.23);
  border-radius: 0.7rem;
  background-color: rgba(255, 255, 255, 0.82);
  color: #20314e;
  box-shadow: inset 0 1px 2px rgba(29, 50, 88, 0.025);
}

.form-control::placeholder { color: #99a5b8; }
.form-control:focus, .form-select:focus {
  border-color: rgba(49, 89, 201, 0.6);
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 0.23rem rgba(49, 89, 201, 0.12);
}

.form-label { color: #43536e; font-weight: 600; }

.ticket-filters, .check-option {
  border-color: rgba(91, 114, 156, 0.15);
  border-radius: 0.9rem;
  background: rgba(231, 239, 252, 0.62);
}

.table {
  --bs-table-color: #35445e;
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(78, 115, 194, 0.055);
  border-color: rgba(81, 103, 142, 0.12);
  vertical-align: middle;
}

.table thead th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  background: rgba(232, 239, 250, 0.75);
  color: #60708b;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.table-responsive { border-radius: 0.8rem; }
.pagination { gap: 0.25rem; }
.page-link { border-color: rgba(91, 114, 156, 0.17); border-radius: 0.55rem !important; color: #3159c9; }
.page-item.active .page-link { background: #3159c9; border-color: #3159c9; }

.alert {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0.9rem;
  box-shadow: 0 10px 28px rgba(36, 57, 99, 0.08);
}

.form-panel-header {
  background: linear-gradient(125deg, rgba(231, 239, 254, 0.82), rgba(255, 255, 255, 0.5));
}

.timeline-item {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(49, 89, 201, 0.2);
  border-radius: 0.95rem;
}

.timeline-history-item { background: rgba(246, 248, 252, 0.72); }

@media (max-width: 991px) {
  .sidebar-card { top: auto; }
  .sidebar-card .nav { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
}

@media (max-width: 575px) {
  main { padding: 1rem !important; }
  .app-navbar { min-height: 60px; }
  .user-greeting { display: none; }
  .card-body { padding: 1rem; }
}

@media (prefers-reduced-transparency: reduce) {
  .app-navbar { background: #1c376e; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar-card, .card, .form-panel, .metric-card, .admin-link-card {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Product polish: calm surfaces, consistent controls, and stronger hierarchy. */
.sidebar-card, .card, .form-panel, .metric-card, .admin-link-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px) saturate(112%);
  -webkit-backdrop-filter: blur(10px) saturate(112%);
}

.app-navbar {
  background: rgba(25, 44, 83, 0.96);
  box-shadow: 0 4px 18px rgba(22, 39, 73, 0.12);
}

.sidebar-card { border-color: rgba(77, 101, 149, 0.12); }
.sidebar-card .nav-link[aria-current="page"] {
  color: #294ca9;
  background: rgba(49, 89, 201, 0.1);
  border-color: rgba(49, 89, 201, 0.12);
  font-weight: 700;
}

.metric-card {
  padding: 1.15rem 1.25rem;
  border-radius: 1rem;
}

.metric-card:hover, .admin-link-card:hover {
  box-shadow: 0 12px 28px rgba(36, 57, 99, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.dashboard-metric {
  min-height: 142px;
  border-top: 0;
  border-left: 3px solid var(--tyt-primary);
}

.dashboard-metric.metric-pending { border-left-color: #d8951e; }
.dashboard-metric.metric-resolved { border-left-color: #27936a; }
.dashboard-metric.metric-closed { border-left-color: #66758d; }
.dashboard-metric.metric-cancelled { border-left-color: #c65353; }

.dashboard-metric.metric-total {
  background: linear-gradient(130deg, rgba(230, 238, 255, 0.94), rgba(255, 255, 255, 0.92));
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.metric-heading span:first-child { font-size: 0.84rem; }
.metric-symbol {
  display: grid !important;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid rgba(83, 108, 162, 0.12);
  border-radius: 0.65rem;
  background: rgba(237, 242, 251, 0.85);
  color: #526a9c !important;
  font-size: 0.95rem !important;
  font-weight: 750;
}

.metric-total .metric-symbol { background: rgba(49, 89, 201, 0.1); color: #3159c9 !important; }
.dashboard-metric strong { margin-top: 0.65rem; font-size: 2.35rem; }
.dashboard-metric small { color: #71809a; }
.dashboard-heading { padding: 0.2rem 0 0.35rem; }
.dashboard-heading .eyebrow { display: inline-block; margin-bottom: 0.3rem; }
.dashboard-page .card-body > h2 { margin-bottom: 1rem; font-weight: 700; }
.dashboard-chart { height: 230px; }
.dashboard-status-row { color: #566681; }
.dashboard-status-row strong { color: #263957; font-variant-numeric: tabular-nums; }

.btn { font-weight: 620; }
.btn:focus-visible, .page-link:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(49, 89, 201, 0.35);
  outline-offset: 2px;
  box-shadow: none;
}

.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled, .btn.disabled { transform: none; box-shadow: none; opacity: 0.58; }
.btn-outline-primary { --bs-btn-color: #3159c9; --bs-btn-border-color: rgba(49, 89, 201, 0.35); }
.btn-outline-secondary { --bs-btn-color: #53627b; --bs-btn-border-color: rgba(83, 98, 123, 0.28); }
.btn-danger {
  --bs-btn-bg: #bd4d55;
  --bs-btn-border-color: #bd4d55;
  --bs-btn-hover-bg: #a93f47;
  --bs-btn-hover-border-color: #a93f47;
}
.btn-outline-danger {
  --bs-btn-color: #b5464f;
  --bs-btn-border-color: rgba(181, 70, 79, 0.42);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #b5464f;
  --bs-btn-hover-border-color: #b5464f;
}

.form-control:disabled, .form-control[readonly], .form-select:disabled {
  background-color: #edf1f7;
  color: #7b879a;
}
.form-check-input { border-color: rgba(80, 101, 139, 0.3); }
.form-check-input:checked { background-color: #3159c9; border-color: #3159c9; }
.form-check-input:focus { border-color: #7894db; box-shadow: 0 0 0 0.2rem rgba(49, 89, 201, 0.12); }
.form-text, .text-muted { color: #66758d !important; }
.invalid-feedback, .text-danger { color: #b5464f !important; }

.table thead th { background: #f3f6fb; }
.table tbody tr { transition: background-color 140ms ease; }
.table tbody tr:hover { --bs-table-bg-state: rgba(49, 89, 201, 0.035); }
.table .badge { border: 1px solid rgba(35, 49, 73, 0.06); font-weight: 650; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(91, 114, 156, 0.2);
  border-radius: 0.6rem;
  background: #fff;
  color: #293a57;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { color: #73819a; font-size: 0.84rem; }

.timeline-item { border-left-width: 3px; box-shadow: 0 3px 12px rgba(31, 48, 82, 0.035); }
.timeline-event { background: rgba(49, 89, 201, 0.09); }
.dropdown-menu, .modal-content, .toast {
  border: 1px solid rgba(86, 108, 149, 0.15);
  border-radius: 0.9rem;
  box-shadow: 0 14px 38px rgba(31, 48, 82, 0.13);
}
.dropdown-item { border-radius: 0.45rem; transition: background-color 140ms ease, color 140ms ease; }
.dropdown-item:hover, .dropdown-item:focus { background: #eef3fc; color: #294ca9; }

@keyframes surface-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-page > .row .metric-card,
.dashboard-page > .row .card,
.dashboard-page > .card { animation: surface-arrive 220ms ease-out both; }
.dashboard-page > .row > div:nth-child(2) .metric-card { animation-delay: 25ms; }
.dashboard-page > .row > div:nth-child(3) .metric-card { animation-delay: 50ms; }
.dashboard-page > .row > div:nth-child(4) .metric-card { animation-delay: 75ms; }
.dashboard-page > .row > div:nth-child(5) .metric-card { animation-delay: 100ms; }

@media (max-width: 1199px) {
  .dashboard-metric { min-height: 132px; }
}

@media (max-width: 767px) {
  .dashboard-metric { min-height: 124px; }
  .dashboard-chart { height: 210px; }
  .dashboard-heading { align-items: flex-start !important; }
  .dashboard-heading h1 { font-size: 1.55rem; }
  .dataTables_wrapper .dataTables_filter { margin-top: 0.5rem; text-align: left; }
}

@media (max-width: 575px) {
  .user-greeting {
    display: inline-block;
    max-width: 34vw;
    margin-right: 0.45rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.75rem;
  }
  .app-navbar .badge { margin-right: 0.35rem !important; font-size: 0.68rem; }
  .app-navbar .btn { padding: 0.3rem 0.48rem; }
  .admin-link-card { padding: 1.1rem; }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar-card, .card, .form-panel, .metric-card, .admin-link-card {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-page > .row .metric-card,
  .dashboard-page > .row .card,
  .dashboard-page > .card { animation: none; }
}
