/* The Infamous Raid Tools - dashboard. Dark slate with the IRT teal accent and the guild's gold for the brand. */
:root {
  --bg: #0a0708;
  --bg2: #110b0c;
  --panel: #150e0f;
  --panel2: #1d1213;
  --line: #2b1a1b;
  --line2: #43282a;
  --text: #ece1d6;
  --muted: #a9978b;
  --faint: #6f5e56;
  --accent: #b3232b;
  --accent2: #e0484c;
  --accent-soft: rgba(179, 35, 43, .16);
  --gold: #d7b26a;
  --gold2: #f6e8c8;
  --gold-metal: linear-gradient(180deg, #f6e8c8 0%, #d7b26a 45%, #9a7236 100%);
  --good: #7fd28a;
  --blue: #6fa8ff;
  --red: #e2615e;
  --amber: #e6c15a;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .5);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(179, 35, 43, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(215, 178, 106, .07), transparent 60%),
    linear-gradient(rgba(10, 7, 8, .9), rgba(10, 7, 8, .96)),
    url(/img/bg.jpg) center / cover fixed,
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- brand */
.brand { display: flex; align-items: center; gap: 12px; }
.crest {
  width: 48px; height: 48px; flex: none; font-size: 0; color: transparent;
  background: url(/img/crest-64.png) center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(179, 35, 43, .45));
}
.brand-text small { display: block; font-family: var(--display); font-size: 10px; letter-spacing: 3px; color: var(--gold); }
.brand-text b { display: block; font-family: var(--display); font-size: 21px; letter-spacing: .5px; line-height: 1.1;
  background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 26px;
  background: linear-gradient(180deg, rgba(22, 12, 13, .94), rgba(10, 7, 8, .97)); border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(215, 178, 106, .08);
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.on { background: linear-gradient(90deg, rgba(179, 35, 43, .28), rgba(179, 35, 43, .08)); color: var(--gold2); box-shadow: inset 2px 0 0 var(--accent2); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count:empty { display: none; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--panel2); border: 1px solid var(--line2); padding: 1px 7px; border-radius: 99px; color: var(--muted); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  width: 100%; text-align: left; cursor: pointer; transition: border-color .15s; }
.me:hover { border-color: rgba(215, 178, 106, .45); }
.me .edit { width: 15px; height: 15px; margin-left: auto; color: var(--faint); flex: none; }
.me:hover .edit { color: var(--gold); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(5, 3, 4, .72); backdrop-filter: blur(3px); }
.modal-card { width: min(440px, 100%); }
.modal-card p { margin: 0 0 14px; font-size: 13px; }
.modal-card .row { justify-content: flex-end; }
.modal-card .row > * { flex: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #2a1406;
  background: var(--gold-metal); box-shadow: 0 0 0 2px rgba(179, 35, 43, .6); flex: none; }
.me b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me span { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.me > div { min-width: 0; }

.main { padding: 26px 34px 60px; min-width: 0; position: relative; isolation: isolate; }
.main::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 230px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 7, 8, .25) 0%, rgba(10, 7, 8, .8) 65%, var(--bg) 100%), url(/img/banner.jpg) center 35% / cover;
  opacity: .75; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.top h1 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: .5px;
  background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.top p { margin: 4px 0 0; color: #c9b8aa; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.top .actions { display: flex; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- cards, kpis */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.card {
  background: linear-gradient(180deg, rgba(29, 17, 18, .88), rgba(18, 11, 12, .9)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { margin: 0 0 14px; font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--gold); font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi { position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(179, 35, 43, .18)), transparent 70%); }
.kpi .value { color: #f4e9dc; }
.kpi.gold { --glow: rgba(215, 178, 106, .2); }
.kpi.blue { --glow: rgba(111, 168, 255, .16); }
.kpi.red { --glow: rgba(226, 97, 94, .2); }
.kpi.red .value { color: var(--red); }
.two { grid-template-columns: 2fr 1fr; }
.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1200px) { .two, .three { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; height: 240px; display: block; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 150px; height: 150px; flex: none; }
.donut-center { font-size: 22px; font-weight: 700; fill: var(--text); }
.donut-sub { font-size: 10px; fill: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.vlist { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.vlist li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.vlist .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.vlist .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.bar .track { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7a1d22, var(--accent2)); }
.bar .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin: 0 -20px -18px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint);
  padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 20px; border-bottom: 1px solid rgba(31, 47, 60, .6); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(224, 72, 76, .05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.host { font-weight: 600; }

/* ---------------------------------------------------------------- pills, buttons, inputs */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line2); color: var(--muted); background: var(--bg2); }
.pill.ok { color: #a5e3ad; border-color: rgba(127, 210, 138, .45); background: rgba(127, 210, 138, .1); }
.pill.old { color: #ffb0b7; border-color: rgba(255, 95, 109, .45); background: rgba(255, 95, 109, .1); }
.pill.next { color: #a9cdff; border-color: rgba(79, 157, 255, .45); background: rgba(79, 157, 255, .1); }
.pill.gold { color: var(--gold2); border-color: rgba(217, 181, 106, .45); background: rgba(217, 181, 106, .08); }
.pill.important { color: #ffb0b7; border-color: rgba(255, 95, 109, .5); background: rgba(255, 95, 109, .12); }
.pill.update { color: #a9cdff; border-color: rgba(79, 157, 255, .5); background: rgba(79, 157, 255, .12); }
.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint); }
.status.on { background: var(--good); box-shadow: 0 0 0 3px rgba(127, 210, 138, .15); }
.status.mid { background: var(--amber); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--panel2); font-weight: 600; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { background: #26171a; border-color: #5a3134; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold-metal); border-color: #f1d494; color: #2a1406; text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { background: linear-gradient(180deg, #fff3d6 0%, #e2c07c 45%, #a87e3e 100%); }
.btn.gold { background: linear-gradient(180deg, #e8c77c, #c49a48); border-color: #f1d494; color: #2a1d06; }
.btn.danger { color: #ffb0b7; }
.btn.danger:hover { border-color: rgba(255, 95, 109, .6); background: rgba(255, 95, 109, .1); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn svg { width: 16px; height: 16px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179, 35, 43, .18); }
textarea.input { min-height: 140px; resize: vertical; }
.search { position: relative; min-width: 260px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.seg button.on { background: linear-gradient(180deg, rgba(179, 35, 43, .45), rgba(122, 29, 34, .45)); color: var(--gold2); box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 8px rgba(0, 0, 0, .3); }

/* ---------------------------------------------------------------- posts */
.posts { display: flex; flex-direction: column; gap: 12px; }
.post { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: rgba(10, 7, 8, .55); position: relative; }
.post.expired { opacity: .55; }
.post .head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.post .title { font-weight: 700; font-size: 15px; }
.post .body { color: #d6c8bb; white-space: pre-wrap; word-wrap: break-word; }
.post .meta { display: flex; gap: 12px; align-items: center; color: var(--faint); font-size: 12px; margin-top: 10px; flex-wrap: wrap; }
.post .tools { margin-left: auto; display: flex; gap: 6px; }
.post.level-important { border-color: rgba(255, 95, 109, .35); box-shadow: inset 3px 0 0 var(--red); }
.post.level-update { box-shadow: inset 3px 0 0 var(--blue); }
.post.level-info { box-shadow: inset 3px 0 0 var(--gold); }
/* how it looks in the updater (gold on dark red-brown) */
.preview-updater { border-radius: 10px; padding: 12px 14px; background: #120c0d; border: 1px solid rgba(201, 164, 92, .35); font-family: 'Segoe UI', sans-serif; }
.preview-updater .t { color: #e8cf98; font-weight: 600; font-size: 13.5px; }
.preview-updater .b { color: #d6c8b4; font-size: 12px; white-space: pre-wrap; margin-top: 3px; }
.preview-updater .tag { font-size: 10px; letter-spacing: 1.5px; color: #c9a45c; text-transform: uppercase; }

.empty { text-align: center; padding: 40px 20px; color: var(--faint); }
.empty b { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; }

/* ---------------------------------------------------------------- toast */
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px;
  box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; transition: .2s; pointer-events: none; z-index: 50; }
.toast.show { transform: none; opacity: 1; }
.toast.ok { border-color: rgba(179, 35, 43, .6); }
.toast.err { border-color: rgba(255, 95, 109, .6); }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(700px 420px at 50% 40%, rgba(179, 35, 43, .22), transparent 70%),
    linear-gradient(rgba(10, 7, 8, .5), rgba(10, 7, 8, .88)), url(/img/bg.jpg) center / cover fixed, var(--bg); }
.login {
  width: min(430px, 100%); text-align: center; padding: 38px 34px 30px; border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(26, 14, 15, .9), rgba(10, 7, 8, .94)); border: 1px solid rgba(215, 178, 106, .28);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .03); backdrop-filter: blur(6px);
}
.login::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--accent2), var(--gold), var(--accent2), transparent); }
.login .crest { width: 132px; height: 132px; margin: -8px auto 10px; background-image: url(/img/crest.png); }
.login h1 { font-family: var(--display); font-size: 27px; margin: 0; letter-spacing: .5px;
  background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .kicker { font-family: var(--display); font-size: 11px; letter-spacing: 4px; color: var(--gold); }
.login p { color: var(--muted); margin: 12px 0 26px; }
.login .btn { width: 100%; padding: 13px 16px; font-size: 15px; }
.login .note { font-size: 12px; color: var(--faint); margin-top: 18px; }
.login .or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; margin: 16px 0; }
.login .or::before, .login .or::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line2), transparent); }
.btn.updater { background: linear-gradient(180deg, #8f1d24, #5e1217); border-color: #b3232b; color: var(--gold2); }
.btn.updater:hover { background: linear-gradient(180deg, #a6232b, #6d151b); border-color: #e0484c; }
.btn.updater img { width: 22px; height: 22px; }
.alert { border-radius: 10px; padding: 10px 12px; margin-bottom: 18px; font-size: 13px; text-align: left;
  background: rgba(179, 35, 43, .14); border: 1px solid rgba(224, 72, 76, .45); color: #ffc9c4; }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; }
  .me { display: none; }
  .main { padding: 20px 16px 50px; }
  .search { min-width: 0; width: 100%; }
}
