/* =========================================================================
   ASSI Technologies — Liquid Glass Design System
   Shared by the customer portal and the admin portal.
   ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* ---- Brand gradient (matches the ASSI Technologies logo) ---- */
  --brand-blue: #12a5eb;
  --brand-violet: #0b70c2;
  --brand-cyan: #4fc3f7;
  --brand-gradient: linear-gradient(135deg, #22c3fb 0%, #12a5eb 45%, #0b70c2 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(34,195,251,.25) 0%, rgba(18,165,235,.22) 45%, rgba(11,112,194,.2) 100%);

  /* ---- Surface / background ---- */
  --bg-0: #05060f;
  --bg-1: #090c1c;
  --bg-2: #0d1128;
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-blur: 22px;

  /* ---- Text ---- */
  --text-0: #f5f7ff;
  --text-1: #c7cce0;
  --text-2: #8d93b0;
  --text-3: #5f6484;

  /* ---- Status ---- */
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.14);
  --neutral: #94a3c4;
  --neutral-bg: rgba(148, 163, 196, 0.14);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.14);

  /* ---- Elevation ---- */
  --shadow-sm: 0 2px 10px rgba(2, 4, 16, 0.35);
  --shadow-md: 0 12px 32px rgba(2, 4, 16, 0.45);
  --shadow-lg: 0 24px 64px rgba(2, 4, 16, 0.55);
  --glow-blue: 0 0 0 1px rgba(18, 165, 235, 0.25), 0 0 24px rgba(18, 165, 235, 0.18);
  --glow-violet: 0 0 0 1px rgba(11, 112, 194, 0.25), 0 0 24px rgba(11, 112, 194, 0.18);

  /* ---- Radii / spacing ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --sidebar-w: 264px;
  --topbar-h: 72px;

  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  color-scheme: dark;
}

/* ------------------------------- Reset ------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-0);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(18, 165, 235, 0.35); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Guarantee the native [hidden] attribute always wins, even over classes
   (e.g. .domain-card, .service-card) that set their own `display: flex` —
   those share the same specificity as the UA [hidden] rule and, being
   author styles, would otherwise take precedence and silently no-op it. */
[hidden] { display: none !important; }

/* ------------------------------ Backdrop ------------------------------ */

.app-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 800px at 12% -10%, rgba(18, 165, 235, 0.20), transparent 55%),
    radial-gradient(1000px 700px at 110% 10%, rgba(11, 112, 194, 0.18), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(34, 195, 251, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}
.app-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

/* -------------------------------- Utility ------------------------------ */

.container { max-width: 1360px; margin: 0 auto; padding: 0 28px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; min-width: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.grid { display: grid; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------- Glass card ---------------------------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}
.glass--strong { background: var(--glass-bg-strong); border-color: var(--glass-border-strong); }

.card {
  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-strong);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

.card--glow { position: relative; }
.card--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--brand-gradient);
  opacity: 0.55;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card__title { font-size: 1rem; font-weight: 600; }
.card__eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); font-weight: 600; }

/* ---------------------------------- Buttons ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--brand-gradient);
  color: #04050c;
  box-shadow: 0 8px 24px rgba(18, 165, 235, 0.35);
}
.btn--primary:hover { box-shadow: 0 10px 30px rgba(11, 112, 194, 0.45); }

.btn--ghost {
  background: rgba(255,255,255,0.05);
  border-color: var(--glass-border);
  color: var(--text-0);
}
.btn--ghost:hover { background: rgba(255,255,255,0.09); border-color: var(--glass-border-strong); }

.btn--danger { background: rgba(251,113,133,0.16); border-color: rgba(251,113,133,0.4); color: #ffd7dd; }
.btn--danger:hover { background: rgba(251,113,133,0.26); }

.btn--sm { padding: 7px 14px; font-size: 0.78rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  transition: all 0.2s ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-0); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------------------------- Badges -------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge--info { background: var(--info-bg); color: var(--info); }

/* ---------------------------------- Forms --------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 0.8rem; font-weight: 600; color: var(--text-1); }
.field .hint { font-size: 0.74rem; color: var(--text-3); }
.input, .select, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.045);
  color: var(--text-0);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: rgba(18, 165, 235, 0.6);
  box-shadow: 0 0 0 3px rgba(18, 165, 235, 0.15);
}
.input::placeholder { color: var(--text-3); }
.select { appearance: none; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238d93b0" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>'); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

/* The open dropdown list is native/OS-rendered and can't use a translucent
   glass background (no backdrop-filter support), so give it a solid dark
   panel color instead of the browser's default white. */
select, .select { color-scheme: dark; }
select option, .select option {
  background-color: var(--bg-2);
  color: var(--text-0);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--brand-blue); }

/* ---------------------------------- Tables -------------------------------- */

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--glass-border); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table thead th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  font-weight: 600;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
  color: var(--text-1);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.035); }
.data-table .cell-strong { color: var(--text-0); font-weight: 600; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* -------------------------------- Modals / Toasts ------------------------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(3, 4, 12, 0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-overlay.is-visible { opacity: 1; }
.modal-glass {
  width: 100%; max-width: 520px;
  background: linear-gradient(180deg, rgba(20,22,44,0.95), rgba(12,13,28,0.97));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
  max-height: 88vh;
  display: flex; flex-direction: column;
}
.modal-overlay.is-visible .modal-glass { transform: translateY(0) scale(1); }
.modal--lg { max-width: 720px; }
.modal--sm { max-width: 400px; }
.modal-glass__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--glass-border); }
.modal-glass__header h3 { font-size: 1.05rem; }
.modal-glass__body { padding: 22px 24px; overflow-y: auto; }
.modal-glass__footer { padding: 16px 24px; border-top: 1px solid var(--glass-border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-message { color: var(--text-1); line-height: 1.6; font-size: 0.9rem; }

#toast-stack { position: fixed; top: 20px; right: 20px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(18, 20, 40, 0.92);
  border: 1px solid var(--glass-border-strong);
  border-radius: 13px;
  padding: 13px 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  transform: translateX(24px); opacity: 0;
  transition: all 0.25s ease;
}
.toast.is-visible { transform: translateX(0); opacity: 1; }
.toast__icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--info); }
.toast__icon svg { width: 100%; height: 100%; }
.toast__msg { font-size: 0.83rem; color: var(--text-0); flex: 1; line-height: 1.4; }
.toast__close { background: none; border: none; color: var(--text-3); font-size: 1.1rem; line-height: 1; }

/* ---------------------------------- Misc states ---------------------------- */

.empty-state { text-align: center; padding: 46px 20px; color: var(--text-2); }
.empty-state__icon { font-size: 2.2rem; margin-bottom: 12px; }
.empty-state h4 { color: var(--text-0); margin-bottom: 6px; font-size: 1rem; }
.empty-state p { font-size: 0.85rem; max-width: 360px; margin: 0 auto; }

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: skeleton-wave 1.5s ease infinite;
  margin-bottom: 10px;
}
@keyframes skeleton-wave { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.progress-ring__bg { stroke: rgba(255,255,255,0.08); }
.progress-ring__fg { stroke: url(#ring-gradient); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.progress-ring__label { font-size: 15px; font-weight: 700; fill: var(--text-0); font-family: var(--font-display); }

.progress-bar { height: 9px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-bar__fill { height: 100%; border-radius: inherit; background: var(--brand-gradient); transition: width 0.6s ease; }
.progress-bar__fill.tone-warning { background: linear-gradient(90deg, #fbbf24, #fb923c); }
.progress-bar__fill.tone-danger { background: linear-gradient(90deg, #fb7185, #ef4444); }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.18);
  border-top-color: var(--brand-blue);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider { height: 1px; background: var(--glass-border); border: none; margin: 18px 0; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-gradient); color: #0b0d1e;
  font-weight: 700; font-size: 0.82rem;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}

/* ------------------------------- Fade / animations -------------------------- */

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.45s ease both; }
.stagger > * { animation: fadeInUp 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.17s; }
.stagger > *:nth-child(5) { animation-delay: 0.22s; }
.stagger > *:nth-child(6) { animation-delay: 0.27s; }

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
}
