/* ═══════════════════════════════════════════════
   PROKLISI — Dashboard Stylesheet
   Shared by login, dashboard, and all sub-pages
═══════════════════════════════════════════════ */

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

:root {
  --bg:       #030305;
  --bg2:      #07070D;
  --bg3:      #0D0D1A;
  --glass:    rgba(255,255,255,0.03);
  --glass-b:  rgba(255,255,255,0.07);
  --glass-h:  rgba(255,255,255,0.10);
  --p1:       #6C47FF;
  --p2:       #E05A10;
  --p3:       #47FFEF;
  --grd:      linear-gradient(135deg, #6C47FF, #E05A10, #47FFEF);
  --text:     #F2F2FF;
  --text-m:   rgba(242,242,255,0.56);
  --text-s:   rgba(242,242,255,0.30);
  --radius:   16px;
  --radius-sm:10px;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --fh:       'Syne', sans-serif;
  --fb:       'Inter', sans-serif;
  --sidebar-w: 240px;
}

html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }

/* ── NOISE ── */
.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── GLASS ── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-b);
  border-radius: var(--radius);
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: var(--grd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.login-orb {
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, rgba(108,71,255,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.login-card {
  padding: 40px;
  position: relative;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.login-logo img { width: 32px; height: 32px; }
.login-logo span {
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.login-tagline {
  font-size: 0.78rem;
  color: var(--text-s);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding-left: 42px;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: var(--text);
  font-family: var(--fb);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 20px;
}
.btn-google:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--text-s);
  font-size: 0.8rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Fields */
.login-field {
  margin-bottom: 14px;
}
.login-field input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--fb);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.login-field input::placeholder { color: var(--text-s); }
.login-field input:focus {
  border-color: rgba(108,71,255,0.5);
  background: rgba(108,71,255,0.05);
}

.login-forgot {
  text-align: right;
  margin-bottom: 16px;
  margin-top: -4px;
}
.login-forgot a {
  font-size: 0.8rem;
  color: var(--text-m);
  transition: color 0.2s;
}
.login-forgot a:hover { color: var(--p3); }

/* Error / success */
.login-error {
  background: rgba(255,70,70,0.1);
  border: 1px solid rgba(255,70,70,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #ff8080;
  margin-bottom: 14px;
  display: none;
}
.login-success {
  background: rgba(71,255,139,0.08);
  border: 1px solid rgba(71,255,139,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #47FF8B;
  margin-bottom: 14px;
  display: none;
}

/* Sign in button */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  color: #fff;
  font-family: var(--fh);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-radius: 100px;
  transition: opacity 0.2s, transform 0.2s;
  margin-bottom: 16px;
}
.btn-login:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

.login-switch {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-m);
}
.login-switch a {
  color: var(--p3);
  font-weight: 500;
  transition: opacity 0.2s;
}
.login-switch a:hover { opacity: 0.75; }

.forgot-copy {
  font-size: 0.88rem;
  color: var(--text-m);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   DASHBOARD LAYOUT
═══════════════════════════════════════════════ */
body.dash-page {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.dash-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(7,7,13,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  z-index: 100;
  transition: transform 0.3s var(--ease);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}
.sidebar-logo img { width: 28px; height: 28px; }
.sidebar-logo span {
  font-family: var(--fh);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.snav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-m);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.snav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.snav-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.snav-link.active {
  background: rgba(108,71,255,0.15);
  color: var(--text);
  border: 1px solid rgba(108,71,255,0.2);
}
.snav-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 8px 14px;
}
.snav-roster { color: var(--p3); }
.snav-roster:hover { background: rgba(71,255,239,0.07); color: var(--p3); }

.sidebar-signout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 26px;
  color: var(--text-s);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
  margin-top: 8px;
}
.sidebar-signout svg { width: 18px; height: 18px; }
.sidebar-signout:hover { color: #ff6b6b; }

/* ── Main content ── */
.dash-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px 48px;
  min-height: 100vh;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.dash-welcome {
  font-family: var(--fh);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dash-date {
  font-size: 0.82rem;
  color: var(--text-s);
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-m);
  border-radius: 2px;
}

/* ── Section headers ── */
.dash-section { margin-bottom: 48px; }
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dash-section-head h2 {
  font-family: var(--fh);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-m);
}

/* ── Buttons ── */
.btn-dash-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  color: #fff;
  font-family: var(--fh);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-dash-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-dash-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-m);
  font-family: var(--fh);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-dash-ghost:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }

/* ── Package grid ── */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.package-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pkg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pkg-influencer {
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pkg-tier {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-m);
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
}

.pkg-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pkg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.pkg-days {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Progress bar */
.pkg-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.pkg-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease);
}

.pkg-dates {
  font-size: 0.75rem;
  color: var(--text-s);
}

.pkg-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Empty state */
.package-empty {
  grid-column: 1 / -1;
  padding: 60px 40px;
  text-align: center;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 16px; }
.package-empty h3 {
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.package-empty p {
  color: var(--text-m);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Loading */
.dash-loading {
  color: var(--text-s);
  font-size: 0.88rem;
  padding: 40px 0;
}

/* ── Page title (sub-pages) ── */
.dash-page-title {
  font-family: var(--fh);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.dash-page-sub {
  font-size: 0.85rem;
  color: var(--text-m);
  margin-bottom: 32px;
}

/* ─── Form inside dashboard ─── */
.dash-form-card {
  max-width: 560px;
  padding: 32px;
}
.dash-field {
  margin-bottom: 18px;
}
.dash-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-m);
  margin-bottom: 7px;
}
.dash-field input,
.dash-field textarea,
.dash-field select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--fb);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.dash-field input::placeholder,
.dash-field textarea::placeholder { color: var(--text-s); }
.dash-field input:focus,
.dash-field textarea:focus,
.dash-field select:focus { border-color: rgba(108,71,255,0.45); }
.dash-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='rgba(242,242,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
  cursor: pointer;
  color-scheme: dark;
}
.dash-field select option {
  background: #0E0E1A;
  color: #F2F2FF;
}
.dash-field textarea { resize: vertical; min-height: 90px; }

/* ── Password field with eye toggle ── */
.pw-wrap {
  position: relative;
}
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-s);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.pw-eye:hover { color: var(--text-m); }
.pw-eye svg { width: 18px; height: 18px; }

/* ── Pulsing border animation ── */
@keyframes pulse-border {
  0%, 100% { border-color: rgba(255,255,255,0.14); box-shadow: none; }
  50%       { border-color: rgba(224,90,16,0.8);   box-shadow: 0 0 12px rgba(224,90,16,0.3); }
}
.btn-dash-ghost.pulse-cta {
  animation: pulse-border 2s ease-in-out infinite;
}

.dash-save-msg {
  font-size: 0.82rem;
  color: #47FF8B;
  display: none;
  margin-left: 12px;
}

/* ── Sidebar overlay (mobile tap-outside-to-close) ── */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99; /* sidebar is 100, overlay sits just below */
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#sidebarOverlay.open { display: block; }
@media (min-width: 901px) { #sidebarOverlay { display: none !important; } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .dash-sidebar {
    transform: translateX(-100%);
    overflow-y: auto;     /* sign-out always reachable on short screens */
    overflow-x: hidden;
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0;
    padding: 24px 20px;
  }
  .sidebar-toggle {
    display: flex;
  }
  .dash-header {
    margin-bottom: 28px;
  }
  /* Nav shrinks to content height so signout follows immediately */
  .sidebar-nav {
    flex: 0 0 auto;
  }
  /* Sign-out: sits right below Account link with a thin separator */
  .sidebar-signout {
    margin: 2px 12px 12px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 10px;
  }
  .sidebar-signout:hover {
    background: rgba(255,77,77,0.07);
    color: #ff6b6b;
  }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px; }
  .package-grid { grid-template-columns: 1fr; }
}
