/* Kate Inbox — the OmaeAI.com palette and type (tokens copied from the public site's :root), dashboard layout. */
:root {
  color-scheme: dark;
  --bg: #07131f; --bg2: #0b1b29; --panel: #101f2e; --surface: #142536; --line: rgba(190, 224, 235, .13);
  --text: #f5fbff; --muted: #a7b7c7; --soft: #d9e7ef; --mint: #72eed4; --mint-soft: #b8f4dd; --blue: #a3bcff;
  --warm: #f7d8b2; --bad: #ffb4a8; --max: 1190px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -.045em; font-weight: 700; margin: 0 0 14px; }
h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.03em; font-weight: 650; margin: 0; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.sim-banner { margin: 0; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 600;
  background: #3a2c14; color: var(--warm); border-bottom: 1px solid #6b5326; }

.bar { max-width: var(--max); margin: auto; padding: 0 24px; min-height: 76px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; letter-spacing: -.05em; font-weight: 800;
  white-space: nowrap; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border: 2px solid var(--mint); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; gap: 3px; box-shadow: 0 0 28px #72eed422; }
.brand-mark span { width: 2px; background: var(--mint); border-radius: 4px; height: 10px; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-light { font-weight: 400; color: var(--mint); margin-left: 2px; }
.product { font-weight: 650; color: var(--soft); padding-left: 16px; border-left: 1px solid var(--line); white-space: nowrap; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace b { color: var(--text); font-weight: 650; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; border: 1px solid #6b5326; color: var(--warm); margin-left: 6px; vertical-align: 1px; }

select, input[type=search] { background: var(--surface); border: 1px solid #385166; border-radius: 6px; padding: 8px 10px;
  min-height: 40px; max-width: 100%; }
.ghost, .btn { border: 1px solid #536c76; border-radius: 6px; background: transparent; padding: 8px 14px; min-height: 40px;
  font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--mint); color: #07131f;
  border-color: var(--mint); }
.btn:hover { background: var(--mint-soft); text-decoration: none; }
.ghost:hover { border-color: var(--mint); }

.signin { max-width: 560px; margin: 56px auto; padding: 0 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.signin-options { display: grid; gap: 10px; margin: 22px 0; }
.signin-options .btn:nth-child(2) { background: transparent; color: var(--text); border-color: #536c76; }
.signin-form { display: grid; gap: 12px; margin: 22px 0; }
.signin-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.signin-form input { background: var(--surface); border: 1px solid #385166; border-radius: 6px; padding: 9px 10px;
  min-height: 42px; width: 100%; }
.error-inline { color: var(--bad); margin: 0; font-size: 14px; }
.ok-inline { color: var(--mint-soft); margin: 0; font-size: 14px; }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--mint); font-size: 14px; font-weight: 600; cursor: pointer;
  justify-self: start; }
.linkish:hover { text-decoration: underline; }
.warn { color: var(--warm); background: #2a2213; border: 1px solid #5c4722; border-radius: 6px; padding: 12px 14px; margin: 0; }
.muted { color: var(--muted); font-size: 14px; }

.tabs { max-width: var(--max); margin: auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto;
  border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 14px 14px 12px; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current=page] { color: var(--text); border-bottom-color: var(--mint); }
.views { max-width: var(--max); margin: auto; padding: 24px; }
.error { max-width: var(--max); margin: 16px auto 0; padding: 10px 24px; color: var(--bad); }
.foot { max-width: var(--max); margin: 0 auto 32px; padding: 0 24px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px; color: var(--text); }
.stat.link:hover { border-color: #3d6b6a; text-decoration: none; }
.stat-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.stat strong { font-size: 34px; line-height: 1.1; letter-spacing: -.04em; font-weight: 700; }
.stat-sub { color: var(--muted); font-size: 13px; }
.note { background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 6px;
  padding: 12px 14px; color: var(--soft); font-size: 14px; margin: 18px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.item:hover, .item:focus-visible { border-color: #3d6b6a; }
.item-title { font-weight: 650; }
.item-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.item-summary { grid-column: 1 / -1; color: var(--soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.item-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.item-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }

.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.b-pending { color: var(--warm); border-color: #6b5326; background: #2a2213; }
.b-in_progress { color: var(--blue); border-color: #3e4f7a; background: #151d33; }
.b-completed { color: var(--mint); border-color: #1f5a55; background: #0e2a2b; }
.b-none { color: var(--muted); border-color: #385166; }
.b-appt { color: var(--soft); border-color: #536c76; border-style: dashed; }
.b-urgent { color: #ffb4a8; border-color: #7a3a33; background: #2c1513; }
.b-case-open { color: var(--warm); border-color: #6b5326; background: #2a2213; }
.b-case-in_progress, .b-case-waiting_on_customer { color: var(--blue); border-color: #3e4f7a; background: #151d33; }
.b-case-resolved, .b-case-closed { color: var(--mint); border-color: #1f5a55; background: #0e2a2b; }
.case { cursor: default; }
.case-contact { grid-column: 1 / -1; color: var(--soft); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.case-history { grid-column: 1 / -1; font-size: 14px; }
.case-history summary { cursor: pointer; color: var(--muted); }
.case-history ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.case-history .ok { color: var(--mint); font-weight: 650; }
.mood-negative { color: var(--bad); }

.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.filters label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; min-width: 0; }
.filters input { width: 100%; }

.int-card { max-width: 720px; display: grid; gap: 12px; }
.int-card .note { margin: 0; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.col .item { grid-template-columns: 1fr; }
.col .item-badges { justify-content: flex-start; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 12px; }

.backdrop { position: fixed; inset: 0; background: rgba(3, 9, 15, .6); z-index: 9; }
.detail { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--panel); z-index: 10;
  border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 24px 32px; box-shadow: -20px 0 60px rgba(0, 0, 0, .35); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.facts div { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.facts dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.block { margin: 0 0 18px; }
.block h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.block p { margin: 0; color: var(--soft); }
.appt-box { border: 1px dashed #536c76; border-radius: 8px; padding: 12px 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.spaced { margin-top: 10px; align-items: center; }
.actions .ghost[aria-pressed=true] { border-color: var(--mint); color: var(--mint); }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bar { padding: 10px 16px; min-height: 0; flex-wrap: wrap; gap: 8px 12px; }
  .product { padding-left: 12px; }
  .bar-right { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .workspace { flex-basis: 100%; white-space: normal; }
  #lang { flex: 1; }
  .tabs, .views, .foot { padding-left: 16px; padding-right: 16px; }
  .views { padding-top: 16px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 28px; }
  .item { grid-template-columns: 1fr; }
  .item-badges { justify-content: flex-start; }
  .detail { padding: 18px 16px 28px; }
  .facts { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .tabs a { padding: 14px 12px 12px; }
}
/* installed app on notched phones (viewport-fit=cover): keep content clear of the notch and the home indicator */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom); }
  .sim-banner { padding-top: max(8px, env(safe-area-inset-top)); }
  .detail { padding-top: max(22px, env(safe-area-inset-top)); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) {
  .bar { padding-top: max(10px, env(safe-area-inset-top)); }
}
