/* ============================================
   HPBX V2 - Global Styles
   Brand Colors: #0a0f1e (dark), #00c2ff (cyan), #7c3aed (purple)
   ============================================ */

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

:root {
  --brand-dark:    #0a0f1e;
  --brand-darker:  #060b14;
  --brand-cyan:    #00c2ff;
  --brand-purple:  #7c3aed;
  --brand-purple2: #a855f7;
  --sidebar-w:     260px;
  --radius:        12px;
  --shadow:        0 4px 20px rgba(0,0,0,0.08);
  --border:        #e8edf5;
  --text:          #0d1424;
  --text-muted:    #6b7a99;
  --bg:            #f4f7fc;
  --white:         #ffffff;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ============ LANDING PAGE ============ */

body.landing {
  background: var(--brand-dark);
  color: #fff;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,15,30,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff 0%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav-links { display: flex; gap: 32px; }
.landing-nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.landing-nav-links a:hover { color: #fff; }

.nav-cta {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600 !important;
}

/* Hero */
.hero {
  padding: 120px 60px 80px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(0,194,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0,194,255,0.12);
  border: 1px solid rgba(0,194,255,0.3);
  border-radius: 20px;
  color: var(--brand-cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-purple2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 16px 36px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,194,255,0.3);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,194,255,0.4); }

.btn-hero-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.05); }

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 48px 60px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.stat-item { text-align: center; }
.stat-item .num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-purple2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .lbl { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 4px; }

/* Features */
.features {
  padding: 100px 60px;
}

.section-label {
  display: block;
  text-align: center;
  color: var(--brand-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-sub {
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0,194,255,0.3);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.icon-cyan { background: rgba(0,194,255,0.15); }
.icon-purple { background: rgba(124,58,237,0.15); }
.icon-green { background: rgba(16,185,129,0.15); }
.icon-orange { background: rgba(245,158,11,0.15); }

.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: rgba(255,255,255,0.55); font-size: 14px; line-height: 1.7; }

/* How it works */
.how-it-works {
  padding: 100px 60px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.steps {
  display: flex;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-purple));
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.step-num {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step p { color: rgba(255,255,255,0.5); font-size: 13px; line-height: 1.6; }

/* CTA section */
.cta-section {
  padding: 100px 60px;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, rgba(0,194,255,0.1), rgba(124,58,237,0.1));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 80px 60px;
  max-width: 700px;
  margin: 0 auto;
}

.cta-box h2 { font-size: 40px; font-weight: 800; margin-bottom: 16px; }
.cta-box p { color: rgba(255,255,255,0.6); font-size: 16px; margin-bottom: 32px; }

.landing-footer {
  padding: 32px 60px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}

/* ============ LOGIN PAGE ============ */

body.login-page {
  background: linear-gradient(135deg, var(--brand-darker) 0%, #0d1535 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.login-box {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
}

.login-logo .logo-icon {
  width: 56px; height: 56px;
  font-size: 26px;
  margin-bottom: 12px;
}

.login-logo .logo-text { color: #fff; -webkit-text-fill-color: #fff; font-size: 26px; }

.login-logo .tagline {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin-top: 4px;
}

.login-box label {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.login-box input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}
.login-box input::placeholder { color: rgba(255,255,255,0.3); }
.login-box input:focus {
  outline: none;
  border-color: var(--brand-cyan);
  background: rgba(255,255,255,0.1);
}
/* Override browser autofill background (Chrome/Edge) */
.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover,
.login-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1a2040 inset !important;
  box-shadow: 0 0 0px 1000px #1a2040 inset !important;
  border-color: var(--brand-cyan);
  transition: background-color 5000s ease-in-out 0s;
}

.login-box button[type=submit] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: all 0.2s;
}
.login-box button[type=submit]:hover { opacity: 0.9; transform: translateY(-1px); }

.login-back {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.login-back a { color: var(--brand-cyan); text-decoration: none; }

.error {
  color: #fc8181;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

/* ============ APP LAYOUT (Admin + Group Admin) ============ */

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--brand-dark);
  color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand .logo-icon { width: 38px; height: 38px; font-size: 18px; }
.sidebar-brand .logo-text { font-size: 20px; }

.sidebar-section {
  padding: 20px 12px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.sidebar nav { padding: 0 12px; flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar nav a .nav-icon { width: 20px; text-align: center; }
.sidebar nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(0,194,255,0.15), rgba(124,58,237,0.1));
  color: #fff;
  border-left: 2px solid var(--brand-cyan);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
}
.sidebar-user .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.sidebar-user .user-info { flex: 1; }
.sidebar-user .user-name { font-size: 13px; font-weight: 600; }
.sidebar-user .user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

.sidebar .logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  font-size: 13px;
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.15s;
}
.sidebar .logout:hover { background: rgba(239,68,68,0.1); color: #fc8181; }

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

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title { font-size: 24px; font-weight: 700; color: var(--text); }
.page-sub { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* Stats Cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  padding: 22px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-purple));
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand-dark);
}

.stat-card .stat-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: 0.08;
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 { font-size: 16px; font-weight: 700; }
.card-body { padding: 24px; }
.card-body-flush { }

/* Table */
table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f9fafc;
  border-bottom: 1px solid var(--border);
}

td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f3f8;
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  color: white;
  box-shadow: 0 2px 8px rgba(0,194,255,0.25);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary { background: #f1f3f8; color: var(--text); }
.btn-secondary:hover { background: #e8eaf2; }

.btn-danger { background: #fef2f2; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; }

.btn-success { background: #f0fdf4; color: var(--success); }
.btn-success:hover { background: #dcfce7; }

.btn-warning { background: #fffbeb; color: var(--warning); }
.btn-warning:hover { background: #fef3c7; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-green { background: #dcfce7; color: #16a34a; }
.badge-red { background: #fee2e2; color: var(--danger); }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-cyan { background: rgba(0,194,255,0.1); color: #0284c7; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-purple { background: #ede9fe; color: #7c3aed; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
}

.modal-lg { max-width: 720px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 { font-size: 20px; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(0,194,255,0.1);
}

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.user-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.user-row input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.user-row input:focus { outline: none; border-color: var(--brand-cyan); }
.user-row button {
  width: 34px; height: 34px;
  background: #fee2e2;
  color: var(--danger);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Info Box */
.info-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #0369a1;
  margin-bottom: 16px;
}

.warn-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 16px;
}

.danger-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 16px;
}

/* Credentials display */
.credentials-box {
  background: #0a0f1e;
  border-radius: 10px;
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #a0f0a0;
  white-space: pre-wrap;
  word-break: break-all;
}
.credentials-box .cred-label { color: rgba(255,255,255,0.4); }

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty h4 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty p { font-size: 14px; margin-bottom: 20px; }

/* Live status dots */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-green { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.dot-red { background: var(--danger); }
.dot-gray { background: #9ca3af; }
.dot-pulse {
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(1.4); }
}

/* User cards (group admin) */
.user-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.user-card:hover { border-color: var(--brand-cyan); box-shadow: 0 4px 12px rgba(0,194,255,0.08); }

.user-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; }
.user-name { font-weight: 700; font-size: 15px; }
.user-ext { color: var(--text-muted); font-size: 13px; }
.user-sip { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-family: monospace; }

.user-actions { display: flex; gap: 8px; }

/* Call history table styles */
.cdr-status { display: flex; align-items: center; gap: 6px; }

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Plan validity progress bar */
.validity-bar {
  height: 6px;
  background: #e8edf5;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.validity-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-purple));
}
.validity-fill.low { background: linear-gradient(90deg, var(--warning), var(--danger)); }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--brand-dark);
  color: white;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
  border-left: 3px solid var(--brand-cyan);
  max-width: 360px;
}
@keyframes toastIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
}
.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand-cyan); }

/* ============ MOBILE RESPONSIVE ============ */


/* Mobile hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-nav-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0; right: 0;
  background: rgba(10,15,30,0.97);
  backdrop-filter: blur(12px);
  padding: 16px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 4px !important;
  z-index: 200;
}
.mobile-nav-open a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 15px !important;
}
.mobile-nav-open .nav-cta {
  margin-top: 8px;
  text-align: center;
  border-bottom: none;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-direction: column; }
  .steps::before { display: none; }
  .stats-bar { gap: 40px; flex-wrap: wrap; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 768px) {
  .landing-nav { padding: 16px 20px; }
  .landing-nav-links { display: none; }
  .hero { padding: 80px 20px 60px; }
  .hero h1 { font-size: 34px; }
  .features { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .how-it-works { padding: 60px 20px; }
  .cta-section { padding: 60px 20px; }
  .cta-box { padding: 48px 24px; }
  .stats-bar { padding: 32px 20px; gap: 24px; }
  .landing-footer { padding: 24px 20px; }

  .sidebar {
    position: relative;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    min-height: unset;
  }
  .sidebar-brand { border: none; padding: 8px; }
  .sidebar-section { display: none; }
  .sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    gap: 4px;
  }
  .sidebar nav a { padding: 8px 10px; font-size: 12px; }
  .sidebar-footer { display: none; }
  .sidebar .logout { margin-top: 0; }

  .main { margin-left: 0; padding: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 92vh; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .section-title { font-size: 28px; }
  .cta-box h2 { font-size: 28px; }
}

.landing-logo img { filter: brightness(1.05); }

.login-logo img { display: block; margin: 0 auto 4px; filter: drop-shadow(0 0 20px rgba(0,194,255,0.3)); }
