/* PMS – Zero 2 Hundred : enterprise UI baseline
   Clean, dense, keyboard-friendly. No decorative animation. */
:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #1f2733;
    --muted: #6b7480;
    --line: #dfe4ea;
    --brand: #14364f;
    --brand-2: #1d6fa5;
    --ok: #1a7f45;
    --ok-bg: #e6f4ec;
    --warn: #9a6700;
    --warn-bg: #fdf3d8;
    --err: #a12222;
    --err-bg: #fbe9e9;
    --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.45;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---- Guest / login ---- */
body.guest { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.guest-shell { width: 100%; max-width: 400px; padding: 24px; }
.login-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.login-card h1 { font-size: 20px; margin: 0 0 4px; color: var(--brand); }
.login-card label { display: block; margin: 14px 0 4px; font-weight: 600; }
.login-card input { width: 100%; }
.fineprint { margin-top: 16px; font-size: 12px; color: var(--muted); }
.error-card { text-align: center; }
.error-code { font-size: 48px; font-weight: 700; color: var(--brand); }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--brand); color: #dfe8ef; flex-shrink: 0; }
.sidebar .brand { padding: 18px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar nav { display: flex; flex-direction: column; padding: 8px 0; }
.sidebar nav a { color: #cdd9e2; padding: 9px 16px; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar .nav-group { padding: 14px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #8fa7b8; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 20px; gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 18px; }
.prop-switch { display: flex; align-items: center; gap: 6px; margin: 0; }
.prop-switch label { font-size: 12px; color: var(--muted); }
.business-date { font-size: 13px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { font-weight: 600; }
.user-chip em { color: var(--muted); font-weight: 400; }

.content { padding: 22px 24px; }
.page-title { font-size: 20px; margin: 0 0 16px; }

/* ---- Cards / panels ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); }
.data-table th, .data-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
.data-table tr:hover td { background: #f9fbfc; }

/* ---- Forms ---- */
input, select, button, textarea { font: inherit; }
input[type=text], input[type=email], input[type=password], select, textarea {
    padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: var(--brand-2); }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 520px; }
.form-row { margin-bottom: 14px; display: flex; flex-direction: column; }
.form-row label { font-weight: 600; margin-bottom: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.toolbar { margin-bottom: 14px; }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 8px 14px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; font-weight: 600; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-primary { background: var(--brand-2); color: #fff; }
.btn-primary:hover { background: #175f8e; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #eef1f4; text-decoration: none; }
.btn-block { width: 100%; margin-top: 18px; }
.inline { display: inline; margin: 0; }

/* ---- Badges & alerts ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; background: #eef1f4; color: var(--ink); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: #eceff2; color: var(--muted); }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #bfe0cd; }
.alert-error { background: var(--err-bg); color: var(--err); border-color: #edc4c4; }
.alert-warn { background: #fcf3d9; color: #8a6d1a; border-color: #ecd9a0; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
    .sidebar { width: 60px; }
    .sidebar .brand, .sidebar .nav-group { display: none; }
    .topbar { flex-wrap: wrap; }
}
