/* ── Nexlane Web ── Dark Navy Theme ── */

:root {
  --bg: #0F172A;
  --surface: #1E2A4A;
  --surface-light: #111827;
  --card: #1E2A4A;
  --card-hover: #28345A;
  --border: #364A7A;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #2563EB;
  --text: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --tertiary: #06B6D4;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

* { 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;
  line-height: 1.5;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
}
.container-wide { max-width: 720px; }

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
}
.header h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-light); }

.btn-google {
  background: white;
  color: #1F2937;
  width: 100%;
  height: 50px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.btn-google:hover { background: #F8FAFC; }
.btn-google img { width: 20px; height: 20px; }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: white; }

.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
}
.btn-icon:hover { background: var(--surface-light); }

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.form-control::placeholder { color: var(--text-muted); }
.field-error { border-color: var(--error) !important; }
select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Profile Card ── */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}
.profile-card:hover { border-color: var(--primary-light); }
.profile-card .accent { height: 3px; background: var(--primary); }
.profile-card .body { padding: 16px; }
.profile-card .row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-card .avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .info { flex: 1; min-width: 0; }
.profile-card .name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-card .meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.profile-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.profile-card .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}
.badge-pending { background: rgba(245,158,11,0.12); color: #D97706; }
.badge-approved { background: rgba(16,185,129,0.12); color: #059669; }

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.feature-item {
  text-align: center;
  padding: 16px 8px;
  background: var(--surface-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.feature-item i {
  font-size: 28px;
  color: var(--primary-light);
  display: block;
  margin-bottom: 6px;
}
.feature-item span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state i {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}
.empty-state h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--text);
}
.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  z-index: 9999;
  transition: all 0.3s ease;
  opacity: 0;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-error {
  background: rgba(239,68,68,0.08);
  border-color: var(--error);
  color: var(--error);
}

/* ── Loading ── */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(248,250,252,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.spinner-lg {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── User Avatar ── */
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.user-initials {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .container { padding: 16px 12px; }
  .form-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}

/* ── File upload preview ── */
.file-upload-area {
  width: 100%;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  position: relative;
}
.file-upload-area:hover { border-color: var(--primary-light); background: rgba(37,99,235,0.03); }
.file-upload-area.has-image { border-style: solid; }
.file-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.file-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ── Section ── */
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.section-title .accent {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--primary-light);
}
.section-title .accent-tertiary { background: var(--tertiary); }

/* ── Spinner Variant ── */
.loading-dots { display: flex; gap: 5px; justify-content: center; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-light); animation: ld 1.2s ease-in-out infinite both; }
.loading-dots span:nth-child(1) { animation-delay: -0.24s; }
.loading-dots span:nth-child(2) { animation-delay: -0.12s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }
@keyframes ld { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }
