* { box-sizing: border-box; }
body { margin: 0; font-family: Segoe UI, Arial, sans-serif; color: #0f172a; background: #f3f6fb; }
a { color: inherit; text-decoration: none; }
button { border: 0; border-radius: 6px; background: #2563eb; color: white; padding: 10px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button svg, .button-link svg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }
.secondary-button { background: #e2e8f0; color: #0f172a; }
.button-link { display: inline-flex; align-items: center; border-radius: 6px; background: #e2e8f0; color: #0f172a; padding: 10px 14px; font-weight: 600; }
button:disabled { opacity: .55; cursor: default; }
input, textarea, select { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px 12px; font: inherit; color: #0f172a; background: #ffffff; }
select { min-height: 41px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #475569 50%), linear-gradient(135deg, #475569 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
textarea { min-height: 92px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 600; }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: #111827; color: white; padding: 18px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
.brand span, .page-head p, .panel p, .stats-grid span { color: #64748b; }
.sidebar .brand span { color: #cbd5e1; display: block; font-size: 13px; }
nav { display: grid; gap: 8px; }
nav a { padding: 11px 12px; border-radius: 6px; color: #e5e7eb; display: flex; align-items: center; gap: 10px; font-weight: 600; }
nav a svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; color: #93c5fd; }
nav a:hover { background: #1f2937; }
.sidebar-bottom-nav { margin-top: auto; }
.company-card { margin-top: 8px; border-top: 1px solid #334155; padding-top: 16px; display: grid; gap: 4px; color: #cbd5e1; font-size: 12px; line-height: 1.35; }
.company-card strong { color: #ffffff; font-size: 13px; }
.content { padding: 28px 32px; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 12px; color: #475569; font-weight: 600; }
.top-actions button { background: transparent; color: #334155; border: 1px solid #94a3b8; }
.page-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #dbe3ef; margin-bottom: 20px; }
h1 { margin: 0; font-size: 30px; }
h2 { margin: 0 0 10px; font-size: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stats-grid article, .panel, .login-card { background: white; border: 1px solid #dbe3ef; border-radius: 8px; box-shadow: 0 14px 40px rgba(15, 23, 42, .06); }
.stats-grid article { padding: 18px; display: grid; gap: 8px; }
.stats-grid strong { font-size: 28px; }
.panel { padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.vertical { display: grid; justify-content: stretch; align-items: start; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 520px; }
.readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-stack { display: grid; gap: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); padding: 24px; }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; }
.success { background: #dcfce7; color: #166534; }
.error { background: #fee2e2; color: #991b1b; }
.qr { width: 180px; height: 180px; image-rendering: pixelated; }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; }
.table-list { display: grid; gap: 10px; }
.table-list article { border: 1px solid #dbe3ef; border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.table-list article.ban-active { border-color: #fca5a5; background: #fff7f7; }
.table-list article > div:first-child { display: grid; gap: 4px; }
.table-list span, .table-list small { color: #64748b; }
.table-list code { color: #334155; }
.expander-panel summary { cursor: pointer; font-weight: 800; color: #0f172a; list-style: none; }
.expander-panel summary::-webkit-details-marker { display: none; }
.expander-panel summary::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .65rem; border-right: 2px solid #64748b; border-bottom: 2px solid #64748b; transform: rotate(-45deg); transition: transform .15s ease; vertical-align: .08rem; }
.expander-panel[open] summary::before { transform: rotate(45deg); }
.expander-content { margin-top: 16px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.send-instructions { display: flex; gap: 8px; align-items: center; }
.send-instructions input { width: 210px; }
.command-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.command-grid button { white-space: nowrap; }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.console-head span { color: #64748b; font-weight: 600; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title-row h2 { margin: 0; }
.maintenance-console { background: #0f172a; color: #dbeafe; border-radius: 8px; min-height: 190px; max-height: 340px; overflow: auto; padding: 12px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.console-line { display: grid; grid-template-columns: 76px 72px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(148, 163, 184, .18); }
.console-line:last-child { border-bottom: 0; }
.console-line span { color: #94a3b8; }
.console-line strong { color: #93c5fd; text-transform: uppercase; }
.console-line p { margin: 0; color: #e2e8f0; }
.console-line.ok strong { color: #86efac; }
.console-line.progress strong { color: #facc15; }
.console-line.error strong { color: #fca5a5; }
.console-line.muted p, .console-line.muted strong { color: #94a3b8; }
@media (max-width: 840px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { min-height: auto; }
    .stats-grid, .two-column, .readonly-grid { grid-template-columns: 1fr; }
    .row-actions, .send-instructions { flex-wrap: wrap; }
    .send-instructions input { width: min(100%, 260px); }
    .content { padding: 18px; }
    .console-line { grid-template-columns: 1fr; gap: 2px; }
}
