/* So & So Developer Console - deliberately looks different from the cafe POS: this is the software-business side. */
:root { --ink: #1b2036; --ink2: #3a4160; --muted: #7a819c; --line: #e3e6f0; --bg: #f4f5fa; --card: #fff; --nav: #1b2036; --nav2: #262d4c; --accent: #00a58e; --accent-d: #008572; --accent-l: #dcf6f1; --blue: #3e5bd6; --blue-l: #e6ebfc; --amber: #b9770e; --amber-l: #fdf0d2; --red: #d33a3a; --red-l: #fde5e5; --green: #1f9a55; --green-l: #dff5e8; --r: 12px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; } input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; } h2 { font-size: 16px; font-weight: 700; } h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mt { margin-top: 12px; } .mb { margin-bottom: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.hide { display: none !important; } .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .grow { flex: 1; } .between { justify-content: space-between; }

/* shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--nav); color: #cfd4ea; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; font-weight: 750; font-size: 15px; line-height: 1.2; } .brand small { display: block; font-weight: 500; color: #8f97b8; font-size: 11.5px; }
.brand i { width: 34px; height: 34px; border-radius: 9px; background: var(--nav2); display: grid; place-items: center; flex: none; } .brand svg { width: 20px; height: 20px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #cfd4ea; font-weight: 550; } .nav a:hover { background: var(--nav2); text-decoration: none; } .nav a.on { background: var(--accent); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--nav2); font-size: 12px; color: #8f97b8; }
.main { padding: 24px 28px 60px; min-width: 0; max-width: 1280px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; } .head p { color: var(--muted); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-weight: 650; border: 1.5px solid var(--line); background: #fff; min-height: 36px; } .btn:hover { border-color: #c9cee2; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-d); } .btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--red); border-color: #f0c2c2; } .btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); } .btn.sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; } .field label { font-size: 12.5px; font-weight: 650; color: var(--ink2); } .field small { color: var(--muted); }
input, select, textarea { border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 11px; background: #fff; width: 100%; min-width: 0; } input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; } textarea { resize: vertical; min-height: 70px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; } .card + .card { margin-top: 14px; } .card > h2, .card > .between > h2 { margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; } .kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; } .kpi small { color: var(--muted); font-weight: 600; font-size: 12px; } .kpi b { display: block; font-size: 24px; font-weight: 750; line-height: 1.2; } .kpi.bad b { color: var(--red); } .kpi.warn b { color: var(--amber); } .kpi.good b { color: var(--green); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; } table { border-collapse: collapse; width: 100%; } th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 9px 12px; background: #fafbfe; border-bottom: 1px solid var(--line); white-space: nowrap; } td { padding: 10px 12px; border-bottom: 1px solid #eef0f7; vertical-align: middle; } tr:last-child td { border-bottom: 0; } tr.click { cursor: pointer; } tr.click:hover td { background: #f8f9fd; } td.num, th.num { text-align: right; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; } .pill.good { background: var(--green-l); color: #14703b; } .pill.warn { background: var(--amber-l); color: #8a5806; } .pill.bad { background: var(--red-l); color: #a32727; } .pill.info { background: var(--blue-l); color: #2b43a6; } .pill.off { background: #e9ebf3; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 16px; overflow-x: auto; } .tabs a { padding: 9px 14px; font-weight: 650; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; white-space: nowrap; } .tabs a.on { color: var(--accent-d); border-color: var(--accent); } .tabs a:hover { text-decoration: none; color: var(--ink); }
.banner { background: var(--amber-l); color: #6e4605; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; } .banner.info { background: var(--blue-l); color: #243a8f; } .banner.bad { background: var(--red-l); color: #8e2020; } .banner.good { background: var(--green-l); color: #14703b; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; } .kv dt { color: var(--muted); } .kv dd { word-break: break-word; }
.copy { display: flex; gap: 6px; } .copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.steps { margin: 6px 0 0 18px; } .steps li { margin: 4px 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 34px; } .bars i { flex: 1; min-width: 3px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .85; } .bars i.bad { background: var(--red); }
.sw { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef0f7; } .sw:last-child { border: 0; }
.prog { height: 10px; background: #e9ebf3; border-radius: 99px; overflow: hidden; margin: 10px 0; } .prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
pre.stack { background: #f4f5fa; border-radius: 8px; padding: 8px 10px; font-size: 11.5px; overflow-x: auto; white-space: pre-wrap; margin-top: 6px; }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
details summary { cursor: pointer; }

/* modal / toast */
.modal-back { position: fixed; inset: 0; background: rgba(20, 24, 45, .55); display: flex; align-items: center; justify-content: center; padding: 14px; z-index: 100; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 20px 22px; box-shadow: 0 24px 70px rgba(10, 12, 30, .4); } .modal.wide { width: min(760px, 100%); } .modal h2 { margin-bottom: 12px; font-size: 18px; } .modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; } .toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); max-width: 90vw; } .toast.ok { background: var(--green); } .toast.err { background: var(--red); }

/* sign-in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 30% 20%, #262d4c, #151a2e); } .login .box { background: #fff; border-radius: 18px; padding: 28px; width: min(380px, 100%); } .login h1 { margin: 6px 0 4px; } .login .brand { color: var(--ink); padding: 0 0 8px; } .login .brand i { background: var(--ink); }
.err-text { color: var(--red); min-height: 20px; font-size: 13px; }

@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; } .brand { padding: 0 8px 0 0; } .nav { display: flex; gap: 2px; flex-wrap: wrap; } .side .foot { display: none; } .main { padding: 16px 14px 50px; } .grid2, .grid3 { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; } }
.grid2 > .card, .grid2 > div > .card:first-child { margin-top: 0; }
