/* X67 licensing portal — the mock's design language as classes.
   Palette: warm paper #f2f0ea, verdigris #2e6f5e, ink #1d1d1b.
   Fonts: Instrument Sans (body), Newsreader (serif headings),
   Archivo Narrow (labels), JetBrains Mono (data). Light only. */

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f2f0ea;
  color: #1d1d1b;
  font-family: 'Instrument Sans', sans-serif;
}
a { color: #2e6f5e; text-decoration: none; }
a:hover { color: #1f5245; }
input, select { font-family: inherit; }
input:focus, select:focus { outline: 2px solid #2e6f5e; outline-offset: -1px; }

@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }

/* ---- sidebar ---- */
.sidebar {
  background: #edebe0; border-right: 1px solid #d8d5c8;
  padding: 20px 12px 16px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 18px; }
.brand__mark {
  width: 26px; height: 26px; background: #2e6f5e; display: grid; place-items: center;
  color: #f6f5ef; font: 700 12px 'JetBrains Mono', monospace;
}
.brand__name { font: 600 14px 'Instrument Sans', sans-serif; letter-spacing: -.01em; }
.brand__tag { font: 600 8.5px 'Archivo Narrow', sans-serif; letter-spacing: .14em; color: #8b887a; }
.navitem {
  padding: 8px 10px; border-radius: 6px; cursor: pointer; color: #5c5a52;
  font: 500 13px 'Instrument Sans', sans-serif; display: block;
}
.navitem:hover { background: #e2dfd2; color: #5c5a52; }
.navitem--active { background: #2e6f5e; color: #f6f5ef; }
.navitem--active:hover { background: #2e6f5e; color: #f6f5ef; }
.sidebar__spacer { flex: 1; }
.sidebar__label { padding: 0 8px 8px; font: 600 9px 'Archivo Narrow', sans-serif; letter-spacing: .14em; color: #8b887a; }
.whoami {
  padding: 8px 10px; border: 1px solid #c8c5b6; border-radius: 6px;
  font: 500 11.5px 'Instrument Sans', sans-serif; color: #5c5a52;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.whoami form { margin: 0; }
.whoami__signout {
  background: none; border: none; cursor: pointer; padding: 0;
  color: #2e6f5e; font: 600 11.5px 'Instrument Sans', sans-serif;
}

/* ---- main ---- */
.main { padding: 30px 36px 60px; max-width: 1080px; }
.page-head { display: flex; align-items: baseline; gap: 14px; }
h1 { margin: 0; font: 500 28px 'Newsreader', serif; letter-spacing: -.01em; }
.subtle { font: 500 12px 'Instrument Sans', sans-serif; color: #8b887a; }
.mono-date { font: 500 11px 'JetBrains Mono', monospace; color: #8b887a; }
.btn-primary {
  background: #2e6f5e; color: #f6f5ef; padding: 9px 16px; border-radius: 7px;
  font: 600 13px 'Instrument Sans', sans-serif; cursor: pointer; border: none;
  display: inline-block;
}
.btn-primary:hover { background: #25594b; color: #f6f5ef; }
.push-right { margin-left: auto; }

/* ---- panels & tables ---- */
.panel { border: 1px solid #d8d5c8; background: #fbfaf5; }
.panel__head {
  padding: 12px 18px; border-bottom: 1px solid #1d1d1b;
  font: 600 11px 'Archivo Narrow', sans-serif; letter-spacing: .12em; color: #5c5a52;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border: 1px solid #d8d5c8; background: #fbfaf5; }
.stat { padding: 16px 20px; border-right: 1px solid #e4e1d4; }
.stat:last-child { border-right: none; }
.stat__label { font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .12em; color: #8b887a; }
.stat__value { font: 700 26px 'Instrument Sans', sans-serif; margin-top: 5px; }

.grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #eceadd; }
.list-row:last-child { border-bottom: none; }
.key-mono { font: 500 12px 'JetBrains Mono', monospace; color: #1d1d1b; }
.chip {
  font: 700 10.5px 'Archivo Narrow', sans-serif; letter-spacing: .08em;
}
.mini-btn {
  font: 600 11.5px 'Instrument Sans', sans-serif; color: #2e6f5e; cursor: pointer;
  border: 1px solid #c3cfc4; border-radius: 5px; padding: 4px 9px; background: none;
}
.mini-btn:hover { background: #e6ede7; }

/* filters */
.filters { display: flex; gap: 8px; margin-top: 18px; }
.filters input {
  flex: 1; background: #fbfaf5; border: 1px solid #c8c5b6; padding: 9px 12px;
  font: 400 12.5px 'JetBrains Mono', monospace; color: #1d1d1b; border-radius: 0;
}
.filters select {
  background: #fbfaf5; border: 1px solid #c8c5b6; padding: 9px 10px;
  font: 600 11.5px 'Archivo Narrow', sans-serif; letter-spacing: .05em; color: #4a4a44;
}

/* license table */
.ltable { margin-top: 14px; border: 1px solid #d8d5c8; background: #fbfaf5; }
.ltable__head, .ltable__row {
  display: grid; grid-template-columns: 1.9fr 1.15fr 1.25fr .7fr 1fr .7fr 1fr;
  column-gap: 12px; align-items: center; padding: 10px 18px;
}
.ltable__head {
  font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .1em; color: #8b887a;
  border-bottom: 1px solid #1d1d1b; padding: 9px 18px;
}
.ltable__row { border-bottom: 1px solid #eceadd; cursor: pointer; }
.ltable__row:last-child { border-bottom: none; }
.ltable__row:hover { background: #f1efe4; }
.ltable__row--dead { color: #a09d90; }
.cell-mono { font: 500 11.5px 'JetBrains Mono', monospace; }
.cell { font: 400 12.5px 'Instrument Sans', sans-serif; }
.cell-dim { font: 400 12px 'Instrument Sans', sans-serif; color: #5c5a52; }
.cell-ip { font: 400 11px 'JetBrains Mono', monospace; color: #5c5a52; }

/* detail */
.crumb { font: 600 12px 'Instrument Sans', sans-serif; color: #2e6f5e; cursor: pointer; display: inline-block; }
.detail-head { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.detail-key { margin: 0; font: 500 24px 'JetBrains Mono', monospace; letter-spacing: -.01em; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border: 1px solid #d8d5c8; background: #fbfaf5; }
.kv { padding: 16px 20px; border-right: 1px solid #e4e1d4; border-bottom: 1px solid #e4e1d4; }
.kv__label { font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .12em; color: #8b887a; }
.kv__value { font: 500 15px 'Instrument Sans', sans-serif; margin-top: 5px; }
.kv__value--mono { font: 500 14px 'JetBrains Mono', monospace; }
.kv__note { font: 400 11.5px 'Instrument Sans', sans-serif; color: #8b887a; margin-top: 2px; }
.danger-btn {
  border: 1px solid #d6b6ae; padding: 8px 14px; border-radius: 6px;
  font: 600 12.5px 'Instrument Sans', sans-serif; color: #a04a3c; cursor: pointer; background: #fbfaf5;
}
.danger-btn:hover { background: #f6e9e6; }
.plain-btn {
  border: 1px solid #c8c5b6; padding: 8px 14px; border-radius: 6px;
  font: 600 12.5px 'Instrument Sans', sans-serif; cursor: pointer; background: #fbfaf5;
}
.plain-btn:hover { background: #f1efe4; }
.hist-row { display: flex; align-items: baseline; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #eceadd; }
.hist-time { font: 400 10.5px 'JetBrains Mono', monospace; color: #a09d90; flex: none; width: 110px; }
.hist-event { font: 700 10px 'Archivo Narrow', sans-serif; letter-spacing: .08em; flex: none; width: 120px; }
.hist-detail { font: 400 11.5px 'JetBrains Mono', monospace; color: #5c5a52; }

/* products */
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.pcard { border: 1px solid #d8d5c8; background: #fbfaf5; }
.pcard__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #1d1d1b; }
.pcard__name { font: 500 20px 'Newsreader', serif; }
.pcard__code { font: 600 10px 'JetBrains Mono', monospace; color: #5c5a52; border: 1px solid #c8c5b6; padding: 2px 6px; letter-spacing: .08em; }
.pcard__count { margin-left: auto; font: 400 11.5px 'Instrument Sans', sans-serif; color: #8b887a; }
.pcard__tag { padding: 12px 20px 6px; font: 400 13px 'Instrument Sans', sans-serif; color: #5c5a52; line-height: 1.45; }
.tier { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eceadd; }
.tier:last-child { border-bottom: none; }
.tier__name { font: 600 12.5px 'Instrument Sans', sans-serif; width: 110px; }
.tier__limit { font: 400 12px 'Instrument Sans', sans-serif; color: #5c5a52; }
.tier__price { margin-left: auto; font: 500 12px 'JetBrains Mono', monospace; color: #2e6f5e; }
.tiers-wrap { padding: 6px 20px 16px; }

/* activity */
.atable__head, .atable__row {
  display: grid; grid-template-columns: 1fr 1.1fr 1.7fr 1.2fr 1.6fr; column-gap: 12px; align-items: center;
  padding: 9px 18px;
}
.atable__head { font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .1em; color: #8b887a; border-bottom: 1px solid #1d1d1b; }
.atable__row { border-bottom: 1px solid #eceadd; }
.atable__row:last-child { border-bottom: none; }

/* customer cards */
.ccard { border: 1px solid #d8d5c8; background: #fbfaf5; padding: 20px 24px; margin-top: 16px; }
.ccard__head { display: flex; align-items: center; gap: 12px; }
.ccard__title { font: 500 19px 'Newsreader', serif; }
.keychip { font: 500 13px 'JetBrains Mono', monospace; background: #f1efe4; border: 1px solid #d8d5c8; padding: 7px 12px; }
.bars { display: flex; gap: 36px; margin-top: 16px; }
.bar { flex: 1; }
.bar__labels { display: flex; justify-content: space-between; font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .1em; color: #8b887a; }
.bar__track { height: 6px; background: #e4e1d4; margin-top: 6px; }
.bar__fill { height: 6px; }

/* code block (customer API) */
.codeblock { margin-top: 8px; background: #1d1d1b; color: #d9d6c8; padding: 14px 16px; font: 400 11.5px 'JetBrains Mono', monospace; line-height: 1.7; overflow: auto; }

/* forms / login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 360px; background: #fbfaf5; border: 1px solid #1d1d1b; padding: 30px 30px 26px; }
.login-card h1 { font: 500 24px 'Newsreader', serif; }
.login-card .sub { margin-top: 4px; }
.field { margin-top: 16px; }
.field__label { font: 600 10px 'Archivo Narrow', sans-serif; letter-spacing: .12em; color: #8b887a; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; background: #fbfaf5; border: 1px solid #c8c5b6; padding: 9px 10px;
  font: 400 13px 'Instrument Sans', sans-serif;
}
.field input.mono { font-family: 'JetBrains Mono', monospace; }
.err { margin-top: 14px; color: #a04a3c; font: 500 12.5px 'Instrument Sans', sans-serif; }
.checkline { display: flex; align-items: center; gap: 9px; cursor: pointer; font: 500 13px 'Instrument Sans', sans-serif; color: #4a4a44; margin-top: 6px; }
.checkline input { accent-color: #2e6f5e; width: 15px; height: 15px; }

/* modal */
dialog.modal { width: 460px; background: #f6f5ef; border: 1px solid #1d1d1b; box-shadow: 0 18px 50px rgba(0,0,0,.3); padding: 0; }
dialog.modal::backdrop { background: rgba(29,29,27,.45); }
.modal__head { padding: 16px 22px; border-bottom: 1px solid #1d1d1b; display: flex; align-items: center; }
.modal__title { font: 500 20px 'Newsreader', serif; }
.modal__x { margin-left: auto; cursor: pointer; font: 400 18px 'Instrument Sans', sans-serif; color: #8b887a; background: none; border: none; }
.modal__body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal__foot { padding: 14px 22px; border-top: 1px solid #d8d5c8; display: flex; justify-content: flex-end; gap: 10px; }
.row2 { display: flex; gap: 12px; }
.row2 > * { flex: 1; }
.footer-note { margin-top: 14px; font: 400 12px 'JetBrains Mono', monospace; color: #8b887a; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1d1d1b; color: #f6f5ef; padding: 10px 18px;
  font: 500 12.5px 'Instrument Sans', sans-serif; animation: toastIn .18s ease; z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
