:root {
  --khit-bg: #071a35;
  --khit-surface: #10284b;
  --khit-surface-2: #0b213f;
  --khit-text: #edf3f8;
  --khit-muted: #a1b1c5;
  --khit-line: rgba(237,243,248,.14);
  --khit-orange: #f45a06;
  --khit-orange-soft: rgba(244,90,6,.13);
  --khit-shadow: 0 18px 44px rgba(0,0,0,.2);
}
html[data-theme="standard"] {
  --khit-bg: #eef2f7; --khit-surface: #fff; --khit-surface-2: #f7f9fc;
  --khit-text: #071a35; --khit-muted: #61718a; --khit-line: rgba(7,26,53,.13);
  --khit-shadow: 0 14px 34px rgba(7,26,53,.1);
}
html[data-theme="blue"] {
  --khit-bg: #092e5c; --khit-surface: #114a80; --khit-surface-2: #0c3b6b;
  --khit-text: #f5f9ff; --khit-muted: #bfd4e8; --khit-line: rgba(245,249,255,.18);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--khit-bg); color: var(--khit-text); font-family: 'IBM Plex Sans', sans-serif; }
.suite-shell { position: sticky; top: var(--khit-env-banner-height, 0px); }
.user-summary { display: flex; align-items: center; gap: 9px; color: var(--suite-header-muted); font-size: 12px; }
.role-pill { border: 1px solid #49617f; border-radius: 999px; color: var(--suite-header-text); padding: 4px 8px; text-transform: capitalize; }
.app-frame { width: min(100% - 40px, 1240px); margin: 0 auto; padding: 28px 0 64px; }
.primary-nav { display: flex; gap: 6px; margin-bottom: 34px; border-bottom: 1px solid var(--khit-line); }
.primary-nav a { color: var(--khit-muted); text-decoration: none; font-weight: 600; padding: 12px 17px; border-bottom: 3px solid transparent; }
.primary-nav a:hover { color: var(--khit-text); }
.primary-nav a.active { color: var(--khit-text); border-bottom-color: var(--khit-orange); }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { color: var(--khit-muted); margin: 8px 0 0; }
.eyebrow { color: var(--khit-orange); font-size: 12px; font-weight: 700; letter-spacing: .1em; margin: 0 0 8px; text-transform: uppercase; }
.live-state { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--khit-line); border-radius: 999px; color: var(--khit-muted); font-size: 12px; padding: 8px 11px; }
.live-state span { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.12); }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.secondary-button, .primary-button, .text-button, .icon-button { font: inherit; cursor: pointer; }
.secondary-button { border: 1px solid var(--khit-line); border-radius: 999px; background: var(--khit-surface); color: var(--khit-text); font-size: 12px; font-weight: 700; padding: 9px 13px; }
.secondary-button:hover { border-color: var(--khit-orange); }
.attention-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--khit-line); border-radius: 15px; background: var(--khit-line); }
.attention-strip div { display: flex; min-height: 76px; flex-direction: column; justify-content: center; padding: 15px 19px; background: var(--khit-surface-2); }
.attention-strip strong { color: var(--khit-orange); font-size: 18px; }
.attention-strip span { color: var(--khit-muted); font-size: 12px; margin-top: 3px; }
.widget-grid, .app-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 17px; }
.widget { grid-column: span 6; min-height: 210px; padding: 22px; border: 1px solid var(--khit-line); border-radius: 17px; background: var(--khit-surface); box-shadow: var(--khit-shadow); }
.widget[data-size="large"] { grid-column: span 12; }
.widget[data-emphasis="feature"] { position: relative; overflow: hidden; background: linear-gradient(125deg, var(--khit-surface), var(--khit-surface-2)); border-color: rgba(244,90,6,.35); }
.widget[data-emphasis="feature"]::after { content:"#"; position:absolute; right:20px; bottom:-62px; color:rgba(244,90,6,.08); font-size:190px; font-weight:800; line-height:1; pointer-events:none; }
.widget[data-emphasis="attention"] { border-top: 3px solid var(--khit-orange); }
.widget-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.widget h2 { font-size: 17px; margin: 0; }
.source-label { color: var(--khit-muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.widget-state { display: flex; align-items: flex-start; gap: 12px; margin-top: 38px; color: var(--khit-muted); line-height: 1.5; }
.state-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: var(--khit-orange-soft); color: var(--khit-orange); font-weight: 700; }
.widget-action { display: inline-block; margin-top: 20px; color: var(--khit-orange); font-size: 13px; font-weight: 700; text-decoration: none; }
.updates-list { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.update-item { min-height: 122px; padding: 15px; border: 1px solid var(--khit-line); border-radius: 12px; background: rgba(7,26,53,.2); }
.update-item .update-label { display:block; color:var(--khit-orange); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.update-item strong { display:block; margin-top:9px; font-size:14px; line-height:1.35; }
.update-item small { display:block; color:var(--khit-muted); margin-top:8px; line-height:1.35; }
.favourite-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.favourite-list button { border: 1px solid var(--khit-line); border-radius: 10px; background: var(--khit-surface-2); color: var(--khit-text); cursor: pointer; padding: 10px 13px; }
.app-card { grid-column: span 4; display: flex; min-height: 210px; flex-direction: column; padding: 20px; border: 1px solid var(--khit-line); border-radius: 17px; background: var(--khit-surface); box-shadow: var(--khit-shadow); }
.app-card.unavailable { opacity: .62; }
.app-card img { width: min(100%, 190px); height: 58px; object-fit: contain; object-position: left center; }
.app-card h2 { font-size: 17px; margin: 16px 0 6px; }
.app-card p { color: var(--khit-muted); font-size: 13px; line-height: 1.45; margin: 0; }
.app-card .category { color: var(--khit-orange); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.app-card button { margin-top: auto; align-self: flex-start; border: 0; border-radius: 9px; background: var(--khit-orange); color: #fff; cursor: pointer; font-weight: 700; padding: 9px 13px; }
.app-card button:disabled { background: var(--khit-surface-2); color: var(--khit-muted); cursor: not-allowed; }
.state-panel { padding: 50px; color: var(--khit-muted); text-align: center; }
.state-panel.error { color: #fca5a5; }
.customise-overlay { position: fixed; inset: 0; z-index: 99998; display:flex; justify-content:flex-end; background:rgba(1,9,22,.66); backdrop-filter:blur(4px); }
.customise-panel { width:min(100%,460px); height:100%; overflow:auto; padding:28px; background:var(--khit-surface); box-shadow:-24px 0 70px rgba(0,0,0,.34); }
.customise-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.customise-header h2 { margin:0; font-size:25px; }
.icon-button { width:36px; height:36px; border:1px solid var(--khit-line); border-radius:50%; background:transparent; color:var(--khit-text); font-size:24px; line-height:1; }
.customise-copy { color:var(--khit-muted); font-size:13px; line-height:1.5; }
.customise-list { display:flex; flex-direction:column; gap:9px; margin:24px 0; }
.customise-row { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; padding:12px; border:1px solid var(--khit-line); border-radius:12px; background:var(--khit-surface-2); }
.customise-row input { accent-color:var(--khit-orange); width:17px; height:17px; }
.customise-row strong { font-size:13px; }
.order-controls { display:flex; gap:4px; }
.order-controls button { width:30px; height:30px; border:1px solid var(--khit-line); border-radius:7px; background:var(--khit-surface); color:var(--khit-text); cursor:pointer; }
.customise-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:18px; border-top:1px solid var(--khit-line); }
.primary-button { border:0; border-radius:9px; background:var(--khit-orange); color:#fff; font-weight:700; padding:10px 14px; }
.text-button { border:0; background:transparent; color:var(--khit-muted); padding:8px 0; }
.hidden { display: none !important; }
@media (max-width: 850px) { .app-card { grid-column: span 6; } }
@media (max-width: 650px) {
  .app-frame { width: min(100% - 24px, 1240px); padding-top: 18px; }
  .suite-shell { align-items: flex-start; }
  .user-summary { display: none; }
  .widget, .widget[data-size="large"], .app-card { grid-column: span 12; }
  .page-heading { flex-direction: column; }
  .heading-actions { justify-content:flex-start; }
  .attention-strip { grid-template-columns:1fr; }
  .updates-list { grid-template-columns:1fr; }
}
