@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* BRImo Clean Blue Palette */
  --bri-navy-deep: #001e3d;
  --bri-navy: #002b54;
  --bri-blue-dark: #003e78;
  --bri-blue: #00529c;
  --bri-blue-vibrant: #0072e5;
  --bri-blue-light: #e8f3fc;
  --bri-blue-subtle: #f0f7fe;
  --bri-cyan: #00b4d8;
  --bri-orange: #ff7a00;
  
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --line: #e2e8f0;
  --line-light: #edf2f7;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0, 30, 61, 0.04), 0 1px 2px rgba(0, 30, 61, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(0, 30, 61, 0.06), 0 2px 6px -1px rgba(0, 30, 61, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(0, 30, 61, 0.09), 0 4px 12px -2px rgba(0, 30, 61, 0.05);
  --shadow-blue: 0 8px 24px -4px rgba(0, 114, 229, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-900);
  font: 14px/1.55 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
}

/* ==========================================================
   SHELL & LAYOUT
   ========================================================== */
.li-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

/* ==========================================================
   SIDEBAR (BRIMO CLEAN BLUE STYLE)
   ========================================================== */
.li-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px 20px;
  background: linear-gradient(180deg, #001f3f 0%, #003366 48%, #004d99 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 20;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 28px rgba(0, 26, 51, 0.18);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.li-sidebar::-webkit-scrollbar {
  width: 5px;
}
.li-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

/* Brand Header */
.li-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.li-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 4px;
}

.li-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.li-brand-text {
  min-width: 0;
  flex: 1;
}

.li-brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.li-brand-title strong {
  font-size: 15px;
  font-weight: 750;
  color: #ffffff;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.li-brand-badge {
  font-size: 9.5px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--bri-cyan), var(--bri-blue-vibrant));
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.li-brand small {
  display: block;
  color: #8bbce8;
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 1px;
}

/* Nav Menu */
.li-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.li-nav .group {
  padding: 16px 12px 6px;
  color: #7bb5ed;
  font-size: 10.5px;
  letter-spacing: 0.11em;
  font-weight: 800;
  text-transform: uppercase;
}

.li-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #c4dff8;
  font-weight: 550;
  font-size: 13.5px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.li-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #9acbf8;
  transition: color 0.18s ease, transform 0.18s ease;
}

.li-icon svg {
  width: 19px;
  height: 19px;
}

.li-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.li-nav a:hover .li-icon {
  color: #ffffff;
  transform: scale(1.08);
}

.li-nav a.active {
  background: linear-gradient(90deg, #0072e5 0%, #0056b3 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 114, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

.li-nav a.active .li-icon {
  color: #ffffff;
}

.li-nav a.active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: #56ccf2;
  border-radius: 4px;
  box-shadow: 0 0 8px #56ccf2;
}

/* Sidebar Foot (User Card + Logout) */
.li-sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.li-user-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.li-user-card:hover {
  background: rgba(255, 255, 255, 0.09);
}

.li-user-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.li-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0072e5, #00b4d8);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 114, 229, 0.35);
  position: relative;
  flex-shrink: 0;
}

.li-avatar-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #002347;
  border-radius: 50%;
}

.li-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.li-user-meta b {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.li-user-meta small {
  color: #9ac4ee;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.li-user-badge-row {
  margin-top: 8px;
}

.li-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.25);
  color: #56ccf2;
  font-size: 11px;
  font-weight: 700;
}

.li-plan-pill.is-premium {
  background: rgba(255, 122, 0, 0.18);
  border-color: rgba(255, 122, 0, 0.32);
  color: #ffa439;
}

.li-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
}

.li-plan-pill.is-premium .li-pill-dot {
  background: #ff7a00;
  box-shadow: 0 0 6px #ff7a00;
}

.li-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #d1e4f8;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.li-logout svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.li-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  transform: translateY(-1px);
}

/* ==========================================================
   MAIN CONTENT & TOPBAR (CLEAN BRIMO FEEL)
   ========================================================== */
.li-main {
  min-width: 0;
  background: var(--bg-page);
}

.li-topbar {
  height: 72px;
  padding: 0 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.li-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 760px;
  border: 1.5px solid #d0e1f3;
  background: #f8fbff;
  border-radius: 12px;
  padding: 3px 3px 3px 14px;
  transition: all 0.2s ease;
}

.li-search:focus-within {
  border-color: var(--bri-blue-vibrant);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 114, 229, 0.12);
}

.li-search-icon {
  color: var(--ink-400);
  display: grid;
  place-items: center;
  margin-right: 8px;
}

.li-search-icon svg {
  width: 18px;
  height: 18px;
}

.li-search input {
  border: 0;
  background: transparent;
  outline: none;
  padding: 10px 4px;
  flex: 1;
  min-width: 0;
  color: var(--ink-900);
  font-size: 13.5px;
}

.li-search input::placeholder {
  color: var(--ink-400);
}

.li-search button {
  border: 0;
  background: linear-gradient(135deg, var(--bri-blue), var(--bri-blue-vibrant));
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 82, 156, 0.25);
}

.li-search button:hover {
  background: linear-gradient(135deg, var(--bri-blue-vibrant), #0088ff);
  transform: translateY(-1px);
}

.li-plan {
  margin-left: auto;
  border: 1px solid #bfdbfe;
  background: var(--bri-blue-light);
  color: var(--bri-blue);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.li-plan.is-premium {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

/* Page Content (Full Wide Layout) */
.li-content {
  padding: 28px 36px 60px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.li-context {
  margin-bottom: 24px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}

.li-context svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #059669;
}

.li-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.li-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.li-heading p {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: 14px;
}

.li-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bri-blue), var(--bri-blue-vibrant));
  color: #ffffff;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 82, 156, 0.28);
  transition: all 0.2s ease;
}

.li-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.li-btn:hover {
  background: linear-gradient(135deg, var(--bri-blue-vibrant), #0088ff);
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

/* Hero Section (BRImo Style Blue Card) */
.li-hero {
  background: linear-gradient(135deg, var(--bri-navy) 0%, #004080 50%, var(--bri-blue-vibrant) 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 30px 34px;
  box-shadow: 0 16px 40px -6px rgba(0, 35, 71, 0.22);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.li-hero::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.li-hero h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.li-hero p {
  margin: 0;
  color: #d2e8ff;
  max-width: 780px;
  line-height: 1.6;
  font-size: 14px;
}

.li-hero .li-btn-hero {
  background: #ffffff;
  color: var(--bri-blue);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.li-hero .li-btn-hero:hover {
  background: #f0f7fe;
  color: var(--bri-navy);
  transform: translateY(-1px);
}

/* Metrics Section */
.li-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.li-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 22px;
  transition: all 0.2s ease;
}

.li-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.li-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}

.li-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.li-metric-icon svg {
  width: 22px;
  height: 22px;
}

.li-metric-icon.blue {
  background: #eff6ff;
  color: #0072e5;
}

.li-metric-icon.cyan {
  background: #ecfeff;
  color: #0891b2;
}

.li-metric-icon.violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.li-metric-icon.emerald {
  background: #ecfdf5;
  color: #059669;
}

.li-metric small {
  color: var(--ink-500);
  font-size: 12.5px;
  font-weight: 600;
  display: block;
}

.li-metric strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

/* Tools Grid */
.li-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 20px;
}

.li-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 750;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}

.li-card > p {
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
}

.li-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.li-tool {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fafcff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.li-tool:hover {
  background: #ffffff;
  border-color: var(--bri-blue-vibrant);
  box-shadow: 0 6px 18px rgba(0, 114, 229, 0.09);
  transform: translateY(-2px);
}

.li-tool-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.li-tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.li-tool-icon svg {
  width: 17px;
  height: 17px;
}

.li-tool-icon.blue { background: #eff6ff; color: #0072e5; }
.li-tool-icon.cyan { background: #ecfeff; color: #0891b2; }
.li-tool-icon.violet { background: #f5f3ff; color: #7c3aed; }
.li-tool-icon.orange { background: #fff7ed; color: #ea580c; }

.li-tool b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.li-tool span {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.5;
  display: block;
}

/* Steps */
.li-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.li-step {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  align-items: flex-start;
}

.li-step i {
  font-style: normal;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  background: var(--bri-blue-light);
  color: var(--bri-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.li-step strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 2px;
}

.li-step span {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.45;
}

/* ==========================================================
   AUTH PAGES (LOGIN & REGISTER)
   ========================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(480px, 1.1fr);
  background: #ffffff;
}

.auth-aside {
  padding: 56px;
  background: linear-gradient(145deg, #001e3d 0%, #003666 50%, #0072e5 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-aside h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 20px 0 14px;
}

.auth-aside p {
  color: #d1e7fc;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
}

.auth-points {
  display: grid;
  gap: 12px;
}

.auth-point {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: #e2f0fd;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 36px;
}

.auth-card {
  width: min(460px, 100%);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.auth-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink-900);
}

.auth-card > p {
  margin: 0 0 24px;
  color: var(--ink-500);
}

.auth-field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}

.auth-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-700);
}

.auth-field input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 14px;
  transition: all 0.18s ease;
}

.auth-field input:focus {
  border-color: var(--bri-blue-vibrant);
  box-shadow: 0 0 0 4px rgba(0, 114, 229, 0.12);
}

.auth-submit {
  width: 100%;
  margin-top: 12px;
}

.auth-alert {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--ink-500);
  font-size: 13px;
}

.auth-switch a {
  color: var(--bri-blue);
  font-weight: 750;
}

.auth-note {
  margin-top: 20px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 12px;
  padding: 12px 14px;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.5;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
  .li-shell {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .li-sidebar {
    padding: 18px 10px;
  }
  .li-brand-text,
  .li-nav a span:not(.li-icon),
  .li-nav .group,
  .li-user-meta,
  .li-user-badge-row,
  .li-logout span {
    display: none;
  }
  .li-brand {
    padding: 0 4px 18px;
    justify-content: center;
  }
  .li-nav a {
    justify-content: center;
    padding: 12px;
  }
  .li-nav a.active::before {
    display: none;
  }
  .li-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .li-grid {
    grid-template-columns: 1fr;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
}

@media (max-width: 640px) {
  .li-shell {
    display: block;
  }
  .li-sidebar {
    position: static;
    height: auto;
    display: block;
    padding: 14px;
  }
  .li-brand {
    padding-bottom: 12px;
    margin-bottom: 8px;
  }
  .li-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .li-nav .group {
    display: none;
  }
  .li-nav a {
    min-width: 48px;
  }
  .li-sidebar-foot {
    display: none;
  }
  .li-topbar {
    padding: 12px 16px;
    height: auto;
    flex-wrap: wrap;
  }
  .li-plan {
    display: none;
  }
  .li-content {
    padding: 18px 14px;
  }
  .li-heading h1 {
    font-size: 22px;
  }
  .li-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .li-metrics {
    grid-template-columns: 1fr;
  }
  .li-tools {
    grid-template-columns: 1fr;
  }
  .auth-main {
    padding: 24px;
  }
}
