:root {
    --bg: #1a1d23; --surface: #21252b; --border: #2c313a;
    --text: #cdd6de; --muted: #7a828e; --accent: #5c9ce6;
    --green: #6db77b; --red: #e06c75; --amber: #d4a14b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
       background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; }
nav { background: var(--surface); border-bottom: 1px solid var(--border);
      padding: 0 20px; display: flex; gap: 18px; height: 48px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; }
nav a:hover, nav a.active { color: var(--text); }
nav .brand { font-weight: 700; color: var(--accent); font-size: 15px; margin-right: auto; }
main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
tr:hover { background: rgba(255,255,255,0.03); }
.badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green { background: rgba(109,183,123,0.15); color: var(--green); }
.badge-red { background: rgba(224,108,117,0.15); color: var(--red); }
.badge-amber { background: rgba(212,161,75,0.15); color: var(--amber); }
.badge-blue { background: rgba(92,156,230,0.15); color: var(--accent); }
.money { font-variant-numeric: tabular-nums; }
h2 { font-size: 17px; margin-bottom: 14px; }
.section { margin-bottom: 28px; }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
input, select, button { background: var(--bg); border: 1px solid var(--border); color: var(--text);
    padding: 7px 12px; border-radius: 6px; font-size: 13px; }
button { background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; border: none; }
button:hover { opacity: 0.9; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.search-bar input { flex: 1; }
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.login-box { max-width: 380px; margin: 80px auto; }
.login-box h2 { text-align: center; margin-bottom: 20px; }
.login-box input { width: 100%; margin-bottom: 12px; }
.login-box button { width: 100%; }
.login-divider { text-align: center; margin: 14px 0; color: var(--muted); font-size: 13px; }
.btn-demo { background: var(--bg) !important; border: 1px solid var(--border) !important; color: var(--accent) !important; }
.error-msg { color: var(--red); font-size: 13px; margin-bottom: 10px; }
.success-msg { color: var(--green); font-size: 13px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 13px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toast { position: fixed; top: 16px; right: 16px; padding: 12px 20px; border-radius: 8px; font-size: 13px; z-index: 999; }
.toast-ok { background: var(--green); color: #fff; }
.toast-err { background: var(--red); color: #fff; }
/* ── Modal ── */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 99; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-content { background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; width: 100%; max-width: 640px; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 16px 32px rgba(0,0,0,0.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-header .close { cursor: pointer; font-size: 22px; color: var(--muted); }
.modal-header .close:hover { color: var(--text); }
.modal-body { padding: 20px; }
/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); border-radius: 6px; font-size: 13px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent); }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }
/* ── Buttons ── */
.btn-danger { background: var(--red); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-group { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
/* ── Tabs ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab-btn { padding: 8px 16px; background: none; border: none; color: var(--muted);
    font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 6px 6px 0 0; }
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab-btn.active { color: var(--accent); border: 1px solid var(--border);
    border-bottom-color: var(--surface); margin-bottom: -1px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
/* ── Charts ── */
.chart-box { width: 100%; height: 350px; position: relative; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
/* ── Quick actions ── */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-btn { width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); }
.quick-btn:hover { border-color: var(--accent); background: var(--bg); }
/* ── Task cards ── */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.task-card { background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px; }
.task-card.done { opacity: 0.5; }
.task-card h4 { margin: 0 0 8px 0; font-size: 15px; }
.task-card .task-notes { font-size: 12px; color: var(--muted);
    white-space: pre-wrap; max-height: 48px; overflow: hidden; margin-bottom: 10px; }
.task-card .task-meta { display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted); }
.task-card .task-actions { display: flex; gap: 4px; margin-top: 8px; justify-content: flex-end; }
/* ── Star rating ── */
.star-row { display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; }
.star-row label { font-weight: 600; font-size: 14px; }
.star-row input[type=range] { width: 120px; accent-color: var(--accent); }
.star-row .star-val { font-weight: 700; color: var(--accent); width: 20px; text-align: center; }
/* ── Loading ── */
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Empty state ── */
.empty { text-align: center; padding: 40px; color: var(--muted); }
/* ── Analytics ── */
.ana-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ana-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    padding: 14px 18px; }
.ana-kpi .lbl { font-size: 10px; color: var(--muted); text-transform: uppercase;
    font-weight: 700; letter-spacing: 0.5px; }
.ana-kpi .val { font-size: 22px; font-weight: 700; margin-top: 4px; }
.ana-chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.ana-chart-card { background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px; }
.ana-chart-card h4 { margin: 0 0 10px 0; font-size: 13px; color: var(--muted); }

/* ── Procura workspace shell ── */
:root {
    --bg: #11161d; --surface: #19212b; --surface-raised: #202b38;
    --border: #2b3948; --border-soft: rgba(148,163,184,.14);
    --text: #e6edf3; --muted: #8b9aaa; --accent: #68a8f8;
    --accent-soft: rgba(104,168,248,.12); --green: #63c28a;
}
body { background: var(--bg); color: var(--text); font-size: 14px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: #151d26; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; z-index: 20; }
.brand-wrap { height: 72px; padding: 0 20px; display: flex; align-items: center; border-bottom: 1px solid var(--border-soft); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.3px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #68a8f8, #4777d4); color: white; font-size: 16px; box-shadow: 0 5px 15px rgba(72,117,210,.28); }
.side-nav { padding: 12px 12px 18px; overflow-y: auto; display: block; height: auto; background: transparent; border: 0; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; margin: 2px 0; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 550; text-decoration: none; transition: .15s ease; }
.side-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.side-nav a.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.side-nav .material-icons { font-size: 18px; color: #72869a; }
.side-nav a.active .material-icons { color: var(--accent); }
.nav-caption { padding: 18px 11px 6px; color: #637486; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 750; }
.sidebar-footer { margin-top: auto; padding: 13px 16px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border-soft); }
.sidebar-footer > a { color: var(--muted); display: grid; place-items: center; margin-left: 3px; }
.sidebar-footer > a:hover { color: var(--text); }
.sidebar-footer .material-icons { font-size: 17px; }
.user-chip { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #30445c; color: #b9d9ff; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.user-name small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 2px; }
.main-shell { width: calc(100% - 248px); margin-left: 248px; min-width: 0; }
.topbar { height: 88px; padding: 20px 34px 16px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--border-soft); background: rgba(17,22,29,.78); }
.eyebrow { color: var(--muted); display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 700; margin-bottom: 5px; }
.topbar h1 { font-size: 24px; letter-spacing: -.5px; line-height: 1; font-weight: 720; }
.topbar-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; padding-bottom: 2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(99,194,138,.12); }
main { max-width: none; padding: 28px 34px 50px; }
h2 { font-size: 18px; letter-spacing: -.2px; }
h3 { font-size: 15px; }
.card, .task-card, .ana-kpi, .ana-chart-card { background: var(--surface); border-color: var(--border-soft); box-shadow: 0 5px 20px rgba(0,0,0,.08); }
.card { border-radius: 10px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { font-size: 28px; letter-spacing: -.5px; }
.stat-label { color: #8495a7; }
table { border-collapse: separate; border-spacing: 0; }
th { background: rgba(255,255,255,.025); color: #8495a7; }
th, td { padding: 10px 12px; border-bottom-color: var(--border-soft); }
input, select, textarea { background: #111820; border-color: var(--border); }
button { box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.btn-secondary { background: #293542; }
.top-bar { margin-bottom: 20px; }
.top-bar h2 { display: none; }
.top-bar:has(> h2:only-child) { display: none; }
.section { margin-bottom: 30px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-btn { background: var(--surface-raised); border-color: var(--border-soft); min-height: 64px; }
.quick-btn:hover { background: #263546; }
.mobile-menu, .nav-close { display: none; }
@media (max-width: 1050px) { .sidebar { width: 216px; } .main-shell { width: calc(100% - 216px); margin-left: 216px; } main { padding-left: 24px; padding-right: 24px; } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(0,0,0,.3); }
    body.nav-open .sidebar { transform: translateX(0); }
    .main-shell { width: 100%; margin-left: 0; }
    .mobile-menu { display: grid; place-items: center; position: fixed; top: 14px; left: 14px; z-index: 10; width: 38px; height: 38px; padding: 0; background: var(--surface-raised); border: 1px solid var(--border); }
    .mobile-menu .material-icons { font-size: 20px; }
    .nav-close { display: block; margin-left: auto; background: none; color: var(--muted); box-shadow: none; font-size: 24px; padding: 0; }
    .topbar { height: 78px; padding: 17px 18px 14px 66px; } .topbar h1 { font-size: 21px; } .topbar-status { display: none; }
    main { padding: 22px 16px 40px; } .grid-3, .quick-actions { grid-template-columns: 1fr; } .form-row { flex-direction: column; gap: 0; }
}
