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

/* ── Root variables ── */
:root {
  --payloop:   #7C6EF5;
  --timeloop:  #34C759;
  --cashbooks: #FF9F0A;
  --expenses:  #FF453A;
  --advisor:   #0A84FF;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  background: #0a0a0f;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Ambient background ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0a0a0f;
  overflow: hidden;
  pointer-events: none;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite;
}
.bg-orb-1 { width:600px;height:600px;top:-200px;left:-150px;background:radial-gradient(circle,#7C6EF5,#5856D6 60%,transparent);animation-delay:0s; }
.bg-orb-2 { width:500px;height:500px;top:-100px;right:-100px;background:radial-gradient(circle,rgba(52,199,89,0.5),transparent);animation-delay:-6s; }
.bg-orb-3 { width:400px;height:400px;bottom:-100px;right:200px;background:radial-gradient(circle,rgba(255,159,10,0.4),transparent);animation-delay:-12s; }
.bg-orb-4 { width:300px;height:300px;bottom:100px;left:100px;background:radial-gradient(circle,rgba(255,69,58,0.3),transparent);animation-delay:-4s; }
@keyframes drift {
  0%,100% { transform:translate(0,0) scale(1); }
  33%  { transform:translate(30px,-40px) scale(1.05); }
  66%  { transform:translate(-20px,20px) scale(0.97); }
}

/* ── Nav ── */
nav.portal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 52px;
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-brand {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
  text-decoration: none;
}
.nav-brand .pay { color: #fff; }
.nav-brand .loop { color: var(--payloop); }
.nav-brand .suite { color: rgba(255,255,255,0.35); font-size: 13px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: -0.1px;
  transition: color 0.15s;
}
.nav-links a:hover { color: rgba(255,255,255,0.85); }
.nav-links a.active { color: rgba(255,255,255,0.85); font-weight: 500; }
.nav-org { font-size: 13px; color: rgba(255,255,255,0.3); }
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--payloop), #AF52DE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-logout {
  font-size: 13px;
  color: rgba(255,255,255,0.35) !important;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: all 0.15s !important;
}
.btn-logout:hover {
  color: rgba(255,255,255,0.7) !important;
  border-color: rgba(255,255,255,0.2);
}

/* ── Main layout ── */
.portal-main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ── Page header ── */
.page-header { margin-bottom: 36px; }
.header-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--timeloop);
  box-shadow: 0 0 0 0 rgba(52,199,89,0.4);
  animation: liveRing 2s ease-in-out infinite;
}
@keyframes liveRing {
  0%  { box-shadow: 0 0 0 0 rgba(52,199,89,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(52,199,89,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,199,89,0); }
}
.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.2px;
  line-height: 1.05;
}
.header-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.header-sub-org {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  letter-spacing: -0.2px;
}
.industry-chip {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px 9px;
  border-radius: 20px;
}

/* ── Subscription status bar ── */
.sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  gap: 12px;
  flex-wrap: wrap;
}
.sub-bar.sub-active   { background:rgba(52,199,89,0.07);border:1px solid rgba(52,199,89,0.15); }
.sub-bar.sub-probationary { background:rgba(234,179,8,0.07);border:1px solid rgba(234,179,8,0.18); }
.sub-bar.sub-locked   { background:rgba(255,69,58,0.07);border:1px solid rgba(255,69,58,0.2); }
.sub-bar.sub-none     { background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.08); }
.sub-bar-left { display:flex;align-items:center;gap:10px; }
.sub-bar-dot  { width:7px;height:7px;border-radius:50%; }
.sub-bar.sub-active   .sub-bar-dot { background:var(--timeloop);box-shadow:0 0 8px rgba(52,199,89,0.6); }
.sub-bar.sub-probationary .sub-bar-dot { background:#FBBF24;box-shadow:0 0 8px rgba(251,191,36,0.5); }
.sub-bar.sub-locked   .sub-bar-dot { background:#FF453A;box-shadow:0 0 8px rgba(255,69,58,0.5); }
.sub-bar.sub-none     .sub-bar-dot { background:rgba(255,255,255,0.2); }
.sub-bar-text { font-size:13px;font-weight:500;letter-spacing:-0.2px; }
.sub-bar.sub-active   .sub-bar-text { color:rgba(255,255,255,0.8); }
.sub-bar.sub-probationary .sub-bar-text { color:#FCD34D; }
.sub-bar.sub-locked   .sub-bar-text { color:#FF6961; }
.sub-bar.sub-none     .sub-bar-text { color:rgba(255,255,255,0.5); }
.sub-bar-text em { font-style:normal;color:rgba(255,255,255,0.3);font-weight:400; }
.sub-bar-link { font-size:12px;color:rgba(255,255,255,0.3);text-decoration:none;transition:color 0.15s;letter-spacing:-0.1px; }
.sub-bar-link:hover { color:rgba(255,255,255,0.6); }

/* ── Alert ── */
.alert { border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background:rgba(52,199,89,0.1);border:1px solid rgba(52,199,89,0.2);color:#30d158; }
.alert-error   { background:rgba(255,69,58,0.1);border:1px solid rgba(255,69,58,0.2);color:#FF6961; }
.suspended-banner { background:rgba(255,69,58,0.12);border:1px solid rgba(255,69,58,0.25);border-radius:12px;padding:12px 18px;font-size:13px;color:#FF6961;margin-bottom:20px; }
.suspended-banner a { color:#FF6961; }

/* ── Product grid ── */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── Glass card ── */
.tile {
  position: relative;
  border-radius: 24px;
  padding: 28px 28px 26px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.3s ease;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.07) inset, 0 -1px 0 0 rgba(0,0,0,0.3) inset, 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
  animation: fadeUp 0.6s ease both;
}
.tile:nth-child(1) { animation-delay:0.05s; }
.tile:nth-child(2) { animation-delay:0.10s; }
.tile:nth-child(3) { animation-delay:0.15s; }
.tile:nth-child(4) { animation-delay:0.20s; }
@keyframes fadeUp {
  from { opacity:0;transform:translateY(20px); }
  to   { opacity:1;transform:translateY(0); }
}
.tile:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.10) inset, 0 -1px 0 0 rgba(0,0,0,0.3) inset, 0 20px 60px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
}
/* Shimmer line */
.tile::before {
  content:'';
  position:absolute;
  top:0;left:16px;right:16px;
  height:1px;border-radius:1px;
  opacity:0.6;transition:opacity 0.3s;
}
.tile:hover::before { opacity:1; }
/* Per-product shimmer + glow */
.tile-payloop::before   { background:linear-gradient(90deg,transparent,var(--payloop),transparent); }
.tile-timeloop::before  { background:linear-gradient(90deg,transparent,var(--timeloop),transparent); }
.tile-cashbooks::before { background:linear-gradient(90deg,transparent,var(--cashbooks),transparent); }
.tile-expenses::before  { background:linear-gradient(90deg,transparent,var(--expenses),transparent); }

.tile-glow {
  position:absolute;inset:0;border-radius:24px;opacity:0;transition:opacity 0.4s;pointer-events:none;
}
.tile:hover .tile-glow { opacity:1; }
.tile-payloop   .tile-glow { background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(124,110,245,0.18),transparent); }
.tile-timeloop  .tile-glow { background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(52,199,89,0.14),transparent); }
.tile-cashbooks .tile-glow { background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(255,159,10,0.14),transparent); }
.tile-expenses  .tile-glow { background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(255,69,58,0.14),transparent); }

/* Inactive/locked */
.tile-inactive { opacity:0.48; }
.tile-expired  { opacity:0.55; }

/* Icon */
.card-icon {
  width:46px;height:46px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-size:20px;margin-bottom:20px;position:relative;z-index:1;
  transition:transform 0.3s cubic-bezier(0.34,1.5,0.64,1);
}
.tile:hover .card-icon { transform:scale(1.08) rotate(-3deg); }
.tile-payloop   .card-icon { background:rgba(124,110,245,0.15);box-shadow:0 0 0 1px rgba(124,110,245,0.25); }
.tile-timeloop  .card-icon { background:rgba(52,199,89,0.12);box-shadow:0 0 0 1px rgba(52,199,89,0.2); }
.tile-cashbooks .card-icon { background:rgba(255,159,10,0.12);box-shadow:0 0 0 1px rgba(255,159,10,0.2); }
.tile-expenses  .card-icon { background:rgba(255,69,58,0.12);box-shadow:0 0 0 1px rgba(255,69,58,0.2); }

/* Card header */
.card-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;position:relative;z-index:1; }
.card-title  { font-size:18px;font-weight:600;color:rgba(255,255,255,0.92);letter-spacing:-0.5px; }
.card-badge  { font-size:10px;font-weight:600;padding:3px 8px;border-radius:20px;letter-spacing:0.3px;text-transform:uppercase; }
.badge-active       { background:rgba(52,199,89,0.12);color:#30d158;border:1px solid rgba(52,199,89,0.2); }
.badge-trial        { background:rgba(10,132,255,0.12);color:#64AFFF;border:1px solid rgba(10,132,255,0.2); }
.badge-trial-urgent { background:rgba(255,159,10,0.12);color:#FF9F0A;border:1px solid rgba(255,159,10,0.2); }
.badge-trial-ok     { background:rgba(10,132,255,0.10);color:#64AFFF;border:1px solid rgba(10,132,255,0.18); }
.badge-beta         { background:rgba(255,159,10,0.12);color:#ffd60a;border:1px solid rgba(255,159,10,0.2); }
.badge-inactive     { background:rgba(255,255,255,0.06);color:rgba(255,255,255,0.35);border:1px solid rgba(255,255,255,0.08); }
.badge-expired      { background:rgba(255,69,58,0.12);color:#FF6961;border:1px solid rgba(255,69,58,0.2); }
.badge-pending      { background:rgba(255,159,10,0.12);color:#FF9F0A;border:1px solid rgba(255,159,10,0.2); }

/* Desc */
.card-desc {
  font-size:13px;color:rgba(255,255,255,0.38);line-height:1.55;letter-spacing:-0.1px;
  margin-bottom:26px;position:relative;z-index:1;
}
/* trial info */
.trial-info { font-size:12px;color:rgba(255,255,255,0.3);margin-top:4px; }

/* Tile status row */
.tile-status { margin-bottom:16px;position:relative;z-index:1; }
.tile-price  { font-size:13px;color:rgba(255,255,255,0.3);margin-bottom:10px;position:relative;z-index:1; }
.no-access-note { font-size:13px;color:rgba(255,255,255,0.3);position:relative;z-index:1; }

/* Buttons */
.tile-btn {
  display:flex;align-items:center;justify-content:center;gap:7px;
  width:100%;padding:11px 20px;border-radius:14px;
  font-size:14px;font-weight:500;letter-spacing:-0.3px;
  border:none;cursor:pointer;transition:all 0.2s ease;
  text-decoration:none;position:relative;z-index:1;overflow:hidden;
  font-family:inherit;
}
.tile-btn::after {
  content:'';position:absolute;top:0;left:-100%;
  width:60%;height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.12),transparent);
  transition:left 0.5s ease;
}
.tile-btn:hover::after { left:160%; }
.tile-btn:hover { filter:brightness(1.12);transform:translateY(-1px); }

/* Per-product button colours */
.tile-payloop   .tile-btn:not(.tile-btn-outline):not(.tile-btn-disabled) { background:linear-gradient(135deg,rgba(124,110,245,0.7),rgba(88,86,214,0.8));color:#fff;box-shadow:0 2px 16px rgba(124,110,245,0.3),0 1px 0 rgba(255,255,255,0.1) inset;border:1px solid rgba(124,110,245,0.4); }
.tile-timeloop  .tile-btn:not(.tile-btn-outline):not(.tile-btn-disabled) { background:linear-gradient(135deg,rgba(52,199,89,0.65),rgba(30,175,70,0.75));color:#fff;box-shadow:0 2px 16px rgba(52,199,89,0.25),0 1px 0 rgba(255,255,255,0.1) inset;border:1px solid rgba(52,199,89,0.35); }
.tile-cashbooks .tile-btn:not(.tile-btn-outline):not(.tile-btn-disabled) { background:linear-gradient(135deg,rgba(255,159,10,0.7),rgba(220,130,0,0.8));color:#fff;box-shadow:0 2px 16px rgba(255,159,10,0.3),0 1px 0 rgba(255,255,255,0.1) inset;border:1px solid rgba(255,159,10,0.4); }
.tile-expenses  .tile-btn:not(.tile-btn-outline):not(.tile-btn-disabled) { background:linear-gradient(135deg,rgba(255,69,58,0.7),rgba(215,40,40,0.8));color:#fff;box-shadow:0 2px 16px rgba(255,69,58,0.3),0 1px 0 rgba(255,255,255,0.1) inset;border:1px solid rgba(255,69,58,0.4); }

.tile-btn-outline {
  background:rgba(255,255,255,0.05) !important;
  color:rgba(255,255,255,0.4) !important;
  border:1px solid rgba(255,255,255,0.1) !important;
  box-shadow:none !important;
}
.tile-btn-outline:hover { background:rgba(255,255,255,0.09) !important;color:rgba(255,255,255,0.65) !important; }
.tile-btn-disabled {
  background:rgba(255,255,255,0.04) !important;
  color:rgba(255,255,255,0.2) !important;
  border:1px solid rgba(255,255,255,0.06) !important;
  cursor:not-allowed;pointer-events:none;
}

/* ── Advisor strip ── */
.advisor-card {
  position:relative;border-radius:24px;padding:24px 28px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  overflow:hidden;margin-top:16px;
  animation:fadeUp 0.6s 0.28s ease both;
  text-decoration:none;
  transition:transform 0.3s cubic-bezier(0.34,1.3,0.64,1),box-shadow 0.3s ease;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.07);
  backdrop-filter:blur(32px) saturate(180%);
  -webkit-backdrop-filter:blur(32px) saturate(180%);
  box-shadow:0 1px 0 0 rgba(255,255,255,0.06) inset,0 8px 32px rgba(0,0,0,0.3);
}
.advisor-card:hover { transform:translateY(-2px);box-shadow:0 1px 0 0 rgba(255,255,255,0.08) inset,0 16px 48px rgba(0,0,0,0.35); }
.advisor-card::before {
  content:'';position:absolute;top:0;left:16px;right:16px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(10,132,255,0.6),transparent);border-radius:1px;
}
.advisor-card::after {
  content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse 70% 60% at 0% 50%,rgba(10,132,255,0.08),transparent);
  pointer-events:none;
}
.advisor-card-icon {
  width:46px;height:46px;border-radius:14px;
  background:rgba(10,132,255,0.12);border:1px solid rgba(10,132,255,0.2);
  display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;
  transition:transform 0.3s cubic-bezier(0.34,1.5,0.64,1);position:relative;z-index:1;
}
.advisor-card:hover .advisor-card-icon { transform:scale(1.08) rotate(-3deg); }
.advisor-card-body { flex:1;position:relative;z-index:1; }
.advisor-card-title { font-size:16px;font-weight:600;color:rgba(255,255,255,0.9);letter-spacing:-0.4px;margin-bottom:4px; }
.advisor-card-desc  { font-size:13px;color:rgba(255,255,255,0.35);letter-spacing:-0.1px;line-height:1.45; }
.advisor-card-btn {
  display:flex;align-items:center;gap:7px;padding:11px 20px;
  background:rgba(10,132,255,0.15);border:1px solid rgba(10,132,255,0.25);border-radius:14px;
  font-size:13px;font-weight:500;color:rgba(255,255,255,0.85);
  white-space:nowrap;flex-shrink:0;text-decoration:none;position:relative;z-index:1;
  box-shadow:0 2px 16px rgba(10,132,255,0.2),0 1px 0 rgba(255,255,255,0.08) inset;overflow:hidden;
  transition:all 0.2s;
}
.advisor-card-btn:hover { background:rgba(10,132,255,0.22);transform:translateY(-1px); }

/* ── Sub card / invoices (kept minimal) ── */
.card-plain {
  background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);
  border-radius:16px;padding:20px 24px;margin-top:20px;
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}

/* ── Settings / Team pages ── */
.card { background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:20px;padding:28px 32px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px); }
label { display:block;font-size:13px;font-weight:500;color:rgba(255,255,255,0.5);margin-bottom:6px;margin-top:16px;letter-spacing:-0.1px; }
input[type=text],input[type=email],input[type=password],select,textarea {
  width:100%;padding:10px 14px;border-radius:10px;border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.05);color:#fff;font-size:14px;font-family:inherit;
  outline:none;transition:border 0.15s;
}
input:focus,select:focus,textarea:focus { border-color:rgba(124,110,245,0.5);background:rgba(255,255,255,0.07); }
select option { background:#1a1a2e;color:#fff; }
.email-field { font-size:14px;color:rgba(255,255,255,0.4);padding:10px 14px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:10px; }
.email-note  { font-size:12px;color:rgba(255,255,255,0.25);margin-top:5px; }
.grid2 { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.form-actions { display:flex;gap:12px;margin-top:28px; }
.section-label { font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:rgba(255,255,255,0.25);margin-bottom:14px;margin-top:4px; }
.back-link { display:inline-flex;align-items:center;gap:6px;font-size:13px;color:rgba(255,255,255,0.35);text-decoration:none;margin-bottom:24px;transition:color 0.15s; }
.back-link:hover { color:rgba(255,255,255,0.65); }

/* Buttons */
.btn { display:inline-flex;align-items:center;gap:8px;padding:10px 20px;background:var(--payloop);color:#fff;border:none;border-radius:12px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;text-decoration:none;transition:all 0.2s;letter-spacing:-0.2px; }
.btn:hover { filter:brightness(1.12);transform:translateY(-1px); }
.btn-ghost { background:rgba(255,255,255,0.06);color:rgba(255,255,255,0.6);border:1px solid rgba(255,255,255,0.1); }
.btn-ghost:hover { background:rgba(255,255,255,0.1);color:rgba(255,255,255,0.85); }
.btn-danger { background:rgba(255,69,58,0.15);color:#FF6961;border:1px solid rgba(255,69,58,0.25); }
.btn-danger:hover { background:rgba(255,69,58,0.25); }
.btn-success-btn { background:rgba(52,199,89,0.15);color:#30d158;border:1px solid rgba(52,199,89,0.25); }
.btn-success-btn:hover { background:rgba(52,199,89,0.25); }
.btn-sm { font-size:12px;padding:6px 14px;border-radius:8px; }

/* ── Table (team page) ── */
table { width:100%;border-collapse:collapse; }
th { padding:10px 16px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:rgba(255,255,255,0.25);text-align:left;border-bottom:1px solid rgba(255,255,255,0.06); }
td { padding:14px 16px;font-size:14px;color:rgba(255,255,255,0.75);border-bottom:1px solid rgba(255,255,255,0.04); }
tr:last-child td { border-bottom:none; }
.actions { display:flex;gap:8px;align-items:center; }
.pill { display:inline-block;font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;letter-spacing:0.02em; }
.payloop-pill { background:rgba(124,110,245,0.15);color:#A78BFA;border:1px solid rgba(124,110,245,0.25); }

/* ── Product permission styles (team form) ── */
.product-permission { margin-bottom:16px;padding:16px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:14px; }
.product-toggle { display:flex;align-items:center;gap:12px;cursor:pointer;font-size:14px;font-weight:500;color:rgba(255,255,255,0.75); }
.product-name { font-size:14px;font-weight:600;color:rgba(255,255,255,0.85); }
.product-tag { font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;padding:2px 8px;border-radius:12px;background:rgba(124,110,245,0.12);color:#A78BFA;border:1px solid rgba(124,110,245,0.2); }
.payloop-tag { background:rgba(124,110,245,0.12);color:#A78BFA;border:1px solid rgba(124,110,245,0.2); }
.role-select { margin-top:12px;padding:14px;background:rgba(124,110,245,0.05);border:1px solid rgba(124,110,245,0.12);border-radius:10px; }
.role-radios { display:flex;flex-direction:column;gap:8px; }
.role-radio { display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.06);border-radius:10px;cursor:pointer;transition:background 0.15s; }
.role-radio:hover { background:rgba(255,255,255,0.04); }
.role-radio-content { flex:1; }
.role-radio-label { display:block;font-size:13px;font-weight:600;color:rgba(255,255,255,0.85);margin-bottom:2px; }
.role-radio-desc  { display:block;font-size:11px;color:rgba(255,255,255,0.35); }

/* ── Tour panel ── */
#tour-panel { position:fixed;bottom:32px;right:32px;width:340px;background:rgba(20,20,35,0.95);backdrop-filter:blur(32px);border:1px solid rgba(255,255,255,0.1);border-radius:20px;padding:24px;z-index:200;box-shadow:0 20px 60px rgba(0,0,0,0.5); }
#tour-panel h3 { font-size:16px;font-weight:600;color:#fff;margin-bottom:6px;letter-spacing:-0.3px; }
.tour-where { font-size:11px;color:rgba(255,255,255,0.3);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:12px; }
#tour-text  { font-size:13px;color:rgba(255,255,255,0.6);line-height:1.6;margin-bottom:20px; }
.tour-footer { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px; }
.tour-progress { font-size:11px;color:rgba(255,255,255,0.25); }
.tour-nav button,#tour-skip { padding:7px 14px;border-radius:10px;font-size:12px;font-weight:500;cursor:pointer;border:none;font-family:inherit; }
.tour-nav { display:flex;gap:8px; }
.tour-nav button { background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.7); }
.tour-nav button:hover { background:rgba(255,255,255,0.14); }
#tour-skip { background:transparent;color:rgba(255,255,255,0.25); }
#tour-skip:hover { color:rgba(255,255,255,0.5); }

/* ── Trial expired modal ── */
#trial-expired-modal { position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:500;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(8px); }

/* ── Subscription page / invoice page (reuse card) ── */
.sub-page-card { background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:20px;padding:28px;backdrop-filter:blur(20px);margin-bottom:20px; }
.plan-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px; }
.plan-card { background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.08);border-radius:16px;padding:20px;transition:border 0.2s,transform 0.2s; }
.plan-card:hover { border-color:rgba(255,255,255,0.15);transform:translateY(-2px); }
.plan-card.current-plan { border-color:rgba(52,199,89,0.4);background:rgba(52,199,89,0.05); }
.plan-name { font-size:16px;font-weight:600;color:rgba(255,255,255,0.9);letter-spacing:-0.4px;margin-bottom:4px; }
.plan-desc { font-size:12px;color:rgba(255,255,255,0.35);margin-bottom:14px; }
.plan-price { font-size:24px;font-weight:700;color:#fff;letter-spacing:-0.8px;margin-bottom:16px; }
.plan-price span { font-size:13px;font-weight:400;color:rgba(255,255,255,0.35); }
.product-badge { display:inline-block;font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;letter-spacing:0.02em;margin:2px; }
.badge-payloop   { background:rgba(124,110,245,0.15);color:#A78BFA;border:1px solid rgba(124,110,245,0.25); }
.badge-timeloop  { background:rgba(52,199,89,0.12);color:#30d158;border:1px solid rgba(52,199,89,0.2); }
.badge-cashbooks { background:rgba(255,159,10,0.12);color:#FF9F0A;border:1px solid rgba(255,159,10,0.2); }
.badge-expenses  { background:rgba(255,69,58,0.12);color:#FF6961;border:1px solid rgba(255,69,58,0.2); }

/* ── Auth pages ── */
.auth-card { background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:24px;padding:40px;max-width:440px;width:100%;backdrop-filter:blur(32px); }
.auth-logo  { text-align:center;margin-bottom:32px; }
.auth-logo-text { font-size:22px;font-weight:700;letter-spacing:-0.5px; }
.auth-logo-text .pay  { color:#fff; }
.auth-logo-text .loop { color:var(--payloop); }
.auth-logo-text .suite{ color:rgba(255,255,255,0.3);font-size:16px; }
.auth-card h1 { font-size:26px;font-weight:700;color:#fff;letter-spacing:-0.8px;margin-bottom:6px; }
.auth-card .sub { font-size:14px;color:rgba(255,255,255,0.4);margin-bottom:24px; }
.auth-card input { margin-bottom:14px; }
.auth-card .btn { width:100%;justify-content:center;margin-top:6px; }
.auth-footer { text-align:center;margin-top:24px;font-size:13px;color:rgba(255,255,255,0.35); }
.auth-footer a { color:rgba(255,255,255,0.55);text-decoration:none; }
.auth-footer a:hover { color:#fff; }
.chip { display:inline-block;font-size:12px;font-weight:500;padding:4px 12px;border-radius:20px;margin:3px; }
.chip-payloop    { background:rgba(124,110,245,0.12);color:#A78BFA;border:1px solid rgba(124,110,245,0.2); }
.chip-timeloop   { background:rgba(52,199,89,0.10);color:#30d158;border:1px solid rgba(52,199,89,0.18); }
.chip-cashbooks  { background:rgba(255,159,10,0.10);color:#FF9F0A;border:1px solid rgba(255,159,10,0.18); }
.chip-receiptloop{ background:rgba(255,69,58,0.10);color:#FF6961;border:1px solid rgba(255,69,58,0.18); }
.otp-inputs { display:flex;gap:10px;justify-content:center;margin:10px 0 20px; }
.otp-inputs input { width:50px!important;text-align:center;font-size:22px;font-weight:700;padding:10px 4px;letter-spacing:2px; }

/* Auth split layout */
.auth-split {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-left {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-right { display: none; }
.links { margin-top: 20px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.35); line-height: 2.2; }
.links a { color: var(--payloop); font-weight: 600; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.auth-right-content,
.auth-right-wordmark,
.auth-tagline,
.auth-product-chips,
.auth-domain { display: none; }

/* ── Portal footer ── */
.portal-footer { position:relative;z-index:1;text-align:center;padding:32px 24px;font-size:12px;color:rgba(255,255,255,0.2); }
.portal-footer a { color:rgba(255,255,255,0.3);text-decoration:none; }
.portal-footer a:hover { color:rgba(255,255,255,0.55); }

/* ── Super admin ── */
.sa-name { font-weight:600;font-size:14px;color:rgba(255,255,255,0.85); }
.sa-desc { font-size:12px;color:rgba(255,255,255,0.3);margin-left:8px; }

/* ── Responsive ── */
@media (max-width:600px) {
  .portal-main { padding:40px 16px 60px; }
  .products-grid { grid-template-columns:1fr;gap:12px; }
  nav.portal-nav { padding:0 20px; }
  .page-header h1 { font-size:32px; }
  .nav-links { display:none; }
  .advisor-card { flex-direction:column;align-items:flex-start; }
  .advisor-card-btn { width:100%;justify-content:center; }
  .grid2 { grid-template-columns:1fr; }
}
