/* ========================================================================
   File: /public/assets/styles.css
   Design: Full-white, Norm brand accents (blue + lime), aligned navbar
   ======================================================================== */

/* Base */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: white; color: #0f172a; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Brand tokens */
:root{
  --bg:#ffffff;
  --ink:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --border-strong:#d1d5db;
  --card:#ffffff;
  --shadow:0 6px 24px rgba(15,23,42,.06);
  --radius:16px;

  --brand-blue:#0b2e5b;   /* Norm blue */
  --brand-lime:#8bd80d;   /* Norm lime */

  --primary:var(--brand-blue);
  --primary-ink:#ffffff;

  --focus:0 0 0 3px rgba(11,46,91,.18);
  --hover:#f9fafb;
}

/* Containers */
.container{ max-width:960px; margin:0 auto; padding:24px 16px; }

/* Navbar (aligned to container via .navbar-inner) */
.navbar{
  position: sticky; top: 0; z-index: 50;
  background:#fff; border-bottom:1px solid var(--border);
  height:64px;
}
.navbar-inner{
  max-width:960px; margin:0 auto; padding:0 16px; height:64px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand-logo{ height:36px; width:auto; }
.brand-name{ display:none !important; } /* logo only */

/* Desktop menu */
.nav-menu{ display:flex; gap:16px; align-items:center; }
.nav-link{
  position:relative;
  padding:8px 10px; border-radius:10px; border:1px solid transparent;
  color:var(--ink); font-weight:550; transition: box-shadow .2s, border-color .2s, background .2s;
}
.nav-link:hover{
  border-color: var(--brand-lime);
  box-shadow: 0 0 0 3px rgba(139,216,13,.18);
}
.nav-link.active{ color:var(--primary); }
.nav-link.active::after{
  content:""; position:absolute; left:10px; right:10px; bottom:-6px;
  height:2px; background:var(--primary); border-radius:2px;
}
.nav-link.active::before{
  content:""; position:absolute; right:6px; top:8px; width:6px; height:6px;
  background:var(--brand-lime); border-radius:50%;
}

/* Burger (mobile) */
.nav-toggle{
  display:none; background:#fff; border:1px solid var(--border);
  border-radius:12px; width:42px; height:42px; align-items:center; justify-content:center; gap:3px;
}
.nav-toggle span{ display:block; width:18px; height:2px; background:var(--primary); }
@media (max-width:900px){
  .nav-toggle{ display:inline-flex; }
  .nav-menu{ display:none; }
  .navbar-inner{ padding:0 12px; }
}

/* User menu + dropdown */
.user-menu{ position:relative; display:flex; align-items:center; }
.user-btn{
  display:flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:12px; border:1px solid var(--border);
  background:#fff; color:var(--ink); height:40px; cursor:pointer; transition:border-color .2s, box-shadow .2s;
}
.user-btn:hover,
.user-btn:focus-visible{
  border-color: var(--brand-lime);
  box-shadow: 0 0 0 3px rgba(139,216,13,.18);
}
.user-name{ font-weight:600; }
.user-role{
  color:#475569; font-size:12px; padding:1px 6px;
  border:1px solid var(--border); border-radius:999px; background:#fff;
}
.user-btn .dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--brand-lime); box-shadow:0 0 0 3px rgba(139,216,13,.22);
}
.chev{ width:16px; height:16px; opacity:.7; }

.user-dropdown{
  position:absolute; right:0; top:48px; min-width:240px;
  background:#fff; border:1px solid var(--border); border-radius:12px;
  box-shadow:0 12px 28px rgba(15,23,42,.08); padding:8px; display:none;
}
.user-dropdown.open{ display:block; }
.dd-section{ padding:6px 8px; }
.dd-line{ display:flex; flex-direction:column; gap:2px; }
.dd-label{ color:#6b7280; font-size:12px; }
.dd-item{ display:block; padding:10px 10px; border-radius:10px; color:var(--ink); }
.dd-item:hover{ background:var(--hover); }
.dd-item.danger{ color:#b91c1c; }
.dd-sep{ border:0; border-top:1px solid var(--border); margin:6px 4px; }

/* Mobile drawer */
.nav-drawer{
  position:fixed; inset:0 30% 0 0; max-width:320px;
  background:#fff; border-right:1px solid var(--border);
  transform:translateX(-100%); transition:transform .2s ease; z-index:60;
}
.nav-drawer.open{ transform:translateX(0); }
.nav-drawer-head{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  height:64px; padding:0 14px; border-bottom:1px solid var(--border);
}
.nav-close{ background:#fff; border:1px solid var(--border); border-radius:10px; height:36px; width:36px; cursor:pointer; }
.nav-drawer-menu{ padding:10px; display:grid; gap:8px; }
.nav-drawer-menu .nav-link{
  padding:10px 12px; border:1px solid var(--border); border-radius:10px; transition:border-color .2s, box-shadow .2s;
}
.nav-drawer-menu .nav-link:hover{
  border-color: var(--brand-lime);
  box-shadow: 0 0 0 3px rgba(139,216,13,.18);
}
.nav-drawer-backdrop{ position:fixed; inset:0; background:rgba(15,23,42,.25); z-index:55; }

/* Cards */
.card{
  background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:22px; box-shadow:0 20px 60px rgba(15,23,42,.06);
  transition:box-shadow .2s, transform .2s;
}
.card:hover{ transform:translateY(-1px); box-shadow:0 24px 60px rgba(15,23,42,.08); }
.card h2{ margin:0 0 10px 0; letter-spacing:-0.01em; }

/* Buttons (hover/focus -> lime) */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  height:42px; padding:0 14px; border-radius:12px;
  border:1px solid var(--border); background:#fff; color:var(--ink);
  font-weight:550; transition: background .2s, border-color .2s, color .2s, transform .06s, box-shadow .2s;
  cursor:pointer; user-select:none;
}
.btn:active{ transform:translateY(1px); }
.btn:focus-visible{ outline:none; box-shadow:var(--focus); }
.btn:hover,
.btn:focus-visible{
  background: var(--brand-lime);
  border-color: var(--brand-lime);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139,216,13,.22);
}
.btn-primary{
  background:var(--primary); color:var(--primary-ink); border-color:var(--primary);
}
.btn-primary:hover,
.btn-primary:focus-visible{
  background: var(--brand-lime);
  border-color: var(--brand-lime);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139,216,13,.22);
}
.btn-ghost{ background:#fff; color:var(--ink); border-color:var(--border); }
.btn-ghost-link{ color:var(--muted); font-weight:500; }
.btn-ghost-link:hover{ color:var(--primary); }

/* Inputs */
.input{
  width:100%; height:44px; padding:10px 12px; border-radius:12px;
  border:1px solid var(--border); background:#fff; color:var(--ink);
  outline:none; transition:border-color .15s, box-shadow .15s, background .15s;
}
.input:focus{ border-color:var(--border-strong); box-shadow:var(--focus); }

/* Grid helper */
.row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:720px){ .row{ grid-template-columns:1fr; } }
label{ display:block; font-weight:550; margin-bottom:8px; }
label > .input{ margin-top:6px; }

/* Feedback */
.flash{
  padding:12px 14px; border-radius:12px; margin-bottom:14px;
  background:#fff; border:1px solid var(--border); color:var(--ink); box-shadow:var(--shadow);
}
.muted{ color:var(--muted); font-size:14px; margin:6px 0; }

/* Auth (login) split full page) */
.auth-body{ background:#fff; }
.auth-shell{ display:grid; grid-template-columns:1fr 1fr; min-height:100vh; }
.auth-visual{ position:relative; overflow:hidden; }
.auth-visual-img{ position:absolute; inset:0; background-size:cover; background-position:center; transform:scale(1.02); }
.auth-form{ display:flex; align-items:center; justify-content:center; padding:40px 32px; background:#fff; }
.auth-card{
  width:100%; max-width:420px; background:#fff; border:1px solid var(--border);
  border-radius:16px; padding:24px; box-shadow:0 8px 28px rgba(15,23,42,.06);
}
.auth-brand{ display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.auth-logo{ height:56px; width:auto; }
.auth-title{ margin:6px 0 14px 0; font-size:22px; font-weight:650; letter-spacing:-.01em; text-align:center; }
.auth-form-fields{ display:grid; gap:12px; }
.auth-submit{
  width:100%; margin-top:6px;
  background:#e5e7eb; color:#6b7280; border-color:#e5e7eb;
  transition: background .2s, border-color .2s, color .2s, transform .06s, box-shadow .2s;
}
.auth-submit:hover,
.auth-submit:focus-visible{
  background: var(--brand-lime);
  border-color: var(--brand-lime);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139,216,13,.28);
}
.auth-links{ display:flex; justify-content:center; margin-top:10px; }
.auth-footer{ margin-top:14px; text-align:center; color:var(--muted); font-size:14px; }

/* Footer aligned with grid */
footer{ max-width:960px; margin:24px auto 0; padding:0 16px; }

/* Responsive */
@media (max-width:900px){
  .nav-toggle{ display:inline-flex; }
  .nav-menu{ display:none; }
}
@media (max-width:920px){
  .auth-shell{ grid-template-columns:1fr; min-height:auto; }
  .auth-visual{ height:32vh; }
  .auth-card{ box-shadow:0 4px 16px rgba(15,23,42,.05); }
}
