/* Semantic colour layer on top of NeoTech chrome. Grey stays chrome; colour is meaning. */

body.admin-neotech {
  --brand-500: var(--neo-accent, #2563eb);
  --brand-600: var(--neo-accent-hover, #1d4ed8);
  --brand-50: var(--neo-accent-soft, rgba(37, 99, 235, 0.12));

  --hue-success-500: #16a34a;
  --hue-success-100: rgba(22, 163, 74, 0.14);
  --hue-success-700: #166534;

  --hue-warning-500: #ea580c;
  --hue-warning-100: rgba(234, 88, 12, 0.14);
  --hue-warning-700: #9a3412;

  --hue-danger-500: #dc2626;
  --hue-danger-100: rgba(220, 38, 38, 0.14);
  --hue-danger-700: #991b1b;

  --hue-info-500: var(--neo-tertiary, #0d9488);
  --hue-info-100: var(--neo-tertiary-soft, rgba(13, 148, 136, 0.14));
  --hue-info-700: var(--neo-tertiary-hover, #0f766e);

  --hue-purple-500: var(--neo-secondary, #7c3aed);
  --hue-purple-100: var(--neo-secondary-soft, rgba(124, 58, 237, 0.14));
  --hue-purple-700: var(--neo-secondary-hover, #6d28d9);

  --hue-teal-500: var(--neo-tertiary, #0d9488);
  --hue-teal-100: var(--neo-tertiary-soft, rgba(13, 148, 136, 0.14));
  --hue-teal-700: var(--neo-tertiary-hover, #0f766e);

  --chart-1: var(--neo-accent);
  --chart-2: var(--neo-secondary);
  --chart-3: var(--neo-tertiary);
  --chart-4: color-mix(in srgb, var(--neo-accent) 58%, var(--neo-secondary));
  --chart-5: color-mix(in srgb, var(--neo-secondary) 58%, var(--neo-tertiary));
  --chart-6: color-mix(in srgb, var(--neo-tertiary) 58%, var(--neo-accent));
  --chart-7: color-mix(in srgb, var(--neo-accent) 70%, #ffffff);
  --chart-8: color-mix(in srgb, var(--neo-secondary) 55%, #0f172a);

  font-family: "Tajawal", "Cairo", sans-serif;
  font-weight: 700;
}

body.admin-neotech.dark-layout {
  --brand-50: var(--neo-accent-soft, rgba(96, 165, 250, 0.18));

  --hue-success-500: #4ade80;
  --hue-success-100: rgba(74, 222, 128, 0.16);
  --hue-success-700: #bbf7d0;

  --hue-warning-500: #fb923c;
  --hue-warning-100: rgba(251, 146, 60, 0.16);
  --hue-warning-700: #fed7aa;

  --hue-danger-500: #f87171;
  --hue-danger-100: rgba(248, 113, 113, 0.16);
  --hue-danger-700: #fecaca;

  --hue-info-500: var(--neo-tertiary, #2dd4bf);
  --hue-info-100: var(--neo-tertiary-soft, rgba(45, 212, 191, 0.16));
  --hue-info-700: var(--neo-tertiary-hover, #5eead4);

  --hue-purple-500: var(--neo-secondary, #a78bfa);
  --hue-purple-100: var(--neo-secondary-soft, rgba(167, 139, 250, 0.16));
  --hue-purple-700: var(--neo-secondary-hover, #c4b5fd);

  --hue-teal-500: var(--neo-tertiary, #2dd4bf);
  --hue-teal-100: var(--neo-tertiary-soft, rgba(45, 212, 191, 0.16));
  --hue-teal-700: var(--neo-tertiary-hover, #99f6e4);
}

body.admin-neotech h1,
body.admin-neotech h2,
body.admin-neotech h3,
body.admin-neotech h4,
body.admin-neotech h5,
body.admin-neotech .saas-kpi-value,
body.admin-neotech .neo-stat-value {
  font-weight: 800;
  font-family: "Tajawal", "Cairo", sans-serif;
}

.tint-success { background: var(--hue-success-100); color: var(--hue-success-700); }
.tint-warning { background: var(--hue-warning-100); color: var(--hue-warning-700); }
.tint-danger { background: var(--hue-danger-100); color: var(--hue-danger-700); }
.tint-info { background: var(--hue-info-100); color: var(--hue-info-700); }
.tint-purple { background: var(--hue-purple-100); color: var(--hue-purple-700); }
.tint-teal { background: var(--hue-teal-100); color: var(--hue-teal-700); }
.tint-primary { background: var(--neo-accent-soft, var(--brand-50)); color: var(--neo-accent-hover, var(--brand-600)); }
.tint-secondary { background: var(--neo-secondary-soft); color: var(--neo-secondary-hover); }
.tint-tertiary { background: var(--neo-tertiary-soft); color: var(--neo-tertiary-hover); }
.tint-muted { background: var(--neo-surface-2); color: var(--neo-muted); }

.neo-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.neo-status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.neo-stat-card {
  display: block;
  background: var(--neo-surface);
  border: 1px solid var(--neo-border);
  border-radius: var(--neo-radius);
  box-shadow: var(--neo-card-shadow);
  padding: 1rem 1.1rem;
  color: inherit;
  min-height: 132px;
}

a.neo-stat-card:hover {
  border-color: var(--brand-500);
  text-decoration: none;
  color: inherit;
}

.neo-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.neo-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--neo-text);
  opacity: 0.78;
}

body.admin-neotech.dark-layout .neo-stat-label {
  color: var(--neo-muted);
  opacity: 1;
}

.neo-stat-value {
  font-size: 1.55rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--neo-text);
}

.neo-stat-delta {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.neo-page-header h1 {
  font-size: 1.55rem;
  margin: 0.15rem 0 0;
}

.neo-alert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.neo-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.neo-range-pills .btn {
  border-radius: 999px !important;
  font-weight: 600;
}

body.admin-neotech .table td,
body.admin-neotech .table th {
  font-variant-numeric: tabular-nums;
  text-align: center !important;
}

body.admin-neotech .table thead th {
  background: var(--neo-surface-2) !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

body.admin-neotech .table tbody tr:hover {
  transform: none !important;
  background: var(--neo-surface-2) !important;
}

body.admin-neotech .table-responsive {
  overflow-x: auto;
}

.neo-profile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.neo-profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.4rem;
  padding: 1.2rem 1.4rem;
  background: var(--neo-surface);
  border: 1px solid var(--neo-border);
  border-radius: var(--neo-radius);
  box-shadow: var(--neo-card-shadow);
  position: relative;
  overflow: hidden;
}

.neo-profile-hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--neo-accent), var(--neo-tertiary));
}

.neo-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid var(--neo-surface-2);
  background: var(--neo-surface-2);
  flex-shrink: 0;
}

.neo-profile-meta {
  min-width: 0;
  flex: 1;
}

.neo-profile-meta h2 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
}

.neo-profile-contact {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  color: var(--neo-muted);
  font-size: .9rem;
}

.neo-profile-contact span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.neo-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}

.neo-show-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .4rem;
  background: var(--neo-surface);
  border: 1px solid var(--neo-border);
  border-radius: var(--neo-radius);
  box-shadow: var(--neo-card-shadow);
}

.neo-show-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .45rem .95rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--neo-muted);
  text-decoration: none !important;
  line-height: 1.2;
}

.neo-show-tab i {
  font-size: 1rem;
}

.neo-show-tab:hover {
  color: var(--neo-text);
  background: var(--neo-surface-2);
}

.neo-show-tab.active {
  background: var(--neo-accent);
  color: #fff;
}

.neo-show-tab.active:hover {
  background: var(--neo-accent-hover);
  color: #fff;
}

.neo-show-tab-count {
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  padding: 0 .35rem;
  background: color-mix(in srgb, currentColor 16%, transparent);
}

.neo-detail-card .card-header {
  border-bottom: 1px solid var(--neo-border);
  background: transparent;
  padding: 1rem 1.25rem .85rem;
}

.neo-detail-card .card-header h4,
.neo-detail-card .card-header h5 {
  margin: 0;
  font-size: 1rem;
}

.neo-empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--neo-muted);
}

.neo-empty-state i {
  font-size: 2rem;
  display: block;
  margin-bottom: .65rem;
  opacity: .7;
}

.neo-doc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .85rem;
  border: 1px solid var(--neo-border);
  border-radius: 12px;
  background: var(--neo-surface-2);
  height: 100%;
}

.neo-doc-tile img {
  max-height: 120px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.neo-presence-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
}

.neo-presence-dot.is-online {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .18);
}

body.admin-neotech.dark-layout .neo-profile-hero::before {
  opacity: .9;
}
