/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #080d1a;
  --surface:   #0d1628;
  --surface2:  #111d35;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #e2e8f0;
  --text2:     #8896a8;
  --text3:     #4f6070;
  --accent:    #38bdf8;
  --accent2:   #0ea5e9;
  --accent-bg: rgba(14,165,233,0.1);
  --green:     #34d399;
  --red:       #f87171;
  --red-bg:    rgba(248,113,113,0.1);
  --radius:    8px;
  --radius-lg: 12px;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 19.2px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border2) !important;
  min-height: 56px;
  padding: 0 !important;
}
.navbar .container-fluid { min-height: 56px; display: flex; align-items: center; flex-wrap: wrap; }
.navbar-brand {
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  display: flex; align-items: center; gap: 8px;
}
.brand-dot {
  width: 9px; height: 9px;
  background: var(--accent2);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent2);
  flex-shrink: 0;
}
.nav-link {
  color: var(--text2) !important;
  font-size: .95rem !important;
  padding: 6px 13px !important;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.nav-link:hover  { background: var(--surface2) !important; color: var(--text) !important; }
.nav-link.active { color: var(--text) !important; font-weight: 500; }
.navbar-text { font-size: .875rem; color: var(--text2); }
.navbar-toggler { border: none; box-shadow: none !important; color: var(--text2); font-size: 1.1rem; }

/* ── Container ─────────────────────────────────────────────────────────────── */
main.container-fluid {
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}
@media (max-width: 640px) {
  main.container-fluid { padding-top: 1rem; padding-bottom: 1.5rem; }
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  font-size: .9rem;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius) !important;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border2);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-accent, .btn-primary {
  background: var(--accent2) !important;
  border-color: var(--accent2) !important;
  color: #fff !important;
}
.btn-accent:hover, .btn-primary:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
}
.btn-outline-secondary {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text2) !important;
}
.btn-outline-secondary:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}
.btn-outline-danger {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--red) !important;
}
.btn-outline-danger:hover { background: var(--red-bg) !important; }
.btn-xs {
  height: 32px !important;
  padding: 0 11px !important;
  font-size: .8rem !important;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-control, .form-select {
  background-color: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  font-size: .9rem !important;
  height: 40px;
  padding: 0 12px !important;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-select { padding-right: 1.2rem !important; }
textarea.form-control {
  height: unset;
  padding: 10px 12px !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent2) !important;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2) !important;
}
.form-control::placeholder { color: var(--text3); }
.form-hint { font-size: .75rem; color: var(--text3); margin-top: 5px; }

/* Range */
.form-range { padding: 0; --thumb: 18px; }
.form-range::-webkit-slider-runnable-track {
  background: var(--surface2); border: 1px solid var(--border2);
  height: 5px; border-radius: 3px;
}
.form-range::-webkit-slider-thumb {
  background: var(--accent2); border: 2px solid var(--bg);
  width: var(--thumb); height: var(--thumb); margin-top: -7px; border-radius: 50%;
  box-shadow: 0 0 6px rgba(14,165,233,.4);
}
.form-range::-moz-range-track { background: var(--surface2); height: 5px; border-radius: 3px; }
.form-range::-moz-range-thumb  { background: var(--accent2); border: 2px solid var(--bg); width: var(--thumb); height: var(--thumb); border-radius: 50%; }

/* Range labels – mathematisch korrekt ausgerichtet (Daumen-Offset berücksichtigt) */
.range-labels { position: relative; height: 1.3em; margin-top: 5px; }
.range-labels span {
  position: absolute;
  transform: translateX(-50%);
  font-size: .72rem;
  color: var(--text3);
  white-space: nowrap;
  user-select: none;
}
/* left = thumb_half + (val/max) * (100% - thumb_width)   [thumb = 18px, half = 9px] */
.range-labels .rl-0    { left: 9px; }
.range-labels .rl-250  { left: calc(4.5px  + 25%); }
.range-labels .rl-500  { left: 50%; }
.range-labels .rl-750  { left: calc(-4.5px + 75%); }
.range-labels .rl-1000 { left: calc(100% - 9px); }

/* Input group */
.input-group .form-control { border-right: none !important; border-radius: var(--radius) 0 0 var(--radius) !important; }
.input-group .form-select  { border-left: 1px solid var(--border2) !important; border-radius: 0 var(--radius) var(--radius) 0 !important; flex: none; min-width: 100px; }
.input-group-text {
  background-color: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-right: none !important;
  color: var(--text3) !important;
  border-radius: var(--radius) 0 0 var(--radius) !important;
  font-size: .85rem;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table {
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: rgba(255,255,255,0.03);
  font-size: .9rem;
  margin-bottom: 0;
}
.table thead th,
.table tbody td { border-right: 1px solid var(--border); }
.table thead th:last-child,
.table tbody td:last-child { border-right: none; }
.table thead th {
  color: var(--text3);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--border2);
  padding: .75rem 1.1rem;
  white-space: nowrap;
}
.table tbody td { padding: .75rem 1.1rem; border-color: var(--border); vertical-align: middle; }
@media (max-width: 1200px) {
  .table thead th, .table tbody td { padding-left: .7rem; padding-right: .7rem; }
}
@media (max-width: 900px) {
  .table thead th, .table tbody td { padding-left: .5rem; padding-right: .5rem; }
}
@media (max-width: 640px) {
  .table thead th, .table tbody td { padding-left: .35rem; padding-right: .35rem; }
}
.table-responsive { border-radius: var(--radius-lg); border: 1px solid var(--border2); background: var(--surface); overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Sort links ────────────────────────────────────────────────────────────── */
.sort-link { color: var(--text3); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; text-decoration: none; }
.sort-link:hover { color: var(--text2); }
.sort-link.active { color: var(--text2); }
.sort-link.active i { color: var(--accent); }

/* ── Ore pills ─────────────────────────────────────────────────────────────── */
.ore-pill {
  display: inline-flex; align-items: center;
  padding: 3px 11px;
  border-radius: 99px;
  font-size: .8rem; font-weight: 500;
  white-space: nowrap;
}
.rarity-Common    { background: #dbeafe; color: #1e40af; }
.rarity-Uncommon  { background: #dcfce7; color: #166534; }
.rarity-Rare      { background: #f3e8ff; color: #7e22ce; }
.rarity-Epic      { background: #ffedd5; color: #c2410c; }
.rarity-Legendary { background: #fef3c7; color: #92400e; }

/* ── Quality bar ───────────────────────────────────────────────────────────── */
.quality-wrap { display: flex; align-items: center; gap: 10px; }
.quality-num { font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--text); min-width: 2.4rem; }
.quality-track {
  flex: 1; min-width: 80px; max-width: 180px; height: 8px;
  background: var(--surface2);
  border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.quality-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--q-color, var(--accent2));
  transition: width .2s;
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  font-size: .72rem !important;
  font-weight: 500 !important;
  padding: 3px 8px !important;
  border-radius: 99px !important;
}
.badge-count { background: var(--surface2) !important; color: var(--text2) !important; border: 1px solid var(--border2); }
.badge-admin { background: var(--accent-bg) !important; color: var(--accent) !important; border: 1px solid rgba(14,165,233,.2); }
.badge-you   { background: var(--surface2) !important; color: var(--text3) !important; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert { font-size: .875rem; border-radius: var(--radius) !important; padding: .65rem 1rem !important; border: none !important; }
.alert-success { background: rgba(52,211,153,.1); color: #6ee7b7; }
.alert-danger  { background: var(--red-bg); color: var(--red); }
.btn-close { filter: invert(1) grayscale(1); opacity: .5; font-size: .65rem !important; }

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card {
  width: 380px;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
}
.login-brand { font-size: 1.05rem; font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 2rem; color: var(--text); }

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .5rem; }
.page-title  { font-size: 1.05rem; font-weight: 500; color: var(--text); margin: 0; display: flex; align-items: center; gap: 10px; }

/* ── Form grid ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid .span-2 { grid-column: span 1; } }

/* ── Form card – halbe Fensterbreite, zentriert ────────────────────────────── */
.form-card { max-width: 60%; }
.form-card .card-body { padding: 2rem !important; }
@media (max-width: 900px)  { .form-card { max-width: 85%; } }
@media (max-width: 640px)  { .form-card { max-width: 100%; } }

/* ── Admin layout ──────────────────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

/* ── Centered page wrapper ─────────────────────────────────────────────────── */
.page-center         { max-width: 75%; margin-left: auto; margin-right: auto; }
.page-center-narrow  { max-width: 56%; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) {
  .page-center, .page-center-narrow { max-width: 100%; }
}

/* ── Overview table wrapper ────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow: hidden; }

/* ── Responsive column hiding ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .col-hide-sm { display: none; }
  .quality-track { max-width: 80px; }
  .quality-num { min-width: 1.8rem; font-size: .8rem; }
}

/* ── Form card – halbe des page-center, zentriert ─────────────────────────── */

/* ── Search ────────────────────────────────────────────────────────────────── */
.search-wrap { max-width: 400px; min-width: 200px; flex: 1 1 200px; }

/* ── Responsive table ──────────────────────────────────────────────────────── */


/* ── Ore filter pills (clickable) ──────────────────────────────────────────── */
.ore-filter-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .8rem; font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: .55;
  transition: opacity .12s, border-color .12s, box-shadow .12s;
  user-select: none;
}
.ore-filter-pill:hover { opacity: .85; }
.ore-filter-pill.selected {
  opacity: 1;
  border-color: rgba(0,0,0,.25);
  box-shadow: 0 0 0 2px rgba(14,165,233,.4);
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text3); }
.empty-state i { font-size: 2.5rem; margin-bottom: .75rem; display: block; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-content  { background: var(--surface) !important; border: 1px solid var(--border2) !important; border-radius: var(--radius-lg) !important; }
.modal-header   { border-bottom: 1px solid var(--border) !important; padding: 1.1rem 1.4rem .85rem !important; }
.modal-body     { padding: 1.4rem !important; }
.modal-title    { font-size: .95rem; font-weight: 500; color: var(--text); }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toast-stack { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 2rem); }
@media (max-width: 480px) {
  .toast-stack { left: 1rem; right: 1rem; bottom: 1rem; }
}
.toast-item {
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
  font-size: .875rem; padding: .7rem 1.1rem; border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 9px;
  animation: toast-in .2s ease;
}
.toast-item.success::before { content: ''; width: 7px; height: 7px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
.toast-item.danger::before  { content: ''; width: 7px; height: 7px; background: var(--red);   border-radius: 50%; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
.text-muted { color: var(--text3) !important; }

/* ── Dropdown menus ─────────────────────────────────────────────────────────── */
.dropdown-menu {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
  padding: .35rem !important;
  min-width: 180px;
}
.dropdown-item {
  color: var(--text2) !important;
  border-radius: var(--radius) !important;
  font-size: .875rem !important;
  padding: .45rem .75rem !important;
  transition: background .1s, color .1s;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--surface2) !important;
  color: var(--text) !important;
}
.dropdown-item.active {
  background: var(--accent-bg) !important;
  color: var(--accent) !important;
}
.dropdown-divider {
  border-color: var(--border) !important;
  margin: .3rem .25rem !important;
}

/* ── Nested dropdown submenu ───────────────────────────────────────────────── */
.dropdown-submenu { position: relative; }
.dropdown-submenu-menu {
  display: none;
  position: absolute;
  top: 0; left: 100%;
  margin-top: -4px;
  min-width: 160px;
}
.dropdown-submenu:hover > .dropdown-submenu-menu,
.dropdown-submenu:focus-within > .dropdown-submenu-menu {
  display: block;
}

/* ── Subnav ─────────────────────────────────────────────────────────────────── */
.subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  padding: 0 0;
}
.subnav .container-fluid { display: flex; gap: .25rem; padding-top: .35rem; padding-bottom: .35rem; }
.subnav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .85rem; border-radius: var(--radius);
  font-size: .85rem; color: var(--text2); text-decoration: none;
  transition: background .12s, color .12s;
}
.subnav-link:hover { background: var(--surface2); color: var(--text); }
.subnav-link.active { background: var(--surface2); color: var(--accent); font-weight: 500; }

/* ── Home news panel ───────────────────────────────────────────────────────── */
.home-news-panel {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  width: 420px;
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  background: rgba(13,22,40,.82);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  z-index: 2;
  overflow: hidden;
}
.home-news-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--text2);
  flex-shrink: 0;
}
.home-news-btn-add {
  background: none; border: 1px solid var(--border2); color: var(--text2);
  border-radius: var(--radius); width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem;
  transition: background .12s, color .12s, border-color .12s;
}
.home-news-btn-add:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.home-news-body {
  overflow-y: auto;
  flex: 1;
  padding: .5rem;
  -webkit-overflow-scrolling: touch;
}
.home-news-body::-webkit-scrollbar { width: 4px; }
.home-news-body::-webkit-scrollbar-track { background: transparent; }
.home-news-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.home-news-item {
  padding: .65rem .75rem;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--border);
  margin-bottom: .3rem;
}
.home-news-item:last-child { border-bottom: none; margin-bottom: 0; }
.home-news-item-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
  margin-bottom: .4rem;
}
.home-news-item-title {
  font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .15rem;
}
.home-news-item-meta {
  font-size: .7rem; color: var(--text3); display: flex; align-items: center; gap: .2rem;
}
.home-news-delete {
  background: none; border: none; color: var(--text3); cursor: pointer;
  padding: 2px 4px; border-radius: 4px; font-size: .8rem; flex-shrink: 0;
  transition: color .12s;
}
.home-news-delete:hover { color: var(--red); }
.home-news-item-content {
  font-size: .82rem; color: var(--text2); line-height: 1.55;
}
.home-news-item-content p { margin: 0 0 .4rem; }
.home-news-item-content p:last-child { margin-bottom: 0; }
.home-news-item-content h1,.home-news-item-content h2,.home-news-item-content h3 {
  font-size: .9rem; font-weight: 600; color: var(--text); margin: .4rem 0 .2rem;
}
.home-news-item-content ul,.home-news-item-content ol { padding-left: 1.2rem; margin: .3rem 0; }
.home-news-item-content code {
  background: var(--surface2); border-radius: 3px; padding: .1rem .3rem;
  font-size: .78rem; color: var(--accent);
}
.home-news-item-content a { color: var(--accent); }
.home-news-empty {
  text-align: center; padding: 2rem 1rem;
  font-size: .82rem; color: var(--text3);
}
/* News create modal */
.home-news-modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 1050;
  backdrop-filter: blur(2px);
}
.home-news-modal {
  display: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(540px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  z-index: 1051;
  flex-direction: column;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.home-news-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .9rem; font-weight: 600; color: var(--text2);
  margin-bottom: 1rem;
}
@media (max-width: 768px) {
  .home-news-panel { display: none; }
}

/* ── Home hero ─────────────────────────────────────────────────────────────── */
.home-hero {
  height: calc(100vh - 56px);
  max-height: 100vh;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.home-hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 65% at center, rgba(8,13,26,.25) 0%, rgba(8,13,26,.8) 60%, rgba(8,13,26,1) 80%);
  z-index: 0;
}
.home-hero-inner {
  position: relative; z-index: 1;
  text-align: center; max-width: 680px;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  margin-bottom: 200px;
}
@media (max-width: 640px) {
  .home-hero-inner { margin-bottom: 0; }
}
.home-logo-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), #7c3aed);
  font-size: 2.5rem; color: #fff;
  box-shadow: 0 0 40px rgba(56,189,248,.35), 0 0 80px rgba(56,189,248,.15);
}
.home-title-img {
  display: block; margin: 0 auto 1rem;
  max-width: 320px; width: 70%;
  object-fit: contain;
  filter: drop-shadow(0 2px 16px rgba(56,189,248,.2));
}
.home-title {
  font-size: clamp(1.6rem, 6vw, 2.75rem); font-weight: 700; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 0;
  background: rgba(8,13,26,.65);
  padding: .2rem 1.1rem; border-radius: 99px;
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
}
.home-subtitle {
  display: inline-block;
  font-size: clamp(.8rem, 3vw, 1rem); color: var(--text2); margin-bottom: 0;
  background: rgba(8,13,26,.65);
  padding: .3rem .9rem; border-radius: 99px;
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
}
.home-motd {
  margin-top: 1rem;
  max-width: 480px;
  font-size: .9rem;
  color: #fff;
  background: rgba(8,13,26,.7);
  padding: .6rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  backdrop-filter: blur(4px);
  white-space: pre-wrap;
  text-align: center;
}
.home-trademark {
  position: absolute; bottom: 1rem; right: 1.25rem;
  font-size: .7rem; color: var(--text3); z-index: 1;
  letter-spacing: .04em;
}
.home-quicklinks {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: .6rem 1.5rem .7rem;
  background: linear-gradient(to top, rgba(8,13,26,.95) 60%, transparent);
}
.home-quicklinks-label {
  font-size: .65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text3); margin-bottom: .4rem;
  text-align: center;
}
.home-quicklinks-grid {
  display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center;
}
.home-ql-card {
  position: relative;
  display: flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem;
  background: rgba(13,22,40,.75);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text2);
  font-size: .78rem;
  backdrop-filter: blur(6px);
  transition: border-color .12s, color .12s, background .12s;
  white-space: nowrap;
}
.home-ql-card i { font-size: .8rem; opacity: .7; flex-shrink: 0; }
.home-ql-preview {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  pointer-events: none;
  z-index: 10;
  object-fit: cover;
}
.home-ql-card:hover .home-ql-preview { display: block; }
.home-ql-name { font-weight: 500; color: var(--text); }
.home-ql-sub { font-size: .7rem; color: var(--text3); }
.home-ql-card:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(14,165,233,.08);
}
.home-ql-card:hover i { opacity: 1; color: var(--accent); }
@media (max-width: 640px) {
  .home-quicklinks { padding: .5rem .75rem .6rem; }
  .home-ql-sub { display: none; }
  .home-ql-card { padding: .3rem .55rem; font-size: .75rem; }
  .home-hero { padding-bottom: 280px; }
}
.home-cards {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.home-card {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; padding: 1.5rem 2rem;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); text-decoration: none;
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
  min-width: 150px;
}
.home-card i { font-size: 1.75rem; color: var(--accent); }
.home-card-title { font-weight: 500; font-size: .95rem; }
.home-card-sub { font-size: .78rem; color: var(--text3); }
.home-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,189,248,.12);
  color: var(--text);
}

/* ── Logout button ─────────────────────────────────────────────────────────── */
.btn-logout {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .8rem; border-radius: var(--radius);
  border: 1px solid var(--border2);
  color: var(--text2); text-decoration: none;
  font-size: .8rem; transition: background .15s, color .15s, border-color .15s;
}
.btn-logout:hover {
  background: rgba(248,113,113,.12);
  border-color: var(--red);
  color: var(--red);
}

/* ── Trading ───────────────────────────────────────────────────────────────── */
.trade-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .trade-layout { grid-template-columns: 1fr; }
}
.ore-trade-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 200; padding: .6rem; max-height: 220px; overflow-y: auto;
  flex-wrap: wrap; gap: .3rem;
}
.trade-item-row {
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: .4rem; flex-wrap: wrap;
}
.trade-inv-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .25rem; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.trade-inv-row:last-child { border-bottom: none; }
.trade-inv-check { flex-shrink: 0; }

/* ── Notification bell ─────────────────────────────────────────────────────── */
.nav-notif-btn {
  position: relative; display: inline-flex; align-items: center;
  padding: .3rem .5rem; border-radius: var(--radius);
  color: var(--text2); font-size: 1rem;
  background: none; border: none; cursor: pointer;
  transition: color .15s;
}
.nav-notif-btn:hover { color: var(--accent); }
.nav-notif-badge {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: #fff;
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 99px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  transform: translate(25%, -25%);
}


/* ── Navbar mobile expanded state ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .navbar-collapse { width: 100%; padding-bottom: .5rem; }
}

/* ── Decorative overview image – hide on mobile ───────────────────────────── */
@media (max-width: 768px) {
  .overview-deco { display: none !important; }
}

/* ── Admin tabs scrollable on mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav.nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1px; }
  .nav.nav-tabs .nav-link { white-space: nowrap; }
}

/* ── Admin DB ore columns ──────────────────────────────────────────────────── */
.db-ore-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .db-ore-cols { grid-template-columns: 1fr; }
}

/* ── Admin loadout ship inner grid ────────────────────────────────────────── */
.loadout-ship-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .loadout-ship-grid { grid-template-columns: 1fr; }
}

/* ── Loadout ──────────────────────────────────────────────────────────────── */
.loadout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.25rem;
}
.loadout-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.loadout-ship-img {
  width: 100%;
  height: 155px;
  object-fit: contain;
  background: var(--bg);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.loadout-body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.loadout-ship-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
}
.loadout-ship-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.loadout-erkul { font-size: .75rem; color: var(--accent); text-decoration: none; opacity: .8; transition: opacity .1s; }
.loadout-erkul:hover { opacity: 1; }
.loadout-table { width: 100%; border-collapse: collapse; margin-bottom: .75rem; }
.loadout-table tr + tr td { border-top: 1px solid var(--border); }
.loadout-table td { padding: .4rem .1rem; font-size: .82rem; vertical-align: middle; }
.loadout-slot-label {
  color: var(--text3);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  padding-right: .75rem;
  width: 1%;
}
.loadout-modules { display: flex; flex-wrap: wrap; gap: .3rem; }
.loadout-module {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .18rem .5rem;
  font-size: .78rem;
  color: var(--text2);
  white-space: nowrap;
}
.loadout-notes {
  margin-top: auto;
  padding-top: .75rem;
  font-size: .78rem;
  color: var(--text3);
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  line-height: 1.5;
}
.loadout-gadgets-bar {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: .7rem 1.1rem;
  font-size: .83rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
