:root {
  color-scheme: dark;
  --bg: #090706;
  --bg-soft: #100b0a;
  --panel: #171110;
  --panel-2: #211816;
  --panel-3: #2a1d19;
  --line: #3a2822;
  --line-strong: #5b3529;
  --text: #fff8ef;
  --muted: #b8a9a2;
  --subtle: #82736d;
  --red: #ee3b24;
  --red-dark: #8f151c;
  --orange: #ff762f;
  --gold: #f3c85b;
  --gold-soft: #ffdfa0;
  --green: #59d19c;
  --blue: #62a8ff;
  --danger: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
  --radius: 18px;
  --sidebar: 274px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -10%, rgba(196, 35, 27, .20), transparent 33rem),
    radial-gradient(circle at 92% 12%, rgba(245, 150, 42, .09), transparent 28rem),
    linear-gradient(145deg, #0b0807, #080606 55%, #0d0908);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--gold); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(243, 200, 91, .42);
  outline-offset: 2px;
}

#ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background-image:
    linear-gradient(rgba(255, 255, 255, .015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.boot-logo { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 16px 34px rgba(231, 52, 32, .25)); }
.boot-line { width: 180px; height: 3px; background: #2e201d; overflow: hidden; position: relative; }
.boot-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--red), var(--gold), transparent); animation: loading 1.2s infinite; transform: translateX(-100%); }
@keyframes loading { to { transform: translateX(100%); } }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 1.1fr) minmax(420px, .9fr);
  position: relative;
}

.auth-brand {
  padding: clamp(34px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(243, 200, 91, .13);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  width: 38rem;
  height: 38rem;
  left: -15rem;
  bottom: -15rem;
  border: 1px solid rgba(243, 200, 91, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(238, 59, 36, .018), 0 0 0 180px rgba(238, 59, 36, .014);
}

.brand-lockup { position: relative; z-index: 1; }
.brand-lockup img { width: clamp(100px, 11vw, 170px); filter: drop-shadow(0 24px 50px rgba(207, 47, 28, .25)); }
.brand-name { margin-top: 12px; letter-spacing: .42em; font-weight: 800; font-size: .78rem; color: var(--gold); }
.auth-statement { max-width: 720px; position: relative; z-index: 1; }
.auth-statement h1 { font-size: clamp(2.7rem, 6vw, 6.2rem); line-height: .91; letter-spacing: -.065em; margin: 0 0 28px; font-weight: 760; }
.auth-statement h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255, 223, 160, .65); }
.auth-statement p { color: var(--muted); max-width: 600px; font-size: 1.05rem; }
.auth-foot { position: relative; z-index: 1; display: flex; gap: 24px; color: var(--subtle); font-size: .82rem; letter-spacing: .04em; }

.auth-panel {
  display: grid;
  align-content: center;
  padding: clamp(28px, 6vw, 86px);
  min-height: 100vh;
  background: rgba(12, 8, 7, .55);
  backdrop-filter: blur(20px);
}

.auth-card { width: min(100%, 520px); margin-inline: auto; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 800; }
.auth-card h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.045em; margin: 9px 0 10px; line-height: 1.02; }
.auth-card > p { color: var(--muted); margin: 0 0 28px; }

.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.portal-card {
  appearance: none;
  text-align: left;
  background: linear-gradient(155deg, rgba(42, 29, 25, .92), rgba(20, 14, 13, .92));
  border: 1px solid var(--line);
  padding: 24px;
  min-height: 190px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  position: relative;
  overflow: hidden;
}
.portal-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); transform: scaleX(.25); transform-origin: left; transition: transform .2s ease; }
.portal-card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--panel-2); }
.portal-card:hover::after { transform: scaleX(1); }
.portal-card strong { display: block; font-size: 1.18rem; margin: 26px 0 8px; }
.portal-card small { color: var(--muted); display: block; line-height: 1.5; }
.portal-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); color: var(--gold); font-weight: 800; font-size: 1.05rem; transform: rotate(-6deg); }

.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { color: #dfd3cd; font-size: .88rem; font-weight: 650; }
.field-hint { color: var(--subtle); font-size: .78rem; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0e0a09;
  color: var(--text);
  padding: 13px 14px;
  border-radius: 10px;
  min-height: 48px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 200, 91, .10); outline: none; }
.textarea { min-height: 130px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #655954; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(115deg, #b51f22, var(--red) 55%, var(--orange)); color: white; box-shadow: 0 12px 28px rgba(190, 36, 27, .22); }
.btn-secondary { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { background: rgba(255, 107, 107, .10); border-color: rgba(255, 107, 107, .25); color: #ffaaa6; }
.btn-small { min-height: 36px; padding: 7px 11px; font-size: .82rem; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.auth-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); position: relative; }
.sidebar { min-height: 100vh; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: rgba(15, 10, 9, .92); backdrop-filter: blur(18px); padding: 26px 18px; display: flex; flex-direction: column; z-index: 20; }
.side-brand { display: flex; align-items: center; gap: 13px; padding: 0 9px 25px; border-bottom: 1px solid var(--line); }
.side-brand img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(238, 59, 36, .18)); }
.side-brand strong { display: block; letter-spacing: .20em; font-size: .92rem; }
.side-brand span { display: block; color: var(--subtle); font-size: .72rem; margin-top: 3px; }
.nav-label { color: var(--subtle); font-size: .67rem; text-transform: uppercase; letter-spacing: .17em; margin: 26px 12px 9px; font-weight: 800; }
.side-nav { display: grid; gap: 5px; }
.nav-button { appearance: none; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left; position: relative; }
.nav-button:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-button.active { color: var(--text); background: linear-gradient(90deg, rgba(181, 31, 34, .22), rgba(243, 200, 91, .045)); }
.nav-button.active::before { content: ""; position: absolute; left: -18px; top: 9px; bottom: 9px; width: 3px; background: linear-gradient(var(--red), var(--gold)); }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--gold); font-size: .78rem; border: 1px solid rgba(243, 200, 91, .22); border-radius: 6px; }
.sidebar-user { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 8px 0; }
.user-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--red-dark), var(--orange)); color: white; font-weight: 850; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: .86rem; }
.user-copy span { color: var(--subtle); font-size: .72rem; }
.logout-button { width: 100%; margin-top: 12px; }

.workspace { min-width: 0; }
.topbar { min-height: 82px; border-bottom: 1px solid rgba(58, 40, 34, .70); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px, 4vw, 52px); background: rgba(9, 7, 6, .64); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 15; }
.topbar h1 { font-size: clamp(1.25rem, 2.3vw, 1.75rem); margin: 0; letter-spacing: -.025em; }
.topbar-sub { color: var(--subtle); font-size: .78rem; margin-top: 2px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.mobile-toggle { display: none; }
.workspace-content { padding: clamp(22px, 4vw, 52px); max-width: 1680px; margin: 0 auto; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-head h2 { margin: 0 0 6px; font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -.045em; }
.page-head p { margin: 0; color: var(--muted); max-width: 720px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric { background: linear-gradient(145deg, rgba(33, 24, 22, .92), rgba(18, 13, 12, .9)); border: 1px solid var(--line); border-radius: 14px; padding: 21px; min-height: 138px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; right: -30px; bottom: -44px; width: 100px; height: 100px; border: 1px solid rgba(243, 200, 91, .10); transform: rotate(24deg); }
.metric-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.metric-value { display: block; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; margin: 18px 0 9px; letter-spacing: -.05em; }
.metric-note { color: var(--subtle); font-size: .8rem; }
.metric-accent { color: var(--gold); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; }
.panel { background: rgba(23, 17, 16, .86); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 38px rgba(0, 0, 0, .16); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-body { padding: 22px; }
.panel-flush { padding: 0; }

.status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 4px rgba(130, 115, 109, .10); }
.status-dot.ok, .status-dot.completed, .status-dot.approved { background: var(--green); box-shadow: 0 0 0 4px rgba(89, 209, 156, .10); }
.status-dot.error, .status-dot.failed, .status-dot.rejected { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 107, .10); }
.status-dot.running, .status-dot.reviewing, .status-dot.in_progress { background: var(--gold); box-shadow: 0 0 0 4px rgba(243, 200, 91, .10); }

.bar-list { display: grid; gap: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 38px; align-items: center; gap: 12px; font-size: .82rem; }
.bar-track { height: 7px; background: #0d0908; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: inherit; }
.bar-count { color: var(--muted); text-align: right; }

.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.activity-item:last-child { border-bottom: 0; }
.activity-item strong, .activity-item span { display: block; }
.activity-item strong { font-size: .88rem; }
.activity-item span { color: var(--subtle); font-size: .75rem; margin-top: 2px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar .search { flex: 1 1 280px; position: relative; }
.toolbar .search .input { padding-left: 42px; }
.search-mark { position: absolute; left: 15px; top: 13px; color: var(--subtle); }
.toolbar .select { width: auto; min-width: 170px; }

.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.asset-card { appearance: none; width: 100%; color: inherit; text-align: left; background: linear-gradient(145deg, rgba(31, 22, 20, .94), rgba(16, 12, 11, .94)); border: 1px solid var(--line); border-radius: 16px; padding: 20px; cursor: pointer; min-height: 270px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.asset-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.asset-card::before { content: ""; position: absolute; top: 0; left: 0; width: 58px; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.asset-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.brand-avatar { width: 58px; height: 58px; border: 1px solid var(--line); background: #0d0a09; display: grid; place-items: center; border-radius: 14px; overflow: hidden; color: var(--gold); font-weight: 900; text-transform: uppercase; }
.brand-avatar img { width: 36px; height: 36px; object-fit: contain; }
.type-tag { color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .11em; }
.asset-card h3 { font-size: 1.08rem; margin: 25px 0 5px; line-height: 1.28; }
.asset-model { color: var(--muted); font-size: .84rem; min-height: 40px; }
.asset-meta { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); }
.meta-block span { display: block; color: var(--subtle); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.meta-block strong { display: block; font-size: .78rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.data-table th { color: var(--subtle); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 15px 16px; border-bottom: 1px solid rgba(58, 40, 34, .72); vertical-align: middle; font-size: .86rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .018); }
.cell-main { font-weight: 700; }
.cell-sub { color: var(--subtle); font-size: .75rem; margin-top: 3px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

.badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 4px 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); border-radius: 999px; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.badge-red { border-color: rgba(238, 59, 36, .28); color: #ffaaa0; background: rgba(238, 59, 36, .08); }
.badge-gold { border-color: rgba(243, 200, 91, .28); color: var(--gold-soft); background: rgba(243, 200, 91, .07); }
.badge-green { border-color: rgba(89, 209, 156, .28); color: #98ecc8; background: rgba(89, 209, 156, .07); }

.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-mark { width: 70px; height: 70px; margin: 0 auto 18px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--gold); font-size: 1.5rem; transform: rotate(4deg); }
.empty-state h3 { color: var(--text); margin: 0 0 8px; }
.empty-state p { max-width: 520px; margin: 0 auto 20px; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; color: var(--muted); font-size: .84rem; }
.pagination-actions { display: flex; gap: 7px; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: rgba(2, 1, 1, .76); backdrop-filter: blur(8px); animation: fade .16s ease; }
.dialog { width: min(100%, 680px); max-height: min(92vh, 900px); overflow: auto; background: #171110; border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); animation: rise .18s ease; }
.dialog-wide { width: min(100%, 1050px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(23, 17, 16, .96); backdrop-filter: blur(10px); z-index: 2; }
.dialog-head h2 { margin: 0; font-size: 1.25rem; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.dialog-body { padding: 24px; }
.dialog-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.icon-button { appearance: none; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); border-radius: 9px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.99); } }

.asset-hero { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.asset-hero .brand-avatar { width: 104px; height: 104px; border-radius: 20px; }
.asset-hero .brand-avatar img { width: 64px; height: 64px; }
.asset-hero h2 { margin: 0 0 5px; font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: -.04em; }
.asset-hero p { margin: 0; color: var(--muted); }
.tab-list { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 24px 0; overflow-x: auto; }
.tab-button { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 11px 14px; cursor: pointer; white-space: nowrap; }
.tab-button.active { color: var(--text); border-bottom-color: var(--gold); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-item { padding: 15px; background: #100c0b; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.detail-item span { display: block; color: var(--subtle); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.detail-item strong { display: block; margin-top: 6px; overflow-wrap: anywhere; font-size: .88rem; }
.detail-wide { grid-column: 1 / -1; }
.json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.technical-block { display: grid; gap: 18px; }
.technical-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.technical-heading h3 { margin: 0 0 6px; }
.technical-heading p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.glpi-groups { display: grid; gap: 9px; }
.glpi-group { border: 1px solid var(--line); border-radius: 11px; background: #100c0b; overflow: hidden; }
.glpi-group summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 15px; cursor: pointer; font-size: .84rem; font-weight: 750; }
.glpi-group summary::marker { color: var(--gold); }
.glpi-group[open] summary { border-bottom: 1px solid var(--line); }
.glpi-group pre { margin: 0; padding: 16px; max-height: 430px; overflow: auto; color: #ddcfca; background: #0b0807; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 24px 1fr; gap: 13px; }
.timeline-rail { display: flex; flex-direction: column; align-items: center; }
.timeline-node { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(243, 200, 91, .09); }
.timeline-stem { width: 1px; background: var(--line); min-height: 55px; flex: 1; }
.timeline-item:last-child .timeline-stem { display: none; }
.timeline-content { padding-bottom: 24px; }
.timeline-content strong { font-size: .86rem; }
.timeline-content p { margin: 7px 0 0; color: var(--muted); white-space: pre-wrap; }
.timeline-content time { display: block; color: var(--subtle); font-size: .72rem; margin-top: 5px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check-list { max-height: 400px; overflow: auto; display: grid; gap: 7px; padding-right: 4px; }
.check-row { display: flex; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #100c0b; }
.check-row input { width: 18px; height: 18px; accent-color: var(--red); }
.check-copy { min-width: 0; }
.check-copy strong, .check-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-copy span { color: var(--subtle); font-size: .75rem; }

.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.integration-card { padding: 24px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--panel-2), var(--panel)); border-radius: var(--radius); }
.integration-card h3 { margin: 17px 0 7px; }
.integration-card p { margin: 0 0 18px; color: var(--muted); }
.integration-meta { display: grid; gap: 9px; margin: 18px 0; padding: 15px 0; border-block: 1px solid var(--line); }
.integration-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; }
.integration-meta span { color: var(--subtle); }

.notice { border-left: 3px solid var(--gold); background: rgba(243, 200, 91, .065); padding: 13px 15px; color: #e9ded6; margin-bottom: 18px; }
.notice-error { border-left-color: var(--danger); background: rgba(255, 107, 107, .06); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .20); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { position: relative; overflow: hidden; background: #211816; border-radius: 8px; min-height: 18px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent); animation: loading 1.2s infinite; }
.loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.loading-card { height: 270px; border: 1px solid var(--line); border-radius: 16px; background: rgba(23,17,16,.6); }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: grid; gap: 10px; width: min(390px, calc(100vw - 44px)); }
.toast { background: #221815; border: 1px solid var(--line-strong); border-left: 4px solid var(--gold); box-shadow: var(--shadow); border-radius: 12px; padding: 14px 16px; animation: rise .2s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--green); }
.toast strong { display: block; font-size: .86rem; }
.toast span { display: block; color: var(--muted); font-size: .78rem; margin-top: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 40vh; padding: 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-statement { margin-top: 72px; }
  .auth-statement h1 { font-size: clamp(2.6rem, 12vw, 5rem); }
  .auth-foot { display: none; }
  .auth-panel { min-height: 60vh; padding: 38px 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-103%); transition: transform .2s ease; width: min(86vw, 310px); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: inline-flex; }
  .topbar { padding-inline: 18px; }
  .workspace-content { padding: 24px 18px 40px; }
  .integration-grid, .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .portal-grid, .metric-grid, .asset-grid, .detail-grid, .json-grid { grid-template-columns: 1fr; }
  .auth-brand { min-height: 46vh; }
  .auth-statement p { font-size: .95rem; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .asset-grid { gap: 12px; }
  .asset-card { min-height: 240px; }
  .asset-hero { grid-template-columns: 80px 1fr; }
  .asset-hero .brand-avatar { width: 76px; height: 76px; }
  .asset-hero > :last-child { grid-column: 1 / -1; }
  .dialog-backdrop { padding: 0; align-items: end; }
  .dialog { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .dialog-body { padding: 20px 17px; }
  .toolbar .select { flex: 1 1 140px; min-width: 0; }
  .auth-actions { align-items: flex-start; flex-direction: column; }
  .top-actions .user-mini { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
