:root {
    --wr-bg: #f4f6f9;
    --wr-sidebar: #1f2a3a;
    --wr-sidebar-2: #17202e;
    --wr-accent: #2f6fed;
    --wr-accent-soft: #e8f0fe;
    --wr-border: #e2e6ec;
    --wr-text: #2b3444;
    --wr-muted: #7a8699;
    --wr-green: #1a9d63;
    --wr-amber: #c98a00;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    background: var(--wr-bg);
    color: var(--wr-text);
    font-size: 14px;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Shell ---------- */
.wr-shell { display: flex; min-height: 100vh; }

.wr-sidebar {
    width: 232px;
    flex: 0 0 232px;
    background: linear-gradient(180deg, var(--wr-sidebar), var(--wr-sidebar-2));
    color: #cdd6e4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.wr-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.wr-logo {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--wr-accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; letter-spacing: .5px; font-size: 13px;
}
.wr-brand-name { font-weight: 600; color: #fff; font-size: 15px; line-height: 1.1; }
.wr-brand-sub { font-size: 11px; color: #8593a8; }

.wr-nav { padding: 10px 10px; overflow-y: auto; }
.wr-nav-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6f7d92; padding: 14px 10px 6px; }
.wr-nav-link {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; margin: 1px 0;
    border-radius: 7px; color: #c3cdda; text-decoration: none;
    font-size: 13px; line-height: 1.2;
}
.wr-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.wr-nav-link.active { background: var(--wr-accent); color: #fff; }
.wr-ic { width: 18px; text-align: center; opacity: .9; }
.wr-step-dot {
    width: 19px; height: 19px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #dbe3ef;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; flex: 0 0 19px;
}
.wr-nav-link.active .wr-step-dot { background: rgba(255,255,255,.28); color: #fff; }

/* ---------- Main ---------- */
.wr-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.wr-topbar {
    height: 52px; background: #fff; border-bottom: 1px solid var(--wr-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.wr-topbar-company { font-weight: 600; color: var(--wr-text); }
.wr-topbar-right { display: flex; align-items: center; gap: 12px; }
.wr-user { color: var(--wr-muted); font-size: 13px; }

.wr-content { padding: 20px 24px; max-width: 1180px; width: 100%; }
.wr-toast { padding: 8px 14px; font-size: 13px; }

/* ---------- Page header ---------- */
.wr-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.wr-page-title { font-size: 19px; font-weight: 650; margin: 0; }
.wr-page-sub { color: var(--wr-muted); font-size: 13px; margin: 2px 0 0; }

/* ---------- Cards ---------- */
.wr-card { background: #fff; border: 1px solid var(--wr-border); border-radius: 10px; margin-bottom: 16px; }
.wr-card-head { padding: 11px 16px; border-bottom: 1px solid var(--wr-border); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: #55617a; display: flex; justify-content: space-between; align-items: center; }
.wr-card-body { padding: 16px; }
.wr-section-label { font-size: 12px; font-weight: 600; color: var(--wr-accent); text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 10px; }

/* ---------- Step indicator ---------- */
.wr-stepper { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.wr-stepper-item {
    flex: 1 1 0; min-width: 150px;
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--wr-border); border-radius: 9px; padding: 9px 12px;
}
.wr-stepper-item .num {
    width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
    background: #eef1f6; color: #8a95a8;
}
.wr-stepper-item .lbl { font-size: 12px; line-height: 1.15; color: var(--wr-muted); }
.wr-stepper-item.done .num { background: var(--wr-green); color: #fff; }
.wr-stepper-item.done .lbl { color: var(--wr-text); }
.wr-stepper-item.current { border-color: var(--wr-accent); box-shadow: 0 0 0 1px var(--wr-accent) inset; }
.wr-stepper-item.current .num { background: var(--wr-accent); color: #fff; }
.wr-stepper-item.current .lbl { color: var(--wr-text); font-weight: 600; }

/* ---------- Tables ---------- */
.wr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wr-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--wr-muted); padding: 9px 14px; border-bottom: 1px solid var(--wr-border); background: #fafbfc; }
.wr-table td { padding: 9px 14px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.wr-table tbody tr:hover { background: #fafcff; }
.wr-table .num-col { text-align: right; }

/* ---------- Badges ---------- */
.wr-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.wr-badge-confirmed { background: #e6f6ee; color: var(--wr-green); }
.wr-badge-pending { background: #fdf3e0; color: var(--wr-amber); }
.wr-badge-final { background: #e8f0fe; color: var(--wr-accent); }
.wr-badge-muted { background: #eef1f5; color: #6a7488; }

/* ---------- Forms (compact) ---------- */
.wr-form label.form-label { font-size: 12px; font-weight: 600; color: #4a5566; margin-bottom: 3px; }
.wr-form .form-control, .wr-form .form-select { font-size: 13px; padding: 6px 10px; }
.wr-form .form-control:disabled, .wr-form .form-select:disabled { background: #f5f7fa; }
.wr-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px 16px; }
.wr-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 16px; }
.wr-readonly-note { font-size: 12px; color: var(--wr-amber); background: #fdf3e0; border-radius: 6px; padding: 6px 12px; display: inline-block; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.btn { font-size: 13px; }
.btn-sm { font-size: 12px; padding: 3px 9px; }

/* ---------- Dashboard stats ---------- */
.wr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.wr-stat { background: #fff; border: 1px solid var(--wr-border); border-radius: 10px; padding: 14px 16px; }
.wr-stat .v { font-size: 26px; font-weight: 700; line-height: 1; }
.wr-stat .k { font-size: 12px; color: var(--wr-muted); margin-top: 6px; }
.wr-stat.accent { border-left: 3px solid var(--wr-accent); }

/* ---------- Login ---------- */
.wr-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2a3a, #2f6fed); padding: 20px; }
.wr-login-card { background: #fff; border-radius: 14px; width: 100%; max-width: 380px; padding: 30px 28px; box-shadow: 0 18px 45px rgba(0,0,0,.25); }
.wr-login-logo { width: 46px; height: 46px; border-radius: 11px; background: var(--wr-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px; }

/* ---------- Misc ---------- */
.text-mut { color: var(--wr-muted); }
.empty-row td { text-align: center; color: var(--wr-muted); padding: 26px; }
a.wr-link { color: var(--wr-accent); text-decoration: none; font-weight: 600; }
a.wr-link:hover { text-decoration: underline; }

/* ---------- Report table ---------- */
.wr-report-table { font-size: 12px; white-space: nowrap; }
.wr-report-table th { background: #eaf0fb; color: #33415c; font-weight: 600; }
.wr-report-table td, .wr-report-table th { padding: 5px 8px; }
div.dt-buttons { margin-bottom: 10px; }
div.dt-buttons .btn { margin-right: 6px; }

@media (max-width: 820px) {
    .wr-sidebar { display: none; }
    .wr-grid, .wr-grid-2 { grid-template-columns: 1fr; }
}
