[x-cloak] { display: none !important; }

:root {
  --brand-primary: #FF6B35;
  --brand-dark: #1F2937;
  --brand-light-bg: #F8F9FB;
  --brand-surface: #FFFFFF;
  --brand-border: #E5E7EB;
  --brand-success: #16A34A;
  --brand-warning: #F59E0B;
  --brand-danger: #DC2626;
  --brand-text: #1F2937;
  --brand-text-muted: #6B7280;
  --radius: 10px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .06);
}

body {
  background: var(--brand-light-bg);
  color: var(--brand-text);
}

.btn-brand {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.btn-brand:hover,
.btn-brand:focus {
  background: color-mix(in srgb, var(--brand-primary) 85%, black);
  border-color: color-mix(in srgb, var(--brand-primary) 85%, black);
  color: #fff;
}

.card {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.auth-split {
  min-height: 100vh;
}
.auth-split__brand {
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}
.auth-split__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.text-brand { color: var(--brand-primary); }
.link-brand { color: var(--brand-primary); text-decoration: none; }
.link-brand:hover { text-decoration: underline; }

/* ==========================================================================
   /app shell — sidebar + topbar + content area (Page 3 onward)
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: #f6f7f9;
}
.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}
.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.25rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.75rem;
}
.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.75rem;
}
.app-sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.app-sidebar__nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.app-sidebar__nav a.active {
  background: var(--brand-primary);
  color: #fff;
}
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-topbar {
  height: 60px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}
.app-topbar__spacer { flex-grow: 1; }
.app-topbar__user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #495057;
}
.app-content {
  padding: 1.75rem;
  flex-grow: 1;
}
.kpi-card .card-body { padding: 1.25rem; }
.kpi-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.kpi-card__value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.kpi-card__label { color: #868e96; font-size: 0.85rem; margin-top: 0.25rem; }


/* ==========================================================================
   Page 4 — Modules (Module Builder)
   ========================================================================== */
.module-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 0.6rem;
  background: var(--brand-primary, #FF6B35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}
.module-card { transition: box-shadow 0.15s, transform 0.15s; }
.module-card:hover { box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08); transform: translateY(-2px); }
.field-row { padding: 0.4rem 0; border-bottom: 1px solid #f1f3f5; }
.field-row:last-child { border-bottom: none; }