/* ────────────────────────────────────────────────────────────
   SynDex Official — Client Area Stylesheet (Dark Cyberpunk Theme)
   Matches home.html & brand-3d.css dark cyberpunk design system.
───────────────────────────────────────────────────────────── */

:root {
  /* ── Brand constants ── */
  --accent:       #ff2a4b;
  --accent-lit:   #ff6b81;
  --accent-deep:  #b71c1c;
  --accent-edge:  #7a0012;
  --accent-glow:  rgba(255, 42, 75, 0.45);
  --accent-soft:  rgba(255, 42, 75, 0.14);
  --ion:          #ff2a4b;
  --ion-deep:     #99001a;

  /* ── Semantics ── */
  --green:        #22c55e;
  --green-deep:   #16a34a;
  --green-edge:   #15803d;
  --gold:         #fbbf24;
  --gold-face:    #f59e0b;
  --red:          #ef4444;
  --red-dim:      #dc2626;
  --danger:       #ff4d6d;
  --danger-deep:  #e11d48;
  --danger-edge:  #be123c;

  /* ── Surfaces (Dark Cyberpunk Theme matching home.html) ── */
  --bg:           #070a11;
  --bg2:          #0e1628;
  --bg3:          #090e1a;
  --border:       rgba(255, 42, 75, 0.25);
  --border-sub:   rgba(255, 255, 255, 0.08);
  --border-red:   rgba(255, 42, 75, 0.35);
  --border-focus: #ff2a4b;
  --text:         #f1f5f9;
  --muted:        #94a3b8;
  --faint:        #64748b;

  /* ── 3D & ambient ingredients ── */
  --slab-hi:      #121b30;
  --slab-lo:      #0b1120;
  --edge-soft:    #1e293b;
  --rim:          rgba(255, 255, 255, 0.08);
  --btn-rim:      rgba(255, 255, 255, 0.25);
  --well-shade:   rgba(0, 0, 0, 0.45);
  --ambient:      rgba(0, 0, 0, 0.55);
  --contact:      rgba(0, 0, 0, 0.85);

  /* ── Type & motion ── */
  --font-head:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', monospace;
  --ease:         cubic-bezier(.2, .8, .2, 1);
  --r-sm:         10px;
  --r-md:         14px;
  --r-lg:         20px;
  --shadow:       0 10px 30px -10px rgba(0, 0, 0, 0.7);
  color-scheme:   dark;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Auth splash */
.auth-splash {
  position: fixed; inset: 0;
  background:
    radial-gradient(760px 420px at 50% -10%, rgba(225, 29, 72, 0.14), transparent 68%),
    radial-gradient(900px 500px at 50% 110%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .4s ease, visibility .4s ease;
}
.auth-splash.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.splash-content { text-align: center; }
.splash-logo {
  width: 68px; height: 68px; object-fit: contain; margin-bottom: 18px;
  filter: drop-shadow(0 8px 24px rgba(255, 42, 75, 0.45));
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
.splash-spinner {
  width: 32px; height: 32px; border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .75s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ── CLIENT AUTH WRAP (LOGIN & REGISTER) ── */
.client-auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
  background-color: #070a11;
  background-image:
    radial-gradient(1000px 560px at 8% -10%, rgba(225, 29, 72, 0.20), transparent 62%),
    radial-gradient(820px 480px at 96% 2%, rgba(225, 29, 72, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 112%, rgba(225, 29, 72, 0.10), transparent 66%),
    linear-gradient(180deg, #05080f 0%, #070a11 38%, #06090f 100%);
  background-attachment: fixed;
}
.client-auth-bg {
  display: none;
}

.client-auth-card {
  position: relative;
  background: linear-gradient(180deg, #141722 0%, #0a0c12 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  padding: 38px 34px; width: 100%; max-width: 420px;
  box-shadow:
    0 24px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 35px -10px rgba(255, 42, 75, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.client-auth-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, transparent 6%, #ff2a4b 34%, #ff6b81 72%, transparent 96%);
  opacity: .8;
}
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
  font-weight: 700; text-decoration: none; margin-bottom: 22px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px -5px rgba(0, 0, 0, 0.5);
  transition: all .16s ease;
}
.auth-back:hover {
  color: #ff2a4b;
  border-color: rgba(255, 42, 75, 0.4);
  transform: translateY(-1.5px);
  background: rgba(255, 42, 75, 0.08);
}
.auth-back:active { transform: translateY(1px); }
.auth-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.auth-logo-img {
  width: 38px; height: 38px; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(225, 29, 72, 0.35));
}
.auth-brand { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #ffffff; }
.auth-brand em {
  font-style: normal;
  background: linear-gradient(96deg, #ff2a4b, #ff2a4b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff2a4b;
}
.auth-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── TABS ── */
.auth-tabs {
  display: flex; gap: 8px; margin-bottom: 24px; padding: 5px;
  border: 1px solid rgba(255, 42, 75, 0.25);
  border-radius: 999px;
  background: #060a13;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  transition: all .16s ease;
}
.auth-tab:hover:not(.active) {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}
.auth-tab:active { transform: translateY(1px); }
.auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #b71c1c 0%, #7a0012 100%);
  font-weight: 800;
  box-shadow: 0 4px 14px -3px rgba(255, 42, 75, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.form-grp { margin-bottom: 16px; }
.form-grp label {
  display: block; font-size: 11.5px; font-weight: 700;
  color: #94a3b8; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}

/* ── ENGRAVED INPUTS ── */
.auth-input, .uid-input {
  width: 100%;
  background: #060a13;
  border: 1.5px solid rgba(255, 42, 75, 0.25);
  border-radius: var(--r-md);
  padding: 12px 16px; color: #f8fafc; font-family: var(--font-body);
  font-size: 14px; transition: border-color .2s, background-color .2s, box-shadow .2s; outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}
.auth-input:focus, .uid-input:focus {
  background: #080d1a;
  border-color: #ff2a4b;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(255, 42, 75, 0.18),
    0 0 15px rgba(255, 42, 75, 0.25);
}
.auth-input::placeholder, .uid-input::placeholder { color: #475569; }

/* ── SUBMIT BUTTON ── */
.auth-submit {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #b71c1c 0%, #7a0012 100%);
  border: 1px solid rgba(255, 42, 75, 0.45);
  color: #fff; font-weight: 800;
  font-family: var(--font-body); font-size: 14.5px;
  padding: 13px 20px; border-radius: var(--r-md); cursor: pointer; margin-top: 8px;
  text-decoration: none;
  transition: all .16s ease;
  box-shadow:
    0 4px 16px -3px rgba(255, 42, 75, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.auth-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #be123c 0%, #b71c1c 100%);
  box-shadow: 0 6px 22px -3px rgba(255, 42, 75, 0.7), 0 0 20px rgba(255, 42, 75, 0.3);
}
.auth-submit:active {
  transform: translateY(1px);
}
.auth-submit:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
}

.auth-msg {
  padding: 12px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.auth-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left-width: 3px;
  color: #f87171;
}
.auth-msg.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-left-width: 3px;
  color: #4ade80;
}
.auth-switch { font-size: 13px; color: var(--muted); text-align: center; margin-top: 16px; }
.auth-switch a { color: #ff2a4b; cursor: pointer; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; color: #ff2a4b; }
.auth-footer-note { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 24px; font-weight: 600; }

/* ── CLIENT DASHBOARD MAIN PAGE ── */
.client-page {
  background-color: #070a11;
  background-image:
    radial-gradient(1000px 560px at 8% -10%, rgba(225, 29, 72, 0.20), transparent 62%),
    radial-gradient(820px 480px at 96% 2%, rgba(225, 29, 72, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 112%, rgba(225, 29, 72, 0.10), transparent 66%),
    linear-gradient(180deg, #05080f 0%, #070a11 38%, #06090f 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #f1f5f9;
  position: relative;
}
.client-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(1100px 720px at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(1100px 720px at 50% 0%, #000 20%, transparent 78%);
}

.client-dashboard { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* Notice */
.client-notice {
  display: flex; align-items: center; gap: 12px; padding: 10px 24px;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 13.5px; font-weight: 700;
}
.notice-icon { font-size: 16px; display: inline-flex; }
.client-notice.hidden { display: none; }
.notice-close-btn {
  margin-left: auto;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  cursor: pointer; font-size: 18px; line-height: 1;
  width: 28px; height: 26px; border-radius: 8px;
  transition: all .14s ease;
}
.notice-close-btn:hover { color: #f87171; border-color: rgba(239, 68, 68, 0.4); }

/* Header */
.client-header {
  background: rgba(7, 10, 17, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.7);
}
.client-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.client-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #ffffff; }
.client-nav-logo-img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(225, 29, 72, 0.35)); }
.client-nav-logo span { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.client-nav-logo em {
  font-style: normal;
  background: linear-gradient(96deg, #ff2a4b, #ff2a4b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff2a4b;
}
.client-header-right { display: flex; align-items: center; gap: 14px; }
.client-user-info { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #b71c1c 0%, #7a0012 100%);
  color: #ffffff;
  border: 1px solid rgba(225, 29, 72, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 42, 75, 0.4);
}
.client-display-name { font-size: 13.5px; font-weight: 700; line-height: 1.2; color: #f8fafc; }
.client-role-tag { font-size: 10.5px; color: #ff2a4b; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* Logout Button */
.btn-logout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px;
  cursor: pointer;
  transition: all .16s ease;
}
.btn-logout:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  transform: translateY(-1px);
}
.btn-logout:active { transform: translateY(1px); }

/* Main */
.client-main { flex: 1; padding: 32px 24px; }
.client-container { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* ── UID CARD (CYBERPUNK SLAB) ── */
.uid-card {
  position: relative;
  background: linear-gradient(180deg, #0d1527 0%, #090e1a 100%);
  border: 1px solid rgba(255, 42, 75, 0.25);
  border-radius: var(--r-lg);
  padding: 26px; overflow: hidden;
  box-shadow:
    0 10px 30px -12px rgba(0, 0, 0, 0.7),
    0 0 24px -10px rgba(255, 255, 255, 0.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}
.uid-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, #ff2a4b 34%, #ff2a4b 72%, transparent 95%);
  opacity: .7;
}
.uid-card:hover {
  border-color: rgba(255, 42, 75, 0.45);
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px -12px rgba(0, 0, 0, 0.85),
    0 0 28px -6px rgba(255, 42, 75, 0.28);
}
.uid-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px;
}
.uid-card-title {
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px;
  color: #f8fafc;
}
.uid-card-sub { font-size: 13px; color: var(--muted); margin: 0; }

/* Status Badges */
.uid-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px; padding: 4px 12px;
  border-radius: 999px; text-transform: uppercase; white-space: nowrap;
  border: 1px solid;
}
.uid-badge-none {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #94a3b8;
}
.uid-badge-active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}
.uid-badge-expired {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Secondary Action Button (btn-remove-uid) */
.btn-remove-uid {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ff2a4b;
  font-size: 13.5px; font-weight: 700; padding: 8px 18px; border-radius: 999px;
  cursor: pointer; font-family: var(--font-body);
  transition: all .16s ease;
}
.btn-remove-uid:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ff2a4b;
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-remove-uid:active { transform: translateY(1px); }
.btn-remove-uid:disabled {
  opacity: .45; cursor: not-allowed; transform: none;
}

/* Primary Button (btn-add-uid) */
.btn-add-uid {
  background: linear-gradient(135deg, #b71c1c 0%, #7a0012 100%);
  color: #fff; border: 1px solid rgba(255, 42, 75, 0.45);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 800; padding: 10px 22px; border-radius: 999px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow:
    0 4px 16px -3px rgba(255, 42, 75, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all .16s ease;
}
.btn-add-uid:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #be123c 0%, #b71c1c 100%);
  box-shadow:
    0 6px 20px -3px rgba(255, 42, 75, 0.65),
    0 0 20px rgba(255, 42, 75, 0.3);
}
.btn-add-uid:active { transform: translateY(1px); }
.btn-add-uid:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
}

.btn-add-uid.gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

.uid-msg {
  padding: 12px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.uid-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left-width: 3px;
  color: #f87171;
}
.uid-msg.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-left-width: 3px;
  color: #4ade80;
}
.uid-form-row { display: flex; gap: 10px; align-items: center; }
.uid-info-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

@media (max-width: 600px) {
  .uid-form-row { flex-direction: column; }
  .uid-card-header { flex-direction: column; gap: 12px; }
  .client-header-inner { padding: 0 16px; }
  .client-main { padding: 20px 14px; }
}
