/* ═══════════════════════════════════════════════════════════
   IQData Brand Design System
   Colors: Deep navy bg, cyan-blue accent, white text
   Font: Montserrat (bold headers) + Inter (body)
   ═══════════════════════════════════════════════════════════ */

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

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:          #0b1829;
  --bg2:         #0e2038;
  --surface:     #122444;
  --surface2:    #1a3158;
  --border:      rgba(255,255,255,0.08);
  --border-hover:rgba(30,155,224,0.4);
  --accent:      #1e9be0;
  --accent-lt:   #3db8ff;
  --accent-dk:   #1580bb;
  --text:        #ffffff;
  --text-muted:  rgba(255,255,255,0.5);
  --text-dim:    rgba(255,255,255,0.25);
  --error:       #ff5a6e;
  --error-bg:    rgba(255,90,110,0.1);
  --ok:          #22d3a0;
  --ok-bg:       rgba(34,211,160,0.1);
  --radius:      10px;
  --radius-pill: 999px;
  --font-head:   'Montserrat', sans-serif;
  --font-body:   'Inter', sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,0.35);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.2);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  padding: 0 2.5rem;
  height: 64px;
  background: rgba(11,24,41,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Logo ────────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0;
}

.logo .logo-iq   { color: var(--accent); }
.logo .logo-data { color: var(--text); }
.logo .logo-sub  {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.5rem;
  margin-top: 0.15rem;
  align-self: flex-end;
  padding-bottom: 0.05rem;
}

/* ── Page layout ─────────────────────────────────────────────── */
main { padding: 2.5rem 1.5rem 5rem; }

.page-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.page-wrap--wide { max-width: 1400px; }

/* ── Hero section ────────────────────────────────────────────── */
.hero { margin-bottom: 2.5rem; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 0.95rem;
  font-weight: 400;
}

.hero-sub code {
  font-family: 'Courier New', monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-lt);
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-icon { flex-shrink: 0; font-weight: 700; margin-top: 0.05rem; }

.alert--success {
  background: var(--ok-bg);
  border: 1px solid rgba(34,211,160,0.3);
  color: var(--ok);
}

.alert--error {
  background: var(--error-bg);
  border: 1px solid rgba(255,90,110,0.3);
  color: var(--error);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* ── Drop zone ───────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  margin-bottom: 1.75rem;
  background: rgba(255,255,255,0.02);
}

.drop-zone.dragover,
.drop-zone:focus-within {
  border-color: var(--accent);
  background: rgba(30,155,224,0.05);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.drop-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent);
  opacity: 0.7;
}

.drop-icon svg { width: 100%; height: 100%; }

.drop-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.drop-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.drop-link {
  color: var(--accent-lt);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.drop-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  letter-spacing: 0.06em;
  font-family: 'Courier New', monospace;
}

/* ── Schema info ─────────────────────────────────────────────── */
.schema-info { margin-bottom: 1.75rem; }

.schema-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.schema-cols { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.schema-col {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(30,155,224,0.08);
  border: 1px solid rgba(30,155,224,0.2);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
}

.col-tag {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--accent-lt);
  font-weight: 600;
}

.col-type {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn svg { width: 15px; height: 15px; }

.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 16px rgba(30,155,224,0.35);
}

.btn--primary:not(:disabled):hover {
  background: var(--accent-lt);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,155,224,0.45);
}

.btn--confirm {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 2rem;
  box-shadow: 0 4px 16px rgba(30,155,224,0.35);
}

.btn--confirm:hover {
  background: var(--accent-lt);
  transform: translateY(-1px);
}

/* ── Preview header ──────────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link svg { width: 14px; height: 14px; }
.back-link:hover { color: var(--accent-lt); }

.status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-badge--ok   { background: var(--ok-bg);    color: var(--ok);   border: 1px solid rgba(34,211,160,0.3); }
.status-badge--fail { background: var(--error-bg);  color: var(--error); border: 1px solid rgba(255,90,110,0.3); }

/* ── Data table ──────────────────────────────────────────────── */
.table-card         { padding: 0; overflow: hidden; margin-bottom: 1.5rem; }
.table-card--paged  { padding: 0; }
.table-scroll       { overflow-x: auto; }

.table-scroll--fixed {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 65vh;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table thead { background: var(--bg2); border-bottom: 1px solid var(--border); }

.data-table th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

.table-scroll--fixed .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg2);
  box-shadow: 0 1px 0 var(--border);
}

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  max-width: 260px;
  word-break: break-word;
}

.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

.row--error { background: rgba(255,90,110,0.04); }

.row-num {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.status-cell { min-width: 180px; }
.col-nombre  { min-width: 200px; }

.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  margin: 0.1rem 0.1rem 0.1rem 0;
  line-height: 1.5;
}

.pill--ok   { background: var(--ok-bg);    color: var(--ok);    border: 1px solid rgba(34,211,160,0.25); }
.pill--fail { background: var(--error-bg);  color: var(--error); border: 1px solid rgba(255,90,110,0.25); }

.error-list { display: flex; flex-direction: column; gap: 0.12rem; }

/* ── Confirm panel ───────────────────────────────────────────── */
.confirm-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid rgba(30,155,224,0.2);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.confirm-info p     { margin-bottom: 0.2rem; font-weight: 500; }
.confirm-sub        { font-size: 0.82rem; color: var(--text-muted); font-weight: 400; }
.confirm-info code  {
  font-family: 'Courier New', monospace;
  background: rgba(30,155,224,0.1);
  color: var(--accent-lt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.6rem 0;
  margin-bottom: 0.5rem;
}

.pagination-bar--bottom { margin-top: 0.5rem; margin-bottom: 1.25rem; }

.pagination-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pag-errors { color: var(--error); font-weight: 600; }

.pagination-controls { display: flex; align-items: center; gap: 0.3rem; }

.pag-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
  white-space: nowrap;
}

.pag-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pag-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(30,155,224,0.08);
}

.pag-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pag-btn--disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(30,155,224,0.12) 0%, transparent 60%),
    var(--bg);
}

.auth-wrap  { width: 100%; max-width: 420px; }

.auth-brand { text-align: center; margin-bottom: 1.75rem; }

.auth-card  { padding: 2.25rem; }

.auth-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

/* ── Form fields ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.field-input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,155,224,0.12);
}

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field-select option { background: var(--surface); }

.field-pw-wrap { position: relative; }
.field-pw-wrap .field-input { padding-right: 2.8rem; }

.pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.pw-toggle:hover { color: var(--accent-lt); }
.pw-toggle svg   { width: 16px; height: 16px; }

/* Checkbox */
.field--checkbox { flex-direction: row; align-items: center; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  user-select: none;
}

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

.checkbox-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-label input:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-box::after {
  content: '';
  display: block;
  width: 4px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Field divider */
.field-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.4rem 0;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-divider::before,
.field-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Navbar user area ─────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 0.5rem; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
}

.nav-link svg     { width: 13px; height: 13px; }
.nav-link:hover   { color: var(--text); background: rgba(255,255,255,0.06); }

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.nav-user:hover { border-color: var(--accent); color: var(--text); }

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-avatar--sm { width: 22px; height: 22px; font-size: 0.62rem; }
.nav-avatar--lg { width: 48px; height: 48px; font-size: 1.2rem; flex-shrink: 0; }

.nav-role {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-role--admin { background: rgba(30,155,224,0.15); color: var(--accent-lt); }
.nav-role--user  { background: rgba(34,211,160,0.1);  color: var(--ok); }

.nav-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  display: flex;
  align-items: center;
  transition: border-color 0.15s, color 0.15s;
}

.nav-logout svg   { width: 15px; height: 15px; }
.nav-logout:hover { border-color: var(--error); color: var(--error); }

/* ── Section title ────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── Action buttons in table ──────────────────────────────────── */
.action-btns { display: flex; align-items: center; gap: 0.4rem; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-icon svg { width: 14px; height: 14px; }

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(30,155,224,0.08);
}

.btn-icon--danger:hover {
  border-color: var(--error);
  color: var(--error);
  background: rgba(255,90,110,0.08);
}

/* ═══════════════════════════════════════════════════════════
   Sidebar + App Layout
   ═══════════════════════════════════════════════════════════ */

/* ── App body: sidebar + main side by side ────────────────── */
.app-body {
  display: flex;
  min-height: calc(100vh - 64px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, opacity 0.22s ease;
  overflow: hidden;
}

.sidebar--collapsed {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* ── Sidebar items ────────────────────────────────────────── */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sidebar-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.sidebar-item--active {
  background: rgba(30,155,224,0.12);
  color: var(--accent-lt);
}

.sidebar-item--active:hover {
  background: rgba(30,155,224,0.18);
}

/* Group button (expandable) */
.sidebar-item--group {
  position: relative;
}

.sidebar-item--open {
  color: var(--text);
}

.sidebar-chevron {
  width: 14px !important;
  height: 14px !important;
  margin-left: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-item--open .sidebar-chevron {
  transform: rotate(180deg);
}

/* ── Submenu ──────────────────────────────────────────────── */
.sidebar-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.sidebar-submenu.open {
  max-height: 300px;
}

.sidebar-subitem {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem 0.5rem 2.4rem;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sidebar-subitem svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.sidebar-subitem:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.sidebar-subitem--active {
  color: var(--accent-lt);
  background: rgba(30,155,224,0.08);
}

/* ── Main content area ────────────────────────────────────── */
.main-with-sidebar {
  flex: 1;
  padding: 2.5rem 2rem 5rem;
  min-width: 0;
  overflow-x: hidden;
}

/* Keep old main padding for pages without sidebar (auth) */
main:not(.main-with-sidebar) {
  padding: 3rem 1.5rem 5rem;
}

/* ── Sidebar toggle button in navbar ──────────────────────── */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.sidebar-toggle svg { width: 18px; height: 18px; }
.sidebar-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── Home page ────────────────────────────────────────────── */
.home-wrap {
  max-width: 900px;
}

.home-greeting {
  margin-bottom: 2.5rem;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.home-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s, background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: var(--shadow-sm);
}

.home-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,155,224,0.15);
}

.home-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(30,155,224,0.12);
  border: 1px solid rgba(30,155,224,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.home-card-icon svg { width: 22px; height: 22px; }

.home-card-body { flex: 1; }

.home-card-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.home-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.home-card-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

.home-card-arrow svg { width: 16px; height: 16px; }
.home-card:hover .home-card-arrow { color: var(--accent); transform: translateX(3px); }
