/* DoctrineScout — Bootstrap 5.3 supplement + GitHub dark theme */

/* ── CSS vars (backward compat for inline var() refs in views) ── */
:root {
  --bg:        #0d1117;
  --surface:   #0d1117;
  --card:      #161b22;
  --highlight: #1c2128;
  --border:    #30363d;
  --border-hi: #1f6feb;
  --accent:    #58a6ff;
  --accent-hi: #8ab7ff;
  --accent2:   #d29922;
  --text:      #c9d1d9;
  --muted:     #8b949e;
  --success:   #238636;
  --warning:   #e3b341;
  --radius:    6px;
}

/* Custom scrollbars */
* { scrollbar-width: thin; scrollbar-color: #30363d #0d1117; }

/* ── Bootstrap overrides — GitHub dark palette ── */
body  { background: #0d1117 !important; color: #c9d1d9 !important; }
.navbar { background: #161b22 !important; border-bottom: 1px solid #30363d; }
.card { background: #161b22 !important; border: 1px solid #30363d !important;
        margin-bottom: 1rem; padding: 1.25rem; }
.card-header { background: #1c2128 !important; border-bottom: 1px solid #30363d !important;
               font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #8b949e;
               margin: -1.25rem -1.25rem .75rem -1.25rem; border-radius: 0; }
.form-select,
.form-control      { background: #0d1117 !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.form-select:focus,
.form-control:focus { border-color: #58a6ff !important; box-shadow: none !important; }
.form-select option { background: #161b22; color: #c9d1d9; }
label, .form-label  { color: #c9d1d9 !important; }
.btn-primary       { background: #238636 !important; border-color: #238636 !important; color: #fff !important; }
.btn-primary:hover { background: #2ea043 !important; border-color: #2ea043 !important; }
.btn-outline-secondary       { color: #8b949e !important; border-color: #30363d !important; }
.btn-outline-secondary:hover { background: #21262d !important; color: #c9d1d9 !important; border-color: #30363d !important; }
.btn-outline-danger       { color: #f85149 !important; border-color: rgba(248,81,73,.5) !important; }
.btn-outline-danger:hover { background: rgba(248,81,73,.1) !important; color: #f85149 !important; }
.btn-outline-warning       { color: #e3b341 !important; border-color: rgba(227,179,65,.5) !important; }
.btn-outline-warning:hover { background: rgba(227,179,65,.1) !important; }
.btn-link { color: #8b949e !important; }
.btn-link:hover { color: #c9d1d9 !important; }
.table { color: #c9d1d9 !important; --bs-table-bg: transparent; }
.table thead th { border-color: #30363d; color: #8b949e; font-size: .78rem;
                  text-transform: uppercase; letter-spacing: .07em; }
.table tbody tr:hover td { background: #1c2128 !important; }
.table td, .table th { border-color: #21262d; vertical-align: middle; }
a { color: #58a6ff; text-decoration: none; }
a:hover { color: #8ab7ff; }
.text-muted { color: #8b949e !important; }

/* ── Navbar branding ── */
.ds-logo { font-size: .95rem; font-weight: 700; color: #58a6ff !important; letter-spacing: .12em;
           text-transform: uppercase; text-decoration: none !important; white-space: nowrap; flex-shrink: 0; }
.ds-logo span { color: #c9d1d9; font-weight: 400; }
.ds-logo:hover { color: #8ab7ff !important; }
.ds-tagline { font-size: .68rem; color: #8b949e; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ds-nav-link { font-size: .8rem; color: #8b949e; text-decoration: none !important; }
.ds-nav-link:hover { color: #c9d1d9; }
.ds-breadcrumb { font-size: .78rem; color: #8b949e; white-space: nowrap; overflow: hidden;
                 text-overflow: ellipsis; min-width: 0; }
.ds-breadcrumb a { color: #58a6ff; text-decoration: none; }
.ds-breadcrumb a:hover { color: #8ab7ff; }

/* ── Stats tiles ── */
.stats { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.stat { background: #161b22; border: 1px solid #30363d; border-left: 2px solid #1f6feb;
        border-radius: 6px; padding: .75rem 1.125rem; flex: 1; min-width: 120px; }
.stat-label { font-size: .65rem; color: #8b949e; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .09em; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: #c9d1d9; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 1px solid #30363d; margin-bottom: 1.25rem;
        overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 9px 16px; cursor: pointer; color: #8b949e; font-size: .72rem; font-weight: 700;
       letter-spacing: .07em; text-transform: uppercase; border-bottom: 2px solid transparent;
       white-space: nowrap; flex-shrink: 0; margin-bottom: -1px; }
.tab:hover { color: #c9d1d9; }
.tab.active { color: #8ab7ff; border-bottom-color: #1f6feb; background: rgba(31,111,235,.08); }

/* ── Page header ── */
.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 1.4rem; font-weight: 700; color: #c9d1d9; }
.page-subtitle { color: #8b949e; font-size: .78rem; margin-top: .25rem; }

/* ── Card title (DS sectioning, distinct from Bootstrap's .card-header) ── */
.card-title { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
              color: #8b949e; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid #30363d; }

/* ── Loading / error / empty ── */
.loading { text-align: center; padding: 3rem; color: #8b949e; font-size: .75rem;
           text-transform: uppercase; letter-spacing: .1em; }
.error-box { background: rgba(248,81,73,.08); border: 1px solid rgba(248,81,73,.4);
             border-left: 3px solid #f85149; padding: .75rem 1rem; color: #f85149;
             font-size: .875rem; border-radius: 6px; margin-bottom: 1rem; }
.empty-state { text-align: center; padding: 3rem; color: #484f58; }
.empty-state .icon { font-size: 2rem; margin-bottom: .5rem; opacity: .4; }

/* ── Table helpers ── */
.table-wrap { overflow-x: auto; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #58a6ff !important; }
th.sort-asc::after  { content: ' ↑'; color: #58a6ff; }
th.sort-desc::after { content: ' ↓'; color: #58a6ff; }
.clickable-row { cursor: pointer; }
.table-pager { display: flex; align-items: center; gap: .75rem; padding: .625rem .25rem; }
.pager-info { color: #8b949e; font-size: .75rem; }

/* ── Badge variants ── */
.badge { letter-spacing: .05em; text-transform: uppercase; font-size: .68rem !important; font-weight: 700 !important; }
.badge-blue  { background: rgba(31,111,235,.2)  !important; color: #58a6ff !important; border: 1px solid rgba(31,111,235,.5); }
.badge-red   { background: rgba(248,81,73,.1)   !important; color: #f85149 !important; border: 1px solid rgba(248,81,73,.4); }
.badge-green { background: rgba(35,134,54,.15)  !important; color: #3fb950 !important; border: 1px solid rgba(35,134,54,.35); }
.badge-muted { background: #0d1117               !important; color: #8b949e !important; border: 1px solid #30363d; }

/* ── Toggle buttons ── */
.toggle-btns { display: flex; gap: 2px; }
.toggle-btn { padding: .25rem .75rem; background: transparent; border: 1px solid #30363d;
              border-radius: 6px; color: #8b949e; font-size: .68rem; font-weight: 700;
              letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.toggle-btn:hover { color: #c9d1d9; border-color: #8b949e; }
.toggle-btn.active { background: rgba(31,111,235,.15); border-color: #1f6feb; color: #58a6ff; }

/* ── Activity dots ── */
.activity-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px;
                vertical-align: middle; margin-right: 6px; flex-shrink: 0; }
.dot-green  { background: #238636; box-shadow: 0 0 4px #238636; }
.dot-yellow { background: #e3b341; }
.dot-gray   { background: #30363d; }

/* ── Ship images ── */
.ship-icon { width: 32px; height: 32px; border-radius: 4px; object-fit: cover;
             vertical-align: middle; margin-right: 8px; background: #0d1117; border: 1px solid #30363d; }
.ship-render { width: 256px; height: 256px; border-radius: 6px; object-fit: cover;
               display: block; background: #0d1117; border: 1px solid #30363d; }

/* ── Fit layout grid ── */
.fit-layout { display: grid; grid-template-columns: auto 1fr 1fr; gap: 1rem; align-items: start; }
.fit-layout > div { min-width: 0; }

/* ── Module slots ── */
.slot-group { margin-bottom: .875rem; }
.slot-label { font-size: .65rem; color: #58a6ff; font-weight: 700; text-transform: uppercase;
              letter-spacing: .1em; margin-bottom: .3rem; padding-bottom: .2rem; border-bottom: 1px solid #30363d; }
.module-item { padding: .2rem 0; font-size: .875rem; }
.module-item .charge-tag { font-size: .7rem; color: #8b949e; margin-left: 6px; }

/* ── Variant rows ── */
.variant-row td { font-size: .8rem; color: #8b949e; }

/* ── Misc ── */
.mono { font-family: 'Consolas', 'Courier New', monospace; font-size: .875rem; }
.external-link::after { content: ' ↗'; font-size: .7em; opacity: .5; }
.section-divider { border: none; border-top: 1px solid #30363d; margin: 1.25rem 0; }

/* ── Admin password overlay ── */
.login-box { background: #161b22; border: 1px solid #30363d; border-radius: 8px;
             padding: 2rem; width: 100%; max-width: 340px; }

/* ── Mobile ── */
@media (max-width: 720px) {
  .fit-layout { grid-template-columns: 1fr; }
  .fit-layout > div:first-child { padding: 0 !important; overflow: hidden; }
  .fit-layout .ship-render { width: 100%; height: auto; max-width: none; margin: 0; }
}
@media (max-width: 576px) {
  .tab { padding: 9px 10px; }
}
