* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f3efe8; --panel: #fffdf9; --border: #e6ddcd; --text: #26221f;
  --muted: #8a8172; --accent: #b3623f; --accent-dark: #8f4c30;
  --ok-bg: #e0ede0; --ok-text: #33693a; --warn-bg: #f6ecd0; --warn-text: #8f6b16;
  --bad-bg: #f6ddd6; --bad-text: #a3402a;
}
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.shell { display: flex; min-height: 100vh; }

.sidebar { width: 232px; background: linear-gradient(180deg, #221e1b, #2b2621); color: #e8e0d4; display: flex; flex-direction: column; padding: 22px 0; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 16px; font-weight: 700; padding: 0 22px 20px; margin-bottom: 12px; letter-spacing: 0.3px; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); display: inline-block; }

.navlist { list-style: none; flex: 1; padding: 0 10px; }
.navlist li { display: flex; align-items: center; gap: 11px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; font-weight: 500; border-radius: 7px; opacity: 0.68; margin-bottom: 2px; transition: all 0.15s ease; }
.navlist li svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.navlist li:hover { background: #35302a; opacity: 1; }
.navlist li.active { background: var(--accent); opacity: 1; color: #fff; box-shadow: 0 2px 10px rgba(179,98,63,0.35); }

.sidebar button#logout { margin: 14px 12px 0; padding: 10px; background: transparent; color: #c9c0b2; border: 1px solid #3d3831; border-radius: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 500; transition: all 0.15s ease; }
.sidebar button#logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sidebar button#logout:hover { background: #3d3831; color: #fff; }

.content { flex: 1; padding: 26px 36px 40px; overflow-y: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.topbar-title { font-size: 21px; font-weight: 700; }
.topbar-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #3c9e46; box-shadow: 0 0 0 rgba(60,158,70,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60,158,70,0.5); } 70% { box-shadow: 0 0 0 6px rgba(60,158,70,0); } 100% { box-shadow: 0 0 0 0 rgba(60,158,70,0); } }

.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; box-shadow: 0 1px 2px rgba(38,34,31,0.04); transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card:hover { box-shadow: 0 4px 14px rgba(38,34,31,0.08); }
.card.wide { grid-column: 1 / -1; }
.stat { font-size: 30px; font-weight: 700; color: var(--accent-dark); letter-spacing: -0.5px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 9px 10px; color: var(--muted); border-bottom: 1.5px solid var(--border); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; }
td { padding: 10px; border-bottom: 1px solid #ede5d6; }
tbody tr:hover { background: #faf6ef; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.badge-bad { background: var(--bad-bg); color: var(--bad-text); }
.badge-neutral { background: #ece4d6; color: #6b6355; }

.logControls { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; }
.logControls select, .logControls input, .logControls button { padding: 9px 12px; border-radius: 7px; border: 1px solid var(--border); font-size: 13px; font-family: 'Inter', sans-serif; background: var(--panel); }
.logControls button { background: var(--accent); color: #fff; border: none; cursor: pointer; font-weight: 600; transition: background 0.15s ease; }
.logControls button:hover { background: var(--accent-dark); }
#logsOut { white-space: pre-wrap; font-family: 'SF Mono', Consolas, monospace; font-size: 12px; max-height: 520px; overflow-y: auto; line-height: 1.6; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--bg); }
.login-box { display: flex; flex-direction: column; gap: 12px; width: 300px; background: var(--panel); padding: 30px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(38,34,31,0.08); }
.login-box h2 { color: var(--text); margin-bottom: 8px; font-size: 19px; font-weight: 700; }
.login-box input { padding: 11px 12px; border: 1px solid var(--border); border-radius: 7px; font-family: 'Inter', sans-serif; font-size: 14px; }
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,98,63,0.12); }
.login-box button { padding: 11px; background: var(--accent); color: #fff; border: none; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 14px; transition: background 0.15s ease; }
.login-box button:hover { background: var(--accent-dark); }
.error { color: var(--bad-text); font-size: 12px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d8cdb8; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }
