/* ── Core Platform – style ─────────────────────────────── */
:root {
  --sidebar-w: 240px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(255,255,255,.08);
  --sidebar-active: rgba(99,102,241,.25);
  --accent: #6366f1;
  --topbar-h: 58px;
  --body-bg: #f1f5f9;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--body-bg); }

/* ── Layout ─────────────────────────────────────────────── */
.core-wrapper { display: flex; min-height: 100vh; }

.core-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.core-sidebar-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.core-brand-logo { display: block; width: 74px; max-width: 100%; height: auto; }

.core-nav { list-style: none; margin: 0; padding: 12px 0; flex: 1; }
.core-nav li { margin: 2px 8px; }
.core-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.core-nav-link:hover  { background: var(--sidebar-hover); color: #fff; }
.core-nav-link.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.core-nav-link i { font-size: 16px; min-width: 20px; }
.core-sidebar-footer   { padding: 12px 8px; border-top: 1px solid rgba(255,255,255,.08); }

.core-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.core-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
}
.core-topbar-title { font-size: 17px; font-weight: 600; color: #1e293b; }
.core-topbar-right { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 13px; }

.core-content { padding: 28px; flex: 1; }

/* ── Cards ──────────────────────────────────────────────── */
.core-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.core-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}
.core-card-header h2 {
  margin: 0; font-size: 15px; font-weight: 600; color: #1e293b;
}
.core-card-body { padding: 20px; }

/* ── Stat cards ─────────────────────────────────────────── */
.core-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.core-stat {
  background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
  padding: 20px; position: relative; overflow: hidden;
}
.core-stat-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.core-stat-value { font-size: 28px; font-weight: 700; color: #1e293b; }
.core-stat-icon  { position: absolute; right: 16px; top: 16px; font-size: 28px; color: #e2e8f0; }

/* ── Tables ─────────────────────────────────────────────── */
.core-table-wrap { overflow-x: auto; }
.core-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.core-table th { background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; }
.core-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.core-table tr:last-child td { border-bottom: none; }
.core-table tr:hover td { background: #f8fafc; }

/* ── Login page ─────────────────────────────────────────── */
.core-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.core-login-card {
  background: #fff; border-radius: 16px; padding: 40px 36px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.core-login-logo {
  text-align: center; margin-bottom: 24px;
}
.core-login-logo-image { display: block; width: 190px; max-width: 100%; height: auto; margin: 0 auto 10px; }

/* ── Branding preview ───────────────────────────────────── */
.branding-preview {
  width: 100%; height: 120px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 15px;
  transition: background .4s;
}

/* ── Form utils ─────────────────────────────────────────── */
.form-section-title {
  font-size: 13px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: .06em;
  margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #f1f5f9;
}
