/* Nethra Cloud — Cabinet Styles */

:root {
  --bg:   #0b1020;
  --bg2:  #101830;
  --card: #121a33;
  --line: #28345f;
  --text: #e8ecff;
  --muted: #9fb0e8;
  --acc:  #4f7cff;
  --acc-hover: #6b92ff;
  --radius: 14px;
  --err-bg: #3b1722;
  --err-border: #8b3346;
  --err-text: #ffd7df;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--acc); text-decoration: none; transition: color .2s; }
a:hover { color: var(--acc-hover); }

/* ── Auth layout ─────────────────────────────── */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

/* Blob glow in background */
.auth-blob {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(79,124,255,0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: auth-blob-drift 8s ease-in-out infinite alternate;
}

@keyframes auth-blob-drift {
  0%   { transform: translateX(-50%) translateY(0px); opacity: 0.8; }
  50%  { transform: translateX(-46%) translateY(-20px); opacity: 1; }
  100% { transform: translateX(-54%) translateY(10px); opacity: 0.85; }
}

.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Logo */
.auth-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.auth-logo span { color: var(--acc); }

/* Card */
.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(8px);
}

.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

/* Error */
.auth-error {
  padding: 12px 14px;
  border: 1px solid var(--err-border);
  background: var(--err-bg);
  color: var(--err-text);
  border-radius: 10px;
  font-size: 14px;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 48, 0.8);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.15);
}

.auth-input::placeholder { color: #4a5c8a; }

/* Submit button */
.auth-btn {
  margin-top: 4px;
  padding: 13px;
  background: var(--acc);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 0 20px rgba(79,124,255,0.35);
}

.auth-btn:hover {
  background: var(--acc-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(79,124,255,0.5);
}

.auth-btn:active { transform: translateY(0); }

/* Footer link */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ── Cabinet Shell ───────────────────────────── */

.cab-body {
  background: var(--bg);
  min-height: 100vh;
}

/* Header */
.cab-header {
  background: rgba(16, 24, 48, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cab-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.cab-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.cab-logo span { color: var(--acc); }

.cab-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.cab-nav-item {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.cab-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.cab-nav-item.active { color: var(--text); background: rgba(79,124,255,0.15); }

.cab-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.cab-email {
  font-size: 13px;
  color: var(--muted);
}

.cab-logout-btn {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.cab-logout-btn:hover { border-color: var(--acc); color: var(--text); }

/* Main */
.cab-main { padding: 40px 0; }
.cab-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Page title */
.cab-page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cab-page-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Card */
.cab-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

/* Button */
.cab-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--acc);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.cab-btn:hover { background: var(--acc-hover); color: #fff; transform: translateY(-1px); }

/* Empty state */
.cab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 16px;
}
.cab-empty-icon {
  width: 64px;
  height: 64px;
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
}
.cab-empty-title { font-size: 18px; font-weight: 700; }
.cab-empty-text { color: var(--muted); font-size: 14px; max-width: 320px; }

/* Responsive */
@media (max-width: 640px) {
  .cab-nav { display: none; }
  .cab-email { display: none; }
  .cab-header-inner { gap: 16px; }
}

/* ─── Orders table ─────────────────────────── */
.orders-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--bg2); }
.orders-th-right { text-align: right; }
.orders-row { transition: background .15s; }
.orders-row:hover { background: rgba(79,124,255,.06); }
.orders-cell { padding: 14px 16px; font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--line); }
.orders-row:last-child .orders-cell { border-bottom: none; }
.orders-cell-right { text-align: right; color: var(--muted); }
.order-id-short { font-family: monospace; color: var(--muted); font-size: 13px; }

/* ─── Status badges ─────────────────────────── */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; }
.status-pending      { background: #1e2233; color: #8892a4; }
.status-paid         { background: #1a264a; color: #7db8ff; }
.status-provisioning { background: #2a2010; color: #f5c842; }
.status-active       { background: #0f2a1a; color: #4cca7a; }
.status-failed       { background: #2a1010; color: #ff6b6b; }
.status-cancelled    { background: #1a1a1a; color: #555; }

/* ─── Order form ────────────────────────────── */
.order-form-wrap { max-width: 520px; }
.order-product-card { display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 24px; }
.order-product-name { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.order-product-specs { font-size: 13px; color: var(--muted); }
.order-product-price { font-size: 22px; font-weight: 700; white-space: nowrap; }
.order-product-price span { font-size: 13px; color: var(--muted); font-weight: 400; }
.order-form { display: flex; flex-direction: column; gap: 16px; }
.order-form-row { display: flex; flex-direction: column; gap: 6px; }
.order-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.order-select { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 14px; padding: 10px 14px; font-family: inherit;
  transition: border-color .15s; }
.order-select:focus { outline: none; border-color: var(--acc); }
.order-total-row { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.order-total-row strong { font-size: 20px; font-weight: 700; }
.cab-btn-full { width: 100%; justify-content: center; }
.order-cancel-link { text-align: center; color: var(--muted); font-size: 13px;
  text-decoration: none; margin-top: 4px; }
.order-cancel-link:hover { color: var(--text); }

/* ─── Order detail ──────────────────────────── */
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .order-detail-grid { grid-template-columns: 1fr; } }
.order-detail-card { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.order-detail-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span:first-child { color: var(--muted); }
.order-creds { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.order-creds-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.order-creds-grid { display: flex; flex-direction: column; gap: 0; }
.order-cred-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-cred-row:last-child { border-bottom: none; }
.order-cred-label { color: var(--muted); font-size: 13px; }
.order-cred-value { font-family: monospace; font-size: 13px; background: #0a0e1a;
  padding: 4px 8px; border-radius: 6px; }
.order-creds-hint { margin-top: 16px; color: var(--muted); font-size: 13px; }
.order-creds-hint code { background: #0a0e1a; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.cab-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 13px; text-decoration: none; margin-bottom: 8px; }
.cab-back-link:hover { color: var(--text); }

/* ─── Profile ───────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.profile-card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.profile-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--muted); }
.profile-form { display: flex; flex-direction: column; gap: 14px; }
.profile-field { display: flex; flex-direction: column; gap: 6px; }
.profile-success { background: #0f2a1a; border: 1px solid #1a4a2a; border-radius: 8px;
  padding: 12px 16px; color: #4cca7a; font-size: 14px; margin-bottom: 16px; }

/* ─── Cab button outline ────────────────────── */
.cab-btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.cab-btn-outline:hover { border-color: var(--acc); color: var(--acc); }

/* ─── Profile Hero ──────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow */
.profile-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(79,124,255,0.10) 0%, transparent 65%);
  pointer-events: none;
}

.profile-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3a5ecc 0%, #6b92ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 20px rgba(79,124,255,0.35);
}

.profile-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-hero-email {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-hero-since {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .profile-hero {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Header user chip ──────────────────────── */
.cab-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cab-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a5ecc 0%, #6b92ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Admin stats grid ──────────────────────── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--acc);
  line-height: 1;
}

.admin-stat-label {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Software section (order form) ────────── */
.software-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
}

.software-section-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

.software-group { display: flex; flex-direction: column; gap: 8px; }

.software-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .6;
}

.software-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .software-grid { grid-template-columns: 1fr; }
}

.sw-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.sw-item:hover { border-color: var(--acc); }

.sw-item input[type="checkbox"] { display: none; }

.sw-item.selected {
  border-color: var(--acc);
  background: rgba(79, 124, 255, .08);
}

.sw-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}

.sw-item.selected .sw-checkbox {
  background: var(--acc);
  border-color: var(--acc);
}

.sw-check-icon {
  display: none;
  width: 10px;
  height: 10px;
}

.sw-item.selected .sw-check-icon { display: block; }

.sw-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.sw-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.sw-badge-paid {
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,.12);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
}
