/* ═══════════════════════════════════════════
   NETCLIX CLOUD — Login  |  Dark + Red Theme
   ═══════════════════════════════════════════ */

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

:root {
  --bg-base:      #0a0a0c;
  --bg-card:      #111116;
  --bg-input:     #1a1a22;
  --bg-input-focus: #1f1f2a;

  --red-hot:      #e8273a;
  --red-mid:      #c01e2e;
  --red-glow:     rgba(232, 39, 58, 0.35);
  --red-subtle:   rgba(232, 39, 58, 0.08);

  --text-primary: #f0f0f4;
  --text-muted:   #7a7a92;
  --text-dim:     #4a4a62;

  --border:       rgba(255,255,255,0.07);
  --border-focus: rgba(232, 39, 58, 0.6);

  --radius:       14px;
  --radius-sm:    8px;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ── Background ─────────────────────────── */
.bg-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #b01828 0%, transparent 70%);
  top: -160px; left: -160px;
  animation-duration: 20s;
}

.orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #7a0f1a 0%, transparent 70%);
  bottom: -120px; right: -100px;
  animation-duration: 25s; animation-delay: -8s;
}

.orb3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #3a0a10 0%, transparent 70%);
  top: 50%; left: 60%;
  animation-duration: 30s; animation-delay: -14s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(232,39,58,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,39,58,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Page layout ─────────────────────────── */
.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 16px;
  gap: 28px;
}

/* ── Brand ────────────────────────────────── */
.brand {
  display: flex; align-items: center; gap: 14px;
}

.brand-icon {
 width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 28px var(--red-glow), 0 4px 12px rgba(0,0,0,0.5);
}

.brand-icon svg { width: 24px; height: 24px; }

.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.25rem; letter-spacing: 0.1em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red-hot); font-weight: 500; margin-top: 2px;
}

/* ── Card ─────────────────────────────────── */
.card {
  width: 100%; max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(232,39,58,0.06),
    0 24px 64px rgba(0,0,0,0.7),
    0 0 80px rgba(180,10,30,0.08);
}

/* ── Tabs ─────────────────────────────────── */
.tabs {
  display: flex;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 12px;
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 500;
  color: var(--text-dim);
  transition: color .25s, background .25s;
  position: relative;
}

.tab-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.tab-btn::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: var(--red-hot);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.tab-btn:hover { color: var(--text-muted); background: rgba(255,255,255,0.02); }

.tab-btn.active { color: var(--text-primary); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn.admin.active { color: var(--red-hot); }
.tab-btn.company.active { color: #e0e0f0; }

/* ── Panels ───────────────────────────────── */
.panel { display: none; padding: 32px 32px 28px; animation: fadeUp .35s ease; }
.panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.45rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.panel-desc {
  font-size: 0.84rem; color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Badges ───────────────────────────────── */
.company-badge, .admin-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 500;
  margin-bottom: 22px;
}

.company-badge svg, .admin-badge svg { width: 15px; height: 15px; flex-shrink: 0; }

.company-badge {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
}

.admin-badge {
  background: rgba(232,39,58,0.08);
  border: 1px solid rgba(232,39,58,0.2);
  color: #e8a0a8;
}

/* ── Error box ────────────────────────────── */
.error-box {
  display: none;
  align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: rgba(232,39,58,0.1);
  border: 1px solid rgba(232,39,58,0.3);
  border-radius: var(--radius-sm);
  color: #f5a0a8; font-size: 0.82rem;
  margin-bottom: 18px;
}
.error-box.show { display: flex; }
.error-box svg { width: 16px; height: 16px; fill: var(--red-hot); flex-shrink: 0; margin-top: 1px; }

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

label {
  display: block;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  display: flex; pointer-events: none;
  color: var(--text-dim);
  transition: color .2s;
}
.input-icon svg { width: 16px; height: 16px; }

.form-control {
  width: 100%;
  padding: 12px 42px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.form-control::placeholder { color: var(--text-dim); }

.form-control:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(232,39,58,0.12), 0 0 16px rgba(232,39,58,0.08);
}

.form-control:focus ~ .input-icon,
.input-wrap:focus-within .input-icon { color: var(--red-hot); }

.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); padding: 4px;
  transition: color .2s;
  display: flex; align-items: center;
}
.toggle-pass svg { width: 17px; height: 17px; }
.toggle-pass:hover { color: var(--text-muted); }

/* ── Row ──────────────────────────────────── */
.row-between {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-muted); cursor: pointer;
}

.remember input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--red-hot);
  cursor: pointer;
}

.forgot {
  font-size: 0.8rem; color: var(--red-hot);
  text-decoration: none;
  transition: color .2s;
}
.forgot:hover { color: #ff5568; text-decoration: underline; }

/* ── Submit button ────────────────────────── */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--red-hot) 0%, var(--red-mid) 100%);
  border: none; border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.05em; cursor: pointer;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(232,39,58,0.4), 0 2px 6px rgba(0,0,0,0.4);
}

.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
}

.btn-login:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(232,39,58,0.5); }
.btn-login:hover::before { opacity: 1; }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Spinner ──────────────────────────────── */
.spinner {
  display: none;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

/* ── Footer ───────────────────────────────── */
.footer {
  font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.06em;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 500px) {
  .panel { padding: 24px 20px 22px; }
  .card { border-radius: 16px; }
  .tab-btn span { display: none; }
  .tab-btn { gap: 0; }
}
