/* ─────────────────────────────────────────────────────────────────────────
   CLIENT PORTAL — Main Stylesheet
   ───────────────────────────────────────────────────────────────────────── */

/* ── Design Tokens ── */
:root {
  --color-bg: #0b0f1a;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-h: rgba(255, 255, 255, 0.08);
  --color-border: rgba(255, 255, 255, 0.10);
  --color-border-h: rgba(255, 255, 255, 0.20);

  --color-text: #e8eaf0;
  --color-text-muted: #8892a4;
  --color-text-faint: #4e5668;

  --color-accent: #4f8ef7;
  --color-accent-h: #6fa4ff;
  --color-accent-glow: rgba(79, 142, 247, 0.35);

  --color-success: #2dce89;
  --color-danger: #f5365c;
  --color-warning: #fb8c00;

  --color-admin: #c77dff;
  --color-client: #4f8ef7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--color-accent-glow);

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ── Animated Background Orbs ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 18s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.18) 0%, transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(199, 125, 255, 0.14) 0%, transparent 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(45, 206, 137, 0.08) 0%, transparent 70%);
  animation-delay: -12s;
}

@keyframes drift {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ── Page Wrapper ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo-area {
  flex-shrink: 0;
}

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--color-accent-glow));
  transition: filter var(--transition);
}

.logo-img:hover {
  filter: drop-shadow(0 0 20px var(--color-accent-glow)) brightness(1.1);
}

.logo-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px dashed var(--color-border-h);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.logo-ph-icon {
  font-size: 20px;
}

/* Header Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.nav-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.dot-admin {
  background: var(--color-admin);
  box-shadow: 0 0 6px var(--color-admin);
}

.dot-client {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(199, 125, 255, 0.15);
  color: var(--color-admin);
  border: 1px solid rgba(199, 125, 255, 0.3);
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
  background: var(--color-surface-h);
  border-color: var(--color-border-h);
}

.nav-logout {
  color: rgba(245, 54, 92, 0.8);
  border-color: rgba(245, 54, 92, 0.2);
}

.nav-logout:hover {
  color: var(--color-danger);
  background: rgba(245, 54, 92, 0.1);
  border-color: rgba(245, 54, 92, 0.35);
}

/* ── Flash Messages ── */
.flash-container {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  width: calc(100% - 48px);
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: slideIn 0.3s ease-out;
  box-shadow: var(--shadow-card);
}

.flash-success {
  background: rgba(45, 206, 137, 0.12);
  border: 1px solid rgba(45, 206, 137, 0.3);
  color: #2dce89;
}

.flash-error {
  background: rgba(245, 54, 92, 0.12);
  border: 1px solid rgba(245, 54, 92, 0.3);
  color: var(--color-danger);
}

.flash-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.flash-close {
  margin-left: auto;
  font-size: 18px;
  opacity: 0.6;
  transition: opacity var(--transition);
  line-height: 1;
}

.flash-close:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.highlight {
  background: linear-gradient(90deg, var(--color-accent), var(--color-admin));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

/* ── Lucide Icons ── */
.icon-inline {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ── Login Section ── */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 48px 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 0 16px var(--color-accent-glow));
  animation: float 3s ease-in-out infinite;
}

.login-icon svg {
  width: 52px;
  height: 52px;
  stroke: var(--color-accent);
  stroke-width: 1.5;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(245, 54, 92, 0.1);
  border: 1px solid rgba(245, 54, 92, 0.3);
  color: var(--color-danger);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: shake 0.4s ease-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* ── Forms ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--color-text-faint);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 400;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--color-text-faint);
}

.form-input:focus {
  border-color: var(--color-accent);
  background: rgba(79, 142, 247, 0.06);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.form-select {
  cursor: pointer;
}

.form-select option {
  background: #1a2035;
}

.input-toggle {
  position: absolute;
  right: 12px;
  font-size: 16px;
  color: var(--color-text-muted);
  transition: color var(--transition);
  padding: 4px;
}

.input-toggle:hover {
  color: var(--color-text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 142, 247, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

.btn-ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface-h);
  color: var(--color-text);
  border-color: var(--color-border-h);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-edit {
  background: rgba(79, 142, 247, 0.1);
  border-color: rgba(79, 142, 247, 0.25);
  color: var(--color-accent);
}

.btn-edit:hover {
  background: rgba(79, 142, 247, 0.2);
  border-color: rgba(79, 142, 247, 0.5);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(245, 54, 92, 0.1);
  border-color: rgba(245, 54, 92, 0.25);
  color: var(--color-danger);
}

.btn-danger:hover {
  background: rgba(245, 54, 92, 0.2);
  border-color: rgba(245, 54, 92, 0.5);
  transform: translateY(-1px);
}

.btn-disabled {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-faint);
  cursor: not-allowed;
}

.btn-spinner {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Dashboard / Service Cards ── */
.dashboard-section {
  padding-bottom: 24px;
}

.no-services-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.no-services-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  stroke: var(--color-text-faint);
  stroke-width: 1.5;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  gap: 16px;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-xl);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-gradient, linear-gradient(135deg, var(--color-accent), #6366f1));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-card), 0 0 60px rgba(79, 142, 247, 0.2);
  border-color: var(--color-border-h);
}

.service-card:hover::before {
  opacity: 0.08;
}

.service-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.service-card:hover .service-card-glow {
  opacity: 1;
}

.service-icon {
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-icon svg {
  width: 56px;
  height: 56px;
  stroke: var(--card-color, var(--color-accent));
  stroke-width: 1.5;
  fill: none;
}

.service-card:hover .service-icon {
  transform: scale(1.15) rotate(-5deg);
}

.service-info {
  flex: 1;
}

.service-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--color-text);
}

.service-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.service-arrow {
  font-size: 22px;
  color: var(--color-text-muted);
  align-self: flex-end;
  transition: transform var(--transition), color var(--transition);
}

.service-card:hover .service-arrow {
  transform: translate(4px, -4px);
  color: var(--color-text);
}

/* ── Admin Section ── */
.admin-section {
  margin-bottom: 24px;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 120px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--color-accent), var(--color-admin));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Admin two-column layout */
.admin-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar form */
.form-card {
  padding: 28px;
  position: sticky;
  top: 88px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}

.form-card .form-group {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Table card */
.table-card {
  padding: 28px;
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  max-width: 240px;
  padding: 9px 14px 9px 14px;
}

.table-responsive {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.users-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.user-row {
  transition: background var(--transition);
}

.user-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.user-row:last-child td {
  border-bottom: none;
}

.row-self {
  background: rgba(79, 142, 247, 0.04);
}

.td-id {
  color: var(--color-text-faint);
  font-size: 12px;
  width: 48px;
}

.td-username {
  font-weight: 600;
}

.username-text {
  margin-right: 6px;
}

.badge-you {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 100px;
  background: rgba(79, 142, 247, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(79, 142, 247, 0.3);
}

.badge-admin {
  background: rgba(199, 125, 255, 0.12);
  color: var(--color-admin);
  border-color: rgba(199, 125, 255, 0.3);
}

.badge-client {
  background: rgba(79, 142, 247, 0.12);
  color: var(--color-client);
  border-color: rgba(79, 142, 247, 0.3);
}

.td-role {
  white-space: nowrap;
}

.td-actions {
  white-space: nowrap;
}

.td-actions .btn+.btn,
.td-actions .btn+.inline-form,
.td-actions .inline-form+.btn,
.td-actions .inline-form+.inline-form {
  margin-left: 6px;
}

.td-empty {
  text-align: center;
  color: var(--color-text-faint);
  padding: 40px;
  font-style: italic;
}

.text-right {
  text-align: right;
}

.inline-form {
  display: inline;
}

/* ── Service checklist (admin form) ── */
.services-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.service-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  position: relative;
}

.service-check-item:hover {
  border-color: var(--color-border-h);
  background: rgba(255, 255, 255, 0.06);
}

/* Hide the native checkbox */
.service-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-check-icon {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--transition);
}

.service-check-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.service-check-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  flex-shrink: 0;
  color: transparent;
  transition: all var(--transition);
}

/* Checked state */
.service-checkbox:checked+.service-check-icon {
  color: var(--color-accent);
}

.service-checkbox:checked~.service-check-name {
  color: var(--color-text);
}

.service-checkbox:checked~.service-check-tick {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(79, 142, 247, 0.4);
}

.service-check-item:has(.service-checkbox:checked) {
  border-color: rgba(79, 142, 247, 0.4);
  background: rgba(79, 142, 247, 0.06);
}

/* ── Service pills in table ── */
.td-services {
  max-width: 220px;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(79, 142, 247, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(79, 142, 247, 0.25);
  margin: 2px 2px 2px 0;
  white-space: nowrap;
}

.services-all-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  background: linear-gradient(90deg, rgba(79, 142, 247, .15), rgba(199, 125, 255, .15));
  color: var(--color-admin);
  border: 1px solid rgba(199, 125, 255, 0.3);
}

.services-none-badge {
  font-size: 11px;
  color: var(--color-text-faint);
  font-style: italic;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-border);
  background: rgba(11, 15, 26, 0.5);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .form-card {
    position: static;
  }

  .admin-sidebar {
    order: -1;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
    height: 64px;
  }

  .main-content {
    padding: 32px 16px;
  }

  .login-card {
    padding: 32px 24px;
  }

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

  .service-card {
    padding: 28px 24px;
  }

  .stats-bar {
    gap: 10px;
  }

  .stat-card {
    padding: 16px 10px;
    min-width: 80px;
  }

  .stat-num {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-input {
    max-width: 100%;
    width: 100%;
  }

  /* Hide ID column on small screens */
  .td-id,
  .users-table th:first-child {
    display: none;
  }

  /* Compact action buttons — icon only */
  .td-actions .btn-label {
    display: none;
  }

  /* Also hide service pill names on very small screens */
  .td-services .btn-label {
    display: none;
  }

  /* Hide services column on tiny screens for even more breathing room */
  .td-services,
  .users-table th:nth-child(4) {
    display: none;
  }

  .btn-sm {
    padding: 7px 10px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-user {
    font-size: 12px;
  }

  .flash-container {
    right: 16px;
    width: calc(100% - 32px);
  }

  .section-title {
    font-size: 26px;
  }

  .table-card,
  .form-card {
    padding: 20px 16px;
  }
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Focus visible ── */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}