/* ==========================================================================
   Business Review Platform — global stylesheet
   Aligned with the Corestria / Arsela product family palette.
   ========================================================================== */

:root {
  --c-navy:        #0B1F3B;
  --c-navy-deep:   #0A0A0A;
  --c-navy-grad-a: #0c2d52;
  --c-navy-grad-b: #0f3660;
  --c-steel:       #1F4E79;
  --c-steel-2:     #2563aa;
  --c-teal:        #2DAAE1;
  --c-teal-deep:   #1aaa96;
  --c-white:       #FFFFFF;
  --c-bg:          #eef3fa;
  --c-surface:     #FFFFFF;
  --c-grey-05:     #F5F7FA;
  --c-grey-10:     #EEF2F7;
  --c-border:      #D9E1E8;
  --c-text:        #0B1F3B;
  --c-text-2:      #4a5b73;
  --c-muted:       #94a3b8;
  --c-ok:          #15a36a;
  --c-warn:        #d99012;
  --c-err:         #c43838;
  --c-info:        #4361ee;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(11,31,59,.06), 0 1px 3px rgba(11,31,59,.04);
  --shadow-md: 0 4px 14px rgba(11,31,59,.07);
  --shadow-lg: 0 12px 40px rgba(11,31,59,.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-steel-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--c-text); margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p  { margin: 0 0 .5rem; }

.muted   { color: var(--c-muted); }
.small   { font-size: .8rem; }
.subtle  { color: var(--c-text-2); }
.inline  { display: inline-block; }
.link    { color: var(--c-steel-2); font-weight: 600; }
.link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--c-steel-2); font-weight: 600; cursor: pointer; font: inherit; }
.link-btn.danger { color: var(--c-err); }

/* ==========================================================================
   Layout — sidebar + main
   ========================================================================== */
.app-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: linear-gradient(180deg, var(--c-navy-grad-a) 0%, var(--c-navy-grad-b) 100%);
  color: #cfe1ff;
  display: flex; flex-direction: column;
  padding: 1rem .75rem;
  position: sticky; top: 0;
  height: 100vh;
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  padding: .35rem .35rem 1rem;
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: .75rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  background: #fff; color: var(--c-navy);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.brand-title { font-weight: 800; font-size: .95rem; color: #fff; line-height: 1; }
.brand-sub   { font-size: .72rem; color: rgba(255,255,255,.6); letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active {
  background: var(--c-steel-2);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.nav-item.subtle { color: rgba(255,255,255,.55); }
.nav-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.sidebar-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 2px;
}

.main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 10;
}
.searchbar {
  flex: 1 1 0;
  display: flex; align-items: center;
  background: var(--c-grey-10);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 .25rem 0 .75rem;
  max-width: 640px;
}
.searchbar:focus-within {
  background: #fff;
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(45,170,225,.18);
}
.searchbar-icon { color: var(--c-muted); margin-right: .4rem; display: inline-flex; }
.searchbar-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.searchbar input {
  flex: 1; border: 0; background: transparent; outline: none;
  padding: .55rem .25rem; font: inherit; color: var(--c-text);
}
.searchbar button {
  border: 0; background: var(--c-navy); color: #fff;
  padding: .5rem .9rem; border-radius: 8px; font-weight: 600; cursor: pointer;
}

.profile {
  display: flex; align-items: center; gap: .75rem;
}
.profile-link {
  display: flex; align-items: center; gap: .5rem;
  color: var(--c-text); text-decoration: none;
  padding: .25rem .25rem .25rem .5rem;
  border-radius: 8px;
}
.profile-link:hover { background: var(--c-grey-10); text-decoration: none; }
.profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-navy), var(--c-teal));
  color: #fff; font-weight: 700; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.profile-name { font-weight: 600; }
.profile-role {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  background: var(--c-grey-10); color: var(--c-text-2);
  padding: 2px 6px; border-radius: 999px;
}
.profile-role.role-admin { background: #fde6d4; color: #8a4205; }
.profile-role.role-lead  { background: #ddeefc; color: #14457a; }
.profile-role.role-user  { background: #e6f2eb; color: #1d6a3a; }
.profile-logout {
  font-size: .85rem; color: var(--c-muted);
}

/* ==========================================================================
   Content shell
   ========================================================================== */
.content { padding: 1.25rem 1.5rem 2.5rem; max-width: 1400px; width: 100%; margin: 0 auto; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.page-head .subtitle { color: var(--c-text-2); margin: .15rem 0 0; }
.actions { display: flex; gap: .5rem; }

.section { margin-top: 1.75rem; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .65rem;
}
.section-head h2 { margin: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem;
  background: #fff; color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}
.btn:hover { border-color: var(--c-steel-2); color: var(--c-steel-2); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-teal-deep) 100%);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { color: #fff; opacity: .92; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--c-text-2); }
.btn-ghost:hover { background: var(--c-grey-10); color: var(--c-text); }
.btn-danger { background: var(--c-err); border-color: var(--c-err); color: #fff; }
.btn-danger:hover { color: #fff; opacity: .9; }
.btn-disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }

/* ==========================================================================
   Welcome panel + stats
   ========================================================================== */
.welcome {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  background: linear-gradient(120deg, #0a2d5c 0%, #1565a8 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-md);
}
.welcome h1 { color: #fff; font-size: 1.7rem; }
.welcome-blurb { color: rgba(255,255,255,.85); margin: .5rem 0 0; max-width: 560px; }
.welcome-right {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; align-items: center;
}
.stat {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: .85rem .75rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-num { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.7); margin-top: .25rem; }

/* ==========================================================================
   Tiles (dashboard nav, admin index)
   ========================================================================== */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .85rem;
}
.tile {
  display: flex; flex-direction: column;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none; color: var(--c-text);
  transition: all .15s ease;
  position: relative;
  min-height: 130px;
}
.tile:hover {
  border-color: var(--c-teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.tile-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--c-navy), var(--c-teal));
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .5rem;
}
.tile-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; }
.tile-title { font-weight: 700; font-size: 1rem; }
.tile-desc  { color: var(--c-text-2); font-size: .85rem; margin: .25rem 0 .5rem; flex: 1; }
.tile-arrow { font-size: .8rem; font-weight: 600; color: var(--c-steel-2); }

/* ==========================================================================
   Feature + Recent cards (dashboard)
   ========================================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-teal);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  color: var(--c-text); text-decoration: none;
  transition: all .15s ease;
  display: block;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--c-teal); text-decoration: none; }
.feature-card.feature-tool { border-left-color: var(--c-teal-deep); }
.feature-kind { font-size: .72rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; display: flex; align-items: center; gap: .35rem; }
.feature-title { font-weight: 700; }
.feature-desc { color: var(--c-text-2); font-size: .85rem; margin-top: .25rem; }

.recents { display: flex; flex-direction: column; gap: 4px; }
.recent-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem .75rem;
  background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
  color: var(--c-text); text-decoration: none;
}
.recent-item:hover { border-color: var(--c-teal); text-decoration: none; }
.recent-meta { color: var(--c-muted); font-size: .75rem; }

/* ==========================================================================
   Library cards
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text);
  display: flex; flex-direction: column;
  transition: all .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--c-teal); text-decoration: none; transform: translateY(-1px); }
.card-thumb {
  height: 110px; background: var(--c-grey-10);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-2); font-weight: 700; letter-spacing: .04em;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb-video, .card-thumb-audio { background: linear-gradient(135deg, #0b1f3b, #1F4E79); color: #cce8ff; }
.card-thumb-pdf   { background: linear-gradient(135deg, #fff1f0, #ffe1de); color: #b3261e; }
.card-thumb-pptx  { background: linear-gradient(135deg, #fdecd9, #fad3a6); color: #a85b0e; }
.card-thumb-doc   { background: linear-gradient(135deg, #e7efff, #cfdcfb); color: #1a4ab4; }
.card-thumb-xlsx  { background: linear-gradient(135deg, #e3f3e6, #c8ebd1); color: #1c7c3f; }
.card-thumb-url   { background: linear-gradient(135deg, #e9f7fc, #bfe9f7); color: #0a6f8d; }
.card-thumb-image { background: linear-gradient(135deg, #f4eafc, #e3d1f5); color: #6a31a8; }
.card-body { padding: .75rem .9rem .9rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-meta { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.card-title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.card-desc  { color: var(--c-text-2); font-size: .85rem; flex: 1; }
.card-foot  { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .25rem; }

.chip {
  font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  background: var(--c-grey-10); color: var(--c-text-2);
  border: 1px solid var(--c-border);
}
.chip.subtle { background: transparent; border-style: dashed; }

.version { font-size: .72rem; color: var(--c-muted); font-weight: 600; }

/* ==========================================================================
   Badges / status
   ========================================================================== */
.badge {
  font-size: .68rem; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .04em;
  background: var(--c-grey-10); color: var(--c-text-2);
}
.badge-video { background: #e9f1fc; color: #14457a; }
.badge-audio { background: #f2ebfc; color: #5b2a9d; }
.badge-pdf   { background: #fde7e5; color: #a51e15; }
.badge-pptx  { background: #fcecd5; color: #91490b; }
.badge-doc   { background: #e3edff; color: #14457a; }
.badge-xlsx  { background: #d8efe0; color: #14693a; }
.badge-image { background: #f3e5fb; color: #5a1b8a; }
.badge-url   { background: #d6f0fa; color: #0a6f8d; }
.badge-other { background: var(--c-grey-10); color: var(--c-text-2); }

.status {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px;
}
.status-ok    { background: #e6f2eb; color: #1d6a3a; }
.status-warn  { background: #fdf2d1; color: #885d05; }
.status-info  { background: #e7eefc; color: #25448a; }
.status-muted { background: var(--c-grey-10); color: var(--c-muted); }

.tag {
  display: inline-block; font-size: .72rem; padding: 2px 8px;
  border-radius: 4px; background: var(--c-grey-10); color: var(--c-text-2);
  margin: 0 4px 4px 0;
}

/* ==========================================================================
   Filters bar
   ========================================================================== */
.filters {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: .65rem .75rem;
  margin: .25rem 0 1rem;
}
.filters input[type="search"],
.filters select {
  padding: .5rem .65rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font: inherit; color: var(--c-text);
  background: #fff;
  min-height: 36px;
}
.filters input[type="search"] { flex: 1 1 240px; min-width: 200px; }

.filter-chips { display: flex; gap: .35rem; flex-wrap: wrap; margin: -.5rem 0 1rem; }
.filter-chip {
  padding: .35rem .8rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  font-weight: 600; font-size: .8rem;
  text-decoration: none;
}
.filter-chip:hover { border-color: var(--c-teal); color: var(--c-text); text-decoration: none; }
.filter-chip.active { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }

/* ==========================================================================
   Tool cards
   ========================================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1rem 1rem .85rem;
  display: flex; flex-direction: column; gap: .5rem;
  position: relative;
  transition: all .15s ease;
}
.tool-card:hover { box-shadow: var(--shadow-md); border-color: var(--c-teal); }
.tool-card.status-coming_soon { opacity: .85; }
.tool-card.status-archived    { opacity: .55; }
.tool-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--c-steel), var(--c-teal));
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.tool-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tool-title { font-weight: 700; font-size: 1rem; }
.tool-desc { color: var(--c-text-2); font-size: .9rem; }
.tool-notes { color: var(--c-text-2); font-size: .82rem; }
.tool-foot { margin-top: .25rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ==========================================================================
   Detail page
   ========================================================================== */
.back {
  display: inline-flex; align-items: center; gap: .25rem;
  color: var(--c-text-2); text-decoration: none; font-weight: 600;
  margin-bottom: .75rem;
}
.back:hover { color: var(--c-steel-2); text-decoration: none; }

.detail {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
}
.detail-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.detail-meta { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin-bottom: .25rem; }
.detail-desc { color: var(--c-text-2); margin-top: .5rem; max-width: 760px; }
.detail-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.preview { margin: 1rem 0 .25rem; background: #000; border-radius: var(--r-md); overflow: hidden; }
.preview iframe, .preview video { width: 100%; min-height: 420px; display: block; border: 0; }
.preview.audio { background: transparent; padding: 1rem; }
.preview.audio audio { width: 100%; }
.preview.image { background: var(--c-grey-10); padding: 1rem; text-align: center; }
.preview.image img { max-width: 100%; max-height: 540px; }

.meta-grid {
  display: grid; grid-template-columns: 160px 1fr; gap: .35rem 1rem;
  margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--c-border);
}
.meta-grid dt { font-weight: 700; color: var(--c-text); }
.meta-grid dd { margin: 0; color: var(--c-text-2); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.form label {
  display: flex; flex-direction: column; gap: .25rem;
  font-weight: 600; font-size: .85rem; color: var(--c-text);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="url"],
.form input[type="number"],
.form input[type="password"],
.form input[type="date"],
.form input:not([type]),
.form select,
.form textarea {
  padding: .55rem .7rem;
  font: inherit;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
  color: var(--c-text);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 0; border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(45,170,225,.18);
}
.form input[disabled] { background: var(--c-grey-05); color: var(--c-muted); }
.form .row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem;
}
.form-actions { display: flex; gap: .5rem; padding-top: .5rem; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.table th, .table td {
  text-align: left;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--c-border);
  font-size: .9rem;
}
.table th { background: var(--c-grey-05); font-weight: 700; color: var(--c-text); }
.table tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: .65rem; }

/* ==========================================================================
   Auth page
   ========================================================================== */
.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at 80% 20%, #1565a8 0%, #0a2d5c 60%);
  padding: 1rem;
}
.auth-body .main { flex: none; background: transparent; }
.auth-body .topbar { display: none; }
.auth-body .content { padding: 0; max-width: none; }

.auth-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 2rem 2rem 1.75rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.auth-brand-mark {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--c-navy), var(--c-teal));
  color: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.auth-brand-title { font-weight: 800; font-size: 1.1rem; }
.auth-brand-sub   { font-size: .8rem; color: var(--c-text-2); }
.auth-blurb { color: var(--c-text-2); margin: .5rem 0 1rem; font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: .65rem; }
.auth-form label { display: flex; flex-direction: column; gap: .2rem; font-weight: 600; font-size: .8rem; }
.auth-form input {
  padding: .65rem .75rem; border-radius: 8px; border: 1px solid var(--c-border);
  background: #dce8f5; font: inherit;
}
.auth-form input:focus { background: #fff; outline: 0; border-color: var(--c-teal); box-shadow: 0 0 0 3px rgba(45,170,225,.2); }
.auth-form .btn-primary {
  margin-top: .25rem;
  background: linear-gradient(135deg, #0a2d5c 0%, #1aaa96 100%);
}
.auth-error {
  background: #fde7e5; color: #a51e15;
  padding: .6rem .8rem; border-radius: 8px; font-size: .85rem; margin-bottom: .5rem;
}
.auth-hint {
  margin-top: 1rem; font-size: .75rem; color: var(--c-muted); line-height: 1.6;
}
.auth-hint code { background: var(--c-grey-10); padding: 1px 6px; border-radius: 4px; color: var(--c-text); }

/* ==========================================================================
   Empty, flash, misc
   ========================================================================== */
.empty {
  background: #fff;
  border: 1px dashed var(--c-border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  text-align: center;
  color: var(--c-text-2);
}
.empty.subtle { background: transparent; border: 0; padding: .5rem 0; }

.flash {
  padding: .55rem .85rem; border-radius: 8px;
  font-size: .9rem; margin: 0 0 1rem;
}
.flash-ok   { background: #e2f4e9; color: #155f33; }
.flash-err  { background: #fde7e5; color: #a51e15; }
.flash-warn { background: #fdf2d1; color: #8a5d05; }

.resource-section {
  border: 1px dashed var(--c-border);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  background: #fafcff;
  display: flex; flex-direction: column; gap: .65rem;
}
.resource-section-head { display: flex; flex-direction: column; gap: .1rem; }

.card-panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.25rem;
}
.card-panel h2 { margin-top: 0; }

.profile-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ==========================================================================
   Planning hero
   ========================================================================== */
.planning-hero {
  background: linear-gradient(120deg, #0a2d5c 0%, #1565a8 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.planning-hero h2 { color: #fff; margin-top: 0; display: inline-flex; align-items: center; gap: .5rem; }
.planning-hero p { color: rgba(255,255,255,.85); margin: .25rem 0 0; }
.planning-hero-empty { background: linear-gradient(120deg, #1f4e79 0%, #29708f 100%); }
.planning-hero-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.planning-hero .btn-primary {
  background: #fff; color: var(--c-navy);
}
.planning-hero .btn-primary:hover { color: var(--c-navy); }
.btn-ghost-light {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.4);
}
.btn-ghost-light:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.08); }

.guidance {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 1rem 1.25rem;
}
.guidance ol { margin: 0; padding-left: 1.25rem; }
.guidance li { margin-bottom: .35rem; color: var(--c-text); }

/* ==========================================================================
   404
   ========================================================================== */
.not-found {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 3rem 1.5rem; text-align: center;
  max-width: 520px; margin: 3rem auto;
}
.not-found-mark {
  font-size: 3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c-navy), var(--c-teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .app-body { flex-direction: column; }
  .sidebar {
    flex: none; width: 100%; height: auto; position: relative;
    flex-direction: row; align-items: center; gap: .25rem;
    padding: .5rem .75rem;
    overflow-x: auto;
  }
  .brand { padding: 0; border: 0; margin: 0 .5rem 0 0; flex: none; }
  .nav { flex-direction: row; gap: 2px; flex: 1; }
  .nav-item { padding: .4rem .55rem; font-size: .85rem; white-space: nowrap; }
  .nav-item span:not(.nav-icon) { display: none; }
  .sidebar-footer { margin: 0; padding: 0; border: 0; flex-direction: row; }
  .sidebar-footer .nav-item span:not(.nav-icon) { display: none; }
  .welcome { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .planning-hero { flex-direction: column; align-items: flex-start; }
  .topbar { flex-wrap: wrap; }
  .profile-name { display: none; }
}
