/* =====================================================================
   FLUXO · Seu trabalho em movimento
   Design system — identidade visual NOON
   ===================================================================== */

:root {
    --lime: #A5E52C;
    --lime-600: #8CCB17;
    --lime-700: #5E8A0B;
    --lime-100: #ECF9D2;
    --lime-50: #F6FCEA;
    --ink: #111111;
    --ink-2: #1C1C1C;
    --ink-3: #2A2A2A;
    --text: #111111;
    --muted: #6B7280;
    --muted-2: #9CA3AF;
    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --line: #ECEEF2;
    --line-2: #E1E4EA;
    --danger: #E5484D;
    --danger-50: #FDEDED;
    --warning: #D97706;
    --warning-50: #FEF5E7;
    --info: #2563EB;
    --info-50: #EEF3FE;
    --success: #4D7C0F;

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(17, 17, 17, .05);
    --shadow-sm: 0 1px 2px rgba(17, 17, 17, .04), 0 2px 8px -2px rgba(17, 17, 17, .06);
    --shadow: 0 2px 4px rgba(17, 17, 17, .03), 0 12px 32px -12px rgba(17, 17, 17, .14);
    --shadow-lg: 0 24px 64px -24px rgba(17, 17, 17, .28);
    --ring: 0 0 0 4px rgba(165, 229, 44, .35);

    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

    --sidebar-w: 272px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; background: rgba(17,17,17,.06); padding: 1px 6px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; }
.hl { color: var(--lime-700); }
.stack { display: grid; gap: 20px; align-content: start; }

/* ---------------------------------------------------------------------
   Marca
   --------------------------------------------------------------------- */
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .14em; }
.brand__tagline { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; letter-spacing: .01em; }
.brand--light { color: #fff; }
.brand--lg .logo-mark { width: 46px; height: 46px; }
.brand--lg .brand__name { font-size: 24px; }
.brand--center { justify-content: center; margin-bottom: 28px; }

/* ---------------------------------------------------------------------
   Botões
   --------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px;
    border: 1px solid var(--btn-bd); border-radius: 12px;
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: 14.5px; letter-spacing: -.005em;
    cursor: pointer; white-space: nowrap; user-select: none;
    transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { --btn-bg: var(--lime); --btn-fg: var(--ink); --btn-bd: var(--lime); }
.btn--primary:hover { --btn-bg: #B3EE41; box-shadow: 0 10px 24px -10px rgba(140, 203, 23, .8); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn--dark:hover { --btn-bg: var(--ink-3); }
.btn--ghost { --btn-bg: var(--surface); }
.btn--ghost:hover { border-color: #cfd4dc; }
.btn--lg { min-height: 54px; padding: 0 24px; font-size: 15.5px; border-radius: 14px; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.icon-btn:hover { background: var(--bg); border-color: #cfd4dc; }
.icon-btn--ghost { border-color: transparent; background: transparent; }
.icon-btn--ghost:hover { background: rgba(255,255,255,.08); border-color: transparent; }
.icon-btn--danger:hover { background: var(--danger-50); color: var(--danger); border-color: #f6c7c9; }
.icon-btn--success:hover { background: var(--lime-100); color: var(--lime-700); border-color: #cdeb92; }
.link-btn { background: none; border: 0; padding: 0; color: var(--lime-700); font-weight: 600; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------
   Pílulas, status, avatares
   --------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.pill .icon { width: 14px; height: 14px; }
.pill--lime { background: var(--lime); color: var(--ink); }
.pill--dark { background: var(--ink); color: #fff; }
.pill--light { background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); }
.pill--soon { background: rgba(165, 229, 44, .14); color: var(--lime-700); border: 1px dashed rgba(140, 203, 23, .6); font-size: 10.5px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .04em; }
.pill--xs { font-size: 10.5px; padding: 2px 7px; vertical-align: middle; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--on { color: var(--success); }
.status--on::before { background: var(--lime); box-shadow: 0 0 0 3px rgba(165,229,44,.25); }
.status--off { color: var(--muted-2); }

.avatar {
    --avatar: var(--lime); --avatar-text: var(--ink);
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--avatar); color: var(--avatar-text);
    font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.avatar--lg { width: 52px; height: 52px; border-radius: 16px; font-size: 18px; }
.avatar--xl { width: 88px; height: 88px; border-radius: 26px; font-size: 30px; }

/* ---------------------------------------------------------------------
   Alertas
   --------------------------------------------------------------------- */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; margin-bottom: 18px;
    border-radius: 14px; border: 1px solid; font-size: 14px;
    animation: rise .35s var(--ease);
}
.alert > span { flex: 1; padding-top: 1px; }
.alert--success { background: var(--lime-50); border-color: #d6f0a6; color: #36540a; }
.alert--success > .icon { color: var(--lime-700); }
.alert--error { background: var(--danger-50); border-color: #f6caca; color: #8f1d22; }
.alert--warning { background: var(--warning-50); border-color: #f8deb0; color: #7a4a06; }
.alert--info { background: var(--info-50); border-color: #d3e0fc; color: #1d3f8f; }
.alert__close { background: none; border: 0; padding: 2px; cursor: pointer; color: inherit; opacity: .6; border-radius: 6px; }
.alert__close:hover { opacity: 1; }
.alert__close .icon { width: 16px; height: 16px; }
.alert.is-hiding { opacity: 0; transform: translateY(-6px); transition: .3s var(--ease); }

/* ---------------------------------------------------------------------
   Formulários
   --------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; align-content: start; }
.field--end { align-content: end; padding-bottom: 6px; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.field__label em { color: var(--danger); font-style: normal; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.field__error { font-size: 13px; color: var(--danger); font-weight: 500; }
.input {
    width: 100%; min-height: 46px; padding: 10px 14px;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: var(--surface); color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--muted-2); }
.input:hover { border-color: #cdd2da; }
.input:focus { outline: none; border-color: var(--lime-600); box-shadow: var(--ring); }
.input:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.input.is-invalid { border-color: var(--danger); background: #fffafa; }
.input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, .15); }
.input--lg { min-height: 54px; font-size: 15.5px; border-radius: 14px; }
.input--mono { font-family: var(--mono); text-transform: uppercase; max-width: 120px; }
select.input {
    padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; z-index: 1; }
.input-icon > .input { padding-left: 44px; }
.input-group { position: relative; display: block; }
.input-group > .input, .input-icon > .input { display: block; }
.input-group > .input { padding-right: 52px; }
.field__hint--block { margin-top: -6px; }
.input-group__btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.input-group__btn:hover { background: var(--bg); color: var(--ink); }
.input-group__btn .icon + .icon { display: none; }
.input-group__btn.is-on .icon { display: none; }
.input-group__btn.is-on .icon + .icon { display: block; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3-1 { grid-template-columns: 3fr 1fr; }

.form-layout { max-width: 820px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.form-actions--sticky {
    position: sticky; bottom: 0; z-index: 5;
    margin: 4px -4px 0; padding: 14px 4px;
    background: linear-gradient(to top, var(--bg) 70%, rgba(247,248,250,0));
}

/* switch */
.switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 6px 0; }
.switch input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; flex-shrink: 0; width: 46px; height: 28px; border-radius: 999px; background: #D9DDE3; transition: background .25s var(--ease); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(17,17,17,.2); transition: transform .25s var(--ease); }
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--lime); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }
.switch__label { display: grid; gap: 2px; font-size: 14px; }
.switch__label span { font-size: 13px; color: var(--muted); }

/* rádio em cartões */
.choice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice__body { display: grid; gap: 3px; height: 100%; padding: 14px 16px 14px 44px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); transition: border-color .2s, background .2s, box-shadow .2s; font-size: 14px; }
.choice__body::before { content: ""; position: absolute; left: 16px; top: 17px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c3c8d0; background: #fff; transition: .2s; }
.choice__body span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.choice:hover .choice__body { border-color: #cdd2da; }
.choice input:checked + .choice__body { border-color: var(--ink); background: var(--lime-50); }
.choice input:checked + .choice__body::before { border: 5px solid var(--ink); background: var(--lime); }
.choice input:focus-visible + .choice__body { box-shadow: var(--ring); }

/* checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.check:hover { background: var(--bg); }
.check input { position: absolute; opacity: 0; }
.check__box { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid #c3c8d0; background: #fff; transition: .2s; }
.check__box .icon { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: .2s var(--ease); }
.check input:checked + .check__box { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.check input:checked + .check__box .icon { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { box-shadow: var(--ring); }
.check__text { display: grid; gap: 2px; font-size: 14px; }
.check__text span { font-size: 12.5px; color: var(--muted); }
fieldset[disabled] .check { cursor: not-allowed; opacity: .75; }

/* cores */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 11px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(17,17,17,.08); transition: transform .15s var(--ease), box-shadow .2s; }
.swatch:hover span { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--lime-600); }
.swatch-custom { position: relative; width: 34px; height: 34px; border-radius: 11px; overflow: hidden; border: 1.5px dashed #c3c8d0; background: conic-gradient(#ef4444, #f5a524, #a5e52c, #14b8a6, #3b82f6, #a855f7, #ec4899, #ef4444); cursor: pointer; }
.swatch-custom input { position: absolute; inset: -8px; width: 50px; height: 50px; opacity: 0; cursor: pointer; }

/* seções de formulário (instalador) */
.form-section { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; min-width: 0; }
.form-section + .form-section { padding-top: 24px; border-top: 1px solid var(--line); }
.form-section legend { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 16px; padding: 0; }
.form-section .btn--ghost { justify-self: start; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--lime); font-size: 13px; font-weight: 800; }

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); display: grid; gap: 18px; align-content: start; min-width: 0; }
.card--flat { box-shadow: none; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card__title { display: flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 700; }
.card__title .icon { width: 20px; height: 20px; color: var(--lime-700); }
.card__sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

/* ---------------------------------------------------------------------
   Layout do app
   --------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar-w); display: flex; flex-direction: column;
    background: var(--ink); color: #fff;
    padding: 22px 16px 16px;
}
.sidebar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 22px; }
.sidebar__close { display: none; color: #fff; }
.sidebar__nav { flex: 1; overflow-y: auto; overflow-x: hidden;display: grid; gap: 22px; align-content: start; margin: 0 -4px; padding: 4px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.nav-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.nav-section__label { padding: 0 12px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #6c6c6c; }
.nav-link {
    position: relative; display: flex; align-items: center; gap: 12px;
    min-height: 44px; padding: 0 12px; border-radius: 12px;
    color: #b9b9b9; font-weight: 500; font-size: 14.5px;
    transition: background .2s, color .2s;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.is-active { background: var(--lime); color: var(--ink); font-weight: 650; }
.nav-link.is-active .icon { color: var(--ink); }
.nav-link__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link.is-soon { color: #8a8a8a; }
.nav-link.is-soon .pill--soon { background: rgba(165,229,44,.08); color: var(--lime); border-color: rgba(165,229,44,.35); }
.nav-link.is-active .pill--soon { background: rgba(17,17,17,.1); color: var(--ink); border-color: rgba(17,17,17,.25); }

.sidebar__foot { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__foot .icon-btn { color: #9a9a9a; }
.sidebar__foot .icon-btn:hover { color: #fff; }
.user-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; transition: background .2s; }
.user-card:hover, .user-card.is-active { background: rgba(255,255,255,.06); }
.user-card__info { display: grid; min-width: 0; line-height: 1.3; }
.user-card__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card__role { font-size: 12px; color: #8a8a8a; }

.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 14px;
    height: 68px; padding: 0 36px;
    background: rgba(247, 248, 250, .82);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
}
.topbar__menu, .topbar__brand { display: none; }
.topbar__brand { align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; }
.topbar__brand .logo-mark { width: 32px; height: 32px; }
.topbar__spacer { flex: 1; }
.topbar__date { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.topbar__date .icon { width: 16px; height: 16px; }
.topbar__user { border-radius: 12px; }

.content { flex: 1; width: 100%; max-width: 1240px; padding: 12px 36px 40px; outline: none; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 36px 28px; font-size: 12.5px; color: var(--muted-2); max-width: 1240px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--ink); }
.back-link .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------------
   Visão geral
   --------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 34px 36px; margin-bottom: 22px;
    border-radius: var(--radius-xl);
    background: var(--ink); color: #fff;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    border: 2px solid rgba(165, 229, 44, .22);
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -240px; }
.hero::after { width: 300px; height: 300px; right: 40px; top: -200px; border-color: rgba(165, 229, 44, .12); }
.hero__text { position: relative; z-index: 1; }
.hero__date { font-size: 13px; color: #8f8f8f; margin-bottom: 8px; letter-spacing: .01em; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.hero h1 .hl { color: var(--lime); }
.hero__sub { margin-top: 10px; color: #bdbdbd; font-size: 15.5px; }
.hero__sub strong { color: #fff; }
.hero__badge { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.hero__badge div { display: grid; line-height: 1.35; }
.hero__badge span { font-size: 13px; color: #9a9a9a; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 13px; background: var(--bg); color: var(--ink); }
.stat__label { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat__value { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat__sep { color: var(--muted-2); font-weight: 500; margin: 0 4px; }
.stat__hint { font-size: 12.5px; color: var(--muted-2); }
.stat__link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--lime-700); }
.stat__link .icon { width: 15px; height: 15px; transition: transform .2s; }
.stat__link:hover .icon { transform: translateX(3px); }
.stat--dark { background: var(--lime); border-color: var(--lime); }
.stat--dark .stat__icon { background: var(--ink); color: var(--lime); }
.stat--dark .stat__label, .stat--dark .stat__hint { color: rgba(17,17,17,.7); }

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-grid__wide { grid-column: 1 / -1; }

.progress { width: 120px; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 8px; flex-shrink: 0; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: width .6s var(--ease); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 10px 8px 12px; border-radius: 14px; border: 1px solid var(--line); }
.steps__check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #c3c8d0; flex-shrink: 0; }
.steps__check .icon { width: 22px; height: 22px; }
.steps li.is-done { background: var(--bg); border-color: transparent; }
.steps li.is-done .steps__check { background: var(--lime); color: var(--ink); }
.steps li.is-done .steps__check .icon { width: 15px; height: 15px; stroke-width: 3; }
.steps li.is-done .steps__label { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(17,17,17,.25); }
.steps__label { flex: 1; font-size: 14.5px; font-weight: 500; }

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.roadmap li { display: flex; align-items: center; gap: 14px; padding: 10px 6px; border-radius: 12px; }
.roadmap li + li { border-top: 1px dashed var(--line); border-radius: 0; }
.roadmap__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--muted); flex-shrink: 0; }
.roadmap li > div { flex: 1; display: grid; line-height: 1.35; min-width: 0; }
.roadmap li strong { font-size: 14.5px; }
.roadmap li span:not(.pill):not(.roadmap__icon) { font-size: 13px; color: var(--muted); }

.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.feed li + li { border-top: 1px solid var(--line); }
.feed p { flex: 1; font-size: 14px; color: var(--ink-3); min-width: 0; }
.feed time { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.empty-inline { color: var(--muted); font-size: 14px; padding: 10px 0; }

/* ---------------------------------------------------------------------
   Tabelas e listas
   --------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.toolbar__search { flex: 1 1 280px; }
.toolbar select.input { width: auto; flex: 0 1 200px; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.table-card__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.table-card__head h2 { font-size: 16px; font-weight: 700; flex: 1; }
.dot-color { width: 12px; height: 12px; border-radius: 4px; background: var(--cat); flex-shrink: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 22px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #FBFBFC; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #FCFCFD; }
.table tr.is-muted td > *:not(.table__actions) { opacity: .6; }
.table__actions { width: 1%; white-space: nowrap; text-align: right; }
td.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
td.table__actions form { margin: 0; }
.cell-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person div { display: grid; min-width: 0; line-height: 1.35; }
.person span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-3); transition: .2s; }
.chip:hover { border-color: #c7ccd4; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-xl); background: var(--surface); }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 20px; background: var(--lime-100); color: var(--lime-700); }
.empty__icon .icon { width: 28px; height: 28px; }
.empty h2 { font-size: 19px; }
.empty p { color: var(--muted); max-width: 440px; }
.empty .btn { margin-top: 10px; }

/* cartões de categoria */
.cat-card { --cat: var(--lime); position: relative; display: grid; gap: 10px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.cat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--cat); }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card header, .cat-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-card__swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--cat); color: var(--cat-text); font-weight: 800; font-size: 15px; }
.cat-card h2 { font-size: 17px; margin-top: 4px; }
.cat-card p { font-size: 13.5px; color: var(--muted); min-height: 40px; }
.cat-card__meta a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.cat-card__meta a:hover { color: var(--lime-700); }
.cat-card__meta .icon { width: 16px; height: 16px; color: var(--muted); }
.cat-card footer { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.cat-card.is-muted { background: #FBFBFC; }
.cat-card.is-muted > *:not(footer) { opacity: .6; }
.row-actions { display: flex; gap: 6px; }
.row-actions form { margin: 0; }

/* cartões de papéis */
.role-card { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.role-card header, .role-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.role-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--bg); }
.role-card--admin { background: var(--ink); color: #fff; border-color: var(--ink); }
.role-card--admin .role-card__icon { background: var(--lime); color: var(--ink); }
.role-card--admin p, .role-card--admin dt { color: #9a9a9a !important; }
.role-card--admin footer { border-color: rgba(255,255,255,.1) !important; }
.role-card h2 { font-size: 18px; }
.role-card p { font-size: 13.5px; color: var(--muted); }
.role-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 0; }
.role-card__meta div { display: grid; }
.role-card__meta dt { font-size: 12px; color: var(--muted); }
.role-card__meta dd { margin: 0; font-weight: 700; }
.role-card footer { padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }

.perm-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.perm-group { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.perm-group legend { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 6px 4px; font-weight: 700; font-size: 14px; float: left; margin-bottom: 4px; }
.perm-group legend + * { clear: both; }

/* perfil */
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { justify-items: center; text-align: center; }
.profile-card h2 { font-size: 19px; }
.meta { width: 100%; display: grid; gap: 12px; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.meta div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; text-align: right; }

/* páginas "em breve" */
.soon { display: grid; justify-items: center; text-align: center; gap: 14px; max-width: 620px; margin: 24px auto; padding: 48px 32px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.soon__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; background: var(--ink); color: var(--lime); margin-bottom: 4px; }
.soon__icon .icon { width: 34px; height: 34px; }
.soon h1 { font-size: 32px; font-weight: 800; }
.soon__sub { font-size: 17px; color: var(--ink-3); }
.soon__list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; text-align: left; }
.soon__list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.soon__list .icon { width: 18px; height: 18px; padding: 3px; border-radius: 6px; background: var(--lime-100); color: var(--lime-700); stroke-width: 3; box-sizing: content-box; }

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth__hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
/* Ondas do login: deslocamento horizontal contínuo (loop sem emenda: período de 600),
   leve flutuação vertical e respiração de opacidade. Apenas transform/opacity → leve. */
.auth__waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: wavesIn 1.8s var(--ease) both; }
.auth__waves .wave { fill: none; stroke: url(#fxWaveStroke); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; will-change: transform; }
.wave--1 { animation: waveRight 26s linear infinite; animation-delay: -4s; }
.wave--2 { animation: waveLeft 32s linear infinite; animation-delay: -11s; }
.wave--3 { animation: waveRight 40s linear infinite; animation-delay: -20s; }
.wave--4 { animation: waveLeft 48s linear infinite; animation-delay: -7s; }
.wave-bob { --o: .8; animation: waveBob 9s ease-in-out infinite; will-change: transform, opacity; }
.wave-bob--1 { --o: 1; }
.wave-bob--2 { --o: .62; animation-duration: 11s; animation-delay: -3s; }
.wave-bob--3 { --o: .38; animation-duration: 13s; animation-delay: -6s; }
.wave-bob--4 { --o: .22; animation-duration: 15s; animation-delay: -2s; }
.wave--1 { stroke-width: 2.4; }
.auth__glow { position: absolute; width: 70%; aspect-ratio: 1; right: -20%; bottom: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgba(165, 229, 44, .16), rgba(165, 229, 44, 0)); pointer-events: none; animation: glowDrift 18s ease-in-out infinite alternate; }
@keyframes waveRight { from { transform: translateX(-600px); } to { transform: translateX(0); } }
@keyframes waveLeft { from { transform: translateX(0); } to { transform: translateX(-600px); } }
@keyframes waveBob { 0%, 100% { transform: translateY(0); opacity: var(--o); } 50% { transform: translateY(-9px); opacity: calc(var(--o) * .6); } }
@keyframes wavesIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes glowDrift { from { transform: translate(0, 0) scale(1); opacity: .8; } to { transform: translate(-8%, -6%) scale(1.08); opacity: 1; } }
.auth__hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; height: 100%; padding: 48px 56px; }
.auth__copy { max-width: 480px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); font-size: 12.5px; font-weight: 600; color: #cfcfcf; letter-spacing: .02em; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(165,229,44,.2); animation: pulse 2s infinite; }
.auth__copy h1 { margin-top: 22px; font-size: clamp(38px, 5vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.auth__copy h1 .hl { color: var(--lime); }
.auth__copy p { margin-top: 20px; font-size: 17px; color: #b4b4b4; max-width: 420px; line-height: 1.6; }
.auth__copy h1, .auth__copy p, .auth__foot { text-shadow: 0 0 18px #111, 0 0 6px #111; }
.auth__foot { font-size: 13px; color: #6f6f6f; }
.auth__panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth__card { width: 100%; max-width: 420px; animation: rise .5s var(--ease); }
.auth__card h2 { font-size: 30px; font-weight: 800; }
.auth__card > .muted { margin: 8px 0 28px; }
.auth__card .form { gap: 18px; }
.auth__card .btn { margin-top: 6px; }
.auth__mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 32px; font-weight: 800; font-size: 20px; letter-spacing: .14em; }
.auth__help { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.auth__help .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------------
   Instalador / páginas centrais
   --------------------------------------------------------------------- */
.install { min-height: 100vh; background: linear-gradient(180deg, var(--ink) 0, var(--ink) 340px, var(--bg) 340px); padding: 0 24px 48px; }
.install__head { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 28px 0; }
.install__body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; max-width: 1120px; margin: 0 auto; align-items: start; }
.install__intro { color: #fff; display: grid; gap: 18px; padding-top: 12px; }
.install__intro h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.install__intro > p { color: #b5b5b5; font-size: 16px; line-height: 1.6; }
.install__intro .card { color: var(--ink); margin-top: 18px; }
.install__note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.install__note .icon { width: 16px; height: 16px; margin-top: 2px; }
.install__form { padding: 30px; box-shadow: var(--shadow-lg); gap: 24px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checklist li .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; stroke-width: 3; box-sizing: border-box; }
.checklist li.is-ok .icon { background: var(--lime); color: var(--ink); }
.checklist li.is-fail .icon { background: var(--danger); color: #fff; }
.checklist li span { flex: 1; }
.checklist small { color: var(--muted); font-size: 12px; }

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.center-card { width: 100%; max-width: 480px; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 44px 32px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.center-card h1 { font-size: 26px; font-weight: 800; }
.center-card__actions { margin-top: 16px; }
.error-code { font-family: var(--font-display); font-size: 64px; font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--ink); background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 90%, transparent 90%); padding: 0 10px; }

/* ---------------------------------------------------------------------
   Animações
   --------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(165,229,44,.2); } 50% { box-shadow: 0 0 0 8px rgba(165,229,44,.05); } }
.content > * { animation: rise .4s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .auth__waves path { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hide-md { display: none; }
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
    .sidebar__close { display: grid; }
    body.sidebar-open { overflow: hidden; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(17,17,17,.45); backdrop-filter: blur(2px); animation: rise .2s; }
    .main { margin-left: 0; }
    .topbar { padding: 0 20px; background: rgba(247,248,250,.9); border-bottom-color: var(--line); }
    .topbar__menu { display: grid; }
    .topbar__brand { display: inline-flex; }
    .topbar__date { display: none; }
    .content { padding: 22px 20px 32px; }
    .app-footer { padding: 16px 20px 24px; }
    .dash-grid, .perm-groups { grid-template-columns: minmax(0, 1fr); }
    .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .install { background: linear-gradient(180deg, var(--ink) 0, var(--ink) 420px, var(--bg) 420px); }
    .install__body { grid-template-columns: minmax(0, 1fr); }
    .install__intro .card { display: none; }
    .install__intro .install__note { color: #9a9a9a; }
}

@media (max-width: 860px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__hero { display: none; }
    .auth__panel { align-items: start; padding-top: 64px; }
    .auth__mobile-brand { display: flex; }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .grid--2, .grid--3-1 { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
    .stat { padding: 16px; }
    .stat__value { font-size: 28px; }
    .stat__hint { display: none; }
    .hero { padding: 26px 22px; border-radius: 22px; }
    .hero__badge { display: none; }
    .page-head h1 { font-size: 25px; }
    .page-head__actions, .page-head__actions .btn { width: 100%; }
    .card { padding: 18px; border-radius: 18px; }
    .table th, .table td { padding: 12px 14px; }
    .hide-sm { display: none; }
    .toolbar select.input { flex: 1 1 140px; }
    .form-actions .btn { flex: 1; }
    .install { padding: 0 16px 32px; }
    .install__form { padding: 20px; }
    .soon { padding: 36px 20px; }
}

/* =====================================================================
   Etapa 2 · Núcleo operacional (demandas, clientes, relatórios)
   ===================================================================== */
.link { color: var(--lime-700); font-weight: 600; }
.link:hover { text-decoration: underline; }
.pad { padding: 18px 22px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-layout--wide { max-width: 980px; }
.field--inline { grid-auto-flow: column; align-items: center; gap: 8px; }
.field--inline .input { width: auto; }
.meta--plain { border-top: 0; padding-top: 0; margin-top: 0; }
.meta--plain dd.is-late { color: var(--danger); }
.notes { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--bg); font-size: 14px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.kpis__note { font-size: 12.5px; color: var(--muted-2); margin-bottom: 22px; }
.kpis--report { margin-bottom: 22px; }
.kpi { --k: var(--ink); --k-bg: var(--bg); display: grid; gap: 2px; align-content: start; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s; position: relative; overflow: hidden; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 12px; background: var(--k-bg); color: var(--k); }
.kpi__value { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.kpi__label { font-size: 14px; font-weight: 650; }
.kpi__hint { font-size: 12.5px; color: var(--muted); }
.kpi--blue { --k: #2563EB; --k-bg: #EEF3FE; }
.kpi--amber { --k: #B45309; --k-bg: #FEF5E7; }
.kpi--red { --k: #fff; --k-bg: var(--danger); border-color: #f6caca; background: #FFF7F7; }
.kpi--red .kpi__value { color: var(--danger); }
.kpi--lime { background: var(--lime); border-color: var(--lime); --k: var(--lime); --k-bg: var(--ink); }
.kpi--lime .kpi__hint { color: rgba(17,17,17,.65); }
.hero__cta { position: relative; z-index: 1; }
.card--approve { border-color: #f8deb0; box-shadow: 0 0 0 4px rgba(245,165,36,.08); }

/* Pílulas de status e prioridade */
.sp { --sp: #9CA3AF; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: color-mix(in srgb, var(--sp) 14%, #fff); color: color-mix(in srgb, var(--sp) 70%, #111); }
.sp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sp); }
.sp--finalizada { background: var(--ink); color: #fff; }
.sp--finalizada::before { background: var(--lime); }
.sp--aprovada { background: var(--lime-100); color: var(--lime-700); }
.sp--late { --sp: #E5484D; background: var(--danger); color: #fff; }
.sp--late::before { background: #fff; }
.prio { display: inline-flex; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.prio--alta { background: #FEF5E7; color: #B45309; border-color: #f8deb0; }
.prio--urgente { background: var(--danger); color: #fff; border-color: var(--danger); }
.prio--baixa { color: var(--muted-2); }

/* Lista de demandas */
.dlist { display: grid; gap: 8px; }
.drow { --sp: #9CA3AF; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 130px 150px 86px 190px; align-items: center; gap: 14px; padding: 14px 18px 14px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s var(--ease), box-shadow .2s, border-color .2s; }
.drow::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--sp); }
.drow:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.drow.is-late { border-color: #f6caca; background: #FFFBFB; }
.drow.is-late::before { background: var(--danger); }
.drow.is-done { opacity: .8; }
.drow__main { display: grid; min-width: 0; gap: 1px; }
.drow__code { font-size: 11.5px; font-weight: 700; color: var(--muted-2); letter-spacing: .03em; }
.drow__title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow__meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow__person { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; min-width: 0; }
.drow__due { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.drow__due .icon { width: 16px; height: 16px; color: var(--muted-2); }
.drow__due.is-late { color: var(--danger); font-weight: 650; }
.drow__due.is-late .icon { color: var(--danger); }
.drow__status { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.list-empty { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 14px; border: 1.5px dashed var(--line-2); color: var(--muted); font-size: 14px; background: var(--surface); }
.list-empty .icon { color: var(--lime-600); }

.dsection { display: grid; gap: 12px; }
.dsection h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.dsection h2 .icon { color: var(--lime-700); }
.dsection--approve h2 .icon { color: #B45309; }
.dsection--muted { opacity: .85; }

/* Abas */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border: 1px solid transparent; transition: .2s; }
.tab:hover { color: var(--ink); background: var(--surface); }
.tab.is-active { background: var(--ink); color: #fff; }
.tab__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(17,17,17,.07); font-size: 12px; font-weight: 700; color: inherit; }
.tab.is-active .tab__n { background: var(--lime); color: var(--ink); }
.tab--alert:not(.is-active) .tab__n { background: var(--danger); color: #fff; }

/* Formulário de demanda */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; }
.seg__opt span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600; transition: .2s; }
.seg__opt:hover span { border-color: #cdd2da; }
.seg__opt input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg__opt--urgente input:checked + span { background: var(--danger); border-color: var(--danger); }
.seg__opt--alta input:checked + span { background: #F5A524; border-color: #F5A524; color: var(--ink); }
.seg__opt input:focus-visible + span { box-shadow: var(--ring); }

.dropzone { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 18px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--lime-600); background: var(--lime-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--lime); }
.dropzone__text { font-size: 14.5px; }
.dropzone__hint { font-size: 12px; color: var(--muted); max-width: 520px; }
.filelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.filelist li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.filelist li.is-bad { border-color: #f6caca; background: var(--danger-50); color: #8f1d22; }
.filelist small { color: var(--muted); white-space: nowrap; }

/* Detalhe da demanda */
.dhead { margin-bottom: 18px; }
.dhead__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dhead__code { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.dhead h1 { font-size: 28px; font-weight: 800; }
.dhead__pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.stepper { list-style: none; margin: 0 0 20px; padding: 16px 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); counter-reset: st; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted-2); }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line-2); border-radius: 2px; }
.stepper li.is-done:not(:last-child)::after { background: var(--lime); }
.stepper__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.stepper__dot .icon { width: 15px; height: 15px; stroke-width: 3; }
.stepper li.is-done { color: var(--ink-3); }
.stepper li.is-done .stepper__dot { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.stepper li.is-current { color: var(--ink); }
.stepper li.is-current .stepper__dot { border-color: var(--ink); box-shadow: 0 0 0 5px rgba(165,229,44,.35); background: var(--ink); }
.stepper li.is-adjust .stepper__dot { border-color: var(--danger); background: var(--danger); box-shadow: 0 0 0 5px rgba(229,72,77,.18); }
.stepper li.is-adjust { color: var(--danger); }

.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.action-card { border-width: 1.5px; }
.action-card.has-actions { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(165,229,44,.25); }
.action-card__status { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.action-card__status .icon { color: var(--lime-700); }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hint-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-50); color: #1d3f8f; font-size: 14px; }
.hint-box .icon { margin-top: 2px; }
.prose { font-size: 15px; line-height: 1.65; color: var(--ink-3); overflow-wrap: anywhere; }

.att-group { display: grid; gap: 8px; }
.att-group__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.att { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); }
.att__thumb { display: grid; place-items: center; flex-shrink: 0; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; background: var(--ink); color: var(--lime); font-size: 11px; font-weight: 800; }
.att__thumb img { width: 100%; height: 100%; object-fit: cover; }
.att__thumb--link { background: var(--lime-100); color: var(--lime-700); }
.att__body { flex: 1; min-width: 0; display: grid; }
.att__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att__name:hover { text-decoration: underline; }
.att__meta { font-size: 12.5px; color: var(--muted); }
.icon-btn--ghost-dark { border-color: transparent; background: transparent; }
.icon-btn--ghost-dark:hover { background: var(--bg); }
.upload-form { padding-top: 18px; border-top: 1px solid var(--line); }
.upload-form__title { font-weight: 700; font-size: 14.5px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 46px; bottom: -6px; width: 2px; background: var(--line); }
.tl__body { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: 14px; }
.tl__body time { font-size: 12px; color: var(--muted-2); }
.tl__to { font-weight: 650; color: var(--ink); }
.tl__comment { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--bg); color: var(--ink-3); line-height: 1.55; overflow-wrap: anywhere; }
.tl--changes .tl__comment { background: var(--danger-50); color: #8f1d22; }
.tl--approve .tl__to, .tl--finalize .tl__to { color: var(--lime-700); }
.comment-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.comment-form .textarea { min-height: 48px; }

/* Clientes */
.client-card { display: grid; gap: 8px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.client-card header, .client-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.client-card h2 { font-size: 17px; margin-top: 4px; }
.client-card p { font-size: 13.5px; color: var(--muted); }
.client-card footer { flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.client-card footer span { display: inline-flex; align-items: center; gap: 6px; }
.client-card footer .icon { width: 15px; height: 15px; color: var(--muted); }
.client-card.is-muted { opacity: .6; }

@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .drow { grid-template-columns: minmax(0, 1fr) 120px 140px 170px; }
    .drow__prio { display: none; }
}
@media (max-width: 1024px) {
    .dgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .drow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "person status" "due prio"; row-gap: 10px; }
    .drow__main { grid-area: main; }
    .drow__person { grid-area: person; }
    .drow__status { grid-area: status; }
    .drow__due { grid-area: due; }
    .drow__prio { display: block; grid-area: prio; justify-self: end; }
    .drow__title { white-space: normal; }
    .grid--3 { grid-template-columns: minmax(0, 1fr); }
    .stepper { padding: 12px 8px; }
    .stepper__label { font-size: 11px; }
    .comment-form { grid-template-columns: 1fr; }
    .dhead h1 { font-size: 23px; }
}
@media (max-width: 640px) {
    .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
    .kpi { padding: 14px; }
    .kpi__value { font-size: 26px; }
    .hero__cta { width: 100%; }
    .field--inline { grid-auto-flow: row; }
}

/* =====================================================================
   Refino · Página do cliente
   ===================================================================== */
.client-head { margin-bottom: 24px; }
.client-head__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.client-head__text { flex: 1 1 320px; min-width: 0; }
.client-head__text h1 { font-size: 28px; font-weight: 800; overflow-wrap: anywhere; }
.client-head__text p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.client-head__sep { color: var(--muted-2); }
.client-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.client-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; min-width: 0; }
.contact-list li + li { border-top: 1px solid var(--line); }
.contact-list__icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; background: var(--bg); color: var(--ink-3); }
.contact-list__icon .icon { width: 17px; height: 17px; }
.contact-list__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.contact-list__label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.contact-list__value { font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; word-break: break-word; line-height: 1.4; }
.contact-list__value--link:hover { color: var(--lime-700); text-decoration: underline; }
.contact-list__value.is-empty { color: var(--muted-2); font-weight: 500; }

.kv { display: grid; gap: 12px; margin: 0; }
.kv div { display: grid; gap: 2px; min-width: 0; }
.kv dt { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.kv dd { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.5; overflow-wrap: anywhere; }
.kv-text { font-size: 14px; color: var(--ink-3); line-height: 1.55; overflow-wrap: anywhere; }

.project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.project-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border: 1px solid var(--line); border-radius: 14px; }
.project-list li.is-muted { background: #FBFBFC; }
.project-list li.is-muted .project-list__body { opacity: .6; }
.project-list__body { display: grid; min-width: 0; }
.project-list__body strong { font-size: 15px; overflow-wrap: anywhere; }
.project-list__body span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.project-list__count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.project-add { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.project-add__title { font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.project-add__row { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: start; }

@media (max-width: 1024px) {
    .client-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .client-head__text h1 { font-size: 23px; }
    .client-head__actions, .client-head__actions .btn { width: 100%; }
    .project-list li { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; }
    .project-list__count { grid-column: 1 / -1; grid-row: 2; }
    .project-add__row { grid-template-columns: minmax(0, 1fr); }
}

/* Demanda própria · aprovar e finalizar */
.hint-box--lime { background: var(--lime-50); color: #36540a; border: 1px solid #d6f0a6; }
.hint-box--lime .icon { color: var(--lime-700); }
.btn--xl { min-height: 60px; padding: 0 30px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 640px) { .btn--xl { width: 100%; } }

/* =====================================================================
   Agenda, rotinas e boas-vindas inteligentes
   ===================================================================== */
.hero__wave { display: inline-block; font-size: .8em; margin-left: 2px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.btn--hero-ghost { --btn-bg: rgba(255,255,255,.06); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.18); }
.btn--hero-ghost:hover { --btn-bg: rgba(255,255,255,.12); box-shadow: none; }
.btn--danger-text { color: var(--danger); }
.avatar--xs { width: 24px; height: 24px; border-radius: 8px; font-size: 10px; }

/* Seções compactas da Visão Geral */
.dsec { display: grid; gap: 12px; margin-bottom: 22px; }
.dsec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dsec__head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dsec__head h2 .icon { color: var(--lime-700); }
.dsec__meta { font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.dsec__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Próximos eventos */
.event-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.event-mini { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s var(--ease), box-shadow .2s; min-width: 0; }
.event-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.event-mini__date { display: grid; place-items: center; align-content: center; flex-shrink: 0; width: 52px; height: 56px; border-radius: 14px; background: var(--ink); color: #fff; line-height: 1; }
.event-mini__date strong { font-size: 21px; font-weight: 800; }
.event-mini__date span { font-size: 10.5px; font-weight: 700; color: var(--lime); letter-spacing: .08em; margin-top: 3px; }
.event-mini__date--lg { width: 64px; height: 68px; }
.event-mini__date--lg strong { font-size: 26px; }
.event-mini.is-confirmed .event-mini__date { background: var(--lime); color: var(--ink); }
.event-mini.is-confirmed .event-mini__date span { color: var(--ink); }
.event-mini__body { display: grid; gap: 3px; min-width: 0; }
.event-mini__body strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-mini__body > span { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-mini__body .icon { width: 13px; height: 13px; flex-shrink: 0; }
.event-mini__tag { color: var(--lime-700) !important; font-weight: 600; }

/* Rotinas (cartões horizontais) */
.rt-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rt { --rt: var(--line-2); flex: 0 0 236px; scroll-snap-align: start; display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--rt); }
.rt--disponivel { --rt: var(--danger); }
.rt--assumida { --rt: var(--ink); }
.rt--em_andamento { --rt: #3B82F6; }
.rt--concluida { --rt: var(--lime); background: #FBFDF6; }
.rt.is-mine { box-shadow: 0 0 0 3px rgba(165,229,44,.28); }
.rt__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rt__time { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rt__time .icon { width: 13px; height: 13px; }
.rt__badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.rt__badge .icon { width: 12px; height: 12px; stroke-width: 3; }
.rt__badge--free { background: var(--danger-50); color: #B42318; }
.rt__badge--taken { background: var(--ink); color: #fff; }
.rt__badge--run { background: #EEF3FE; color: #1D4ED8; }
.rt__badge--done { background: var(--lime); color: var(--ink); }
.rt__name { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.rt__cat { justify-self: start; font-size: 11.5px; font-weight: 600; color: var(--muted); padding-left: 10px; position: relative; }
.rt__cat::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 2px; background: var(--cat); }
.rt__who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-height: 24px; }
.rt__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rt__actions form { margin: 0; }
.rt__done-at { font-size: 12px; color: var(--muted); }
.rt__transfer summary { list-style: none; cursor: pointer; }
.rt__transfer summary::-webkit-details-marker { display: none; }
.rt__transfer-form { display: flex; gap: 6px; margin-top: 8px; }
.rt__transfer-form .input { min-height: 36px; padding: 4px 30px 4px 10px; font-size: 13px; }

/* Agenda */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cal { gap: 14px; }
.cal__head { display: flex; align-items: center; gap: 10px; }
.cal__head h2 { flex: 1; text-align: center; font-size: 18px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal__wd { padding: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #FBFBFC; border-bottom: 1px solid var(--line); text-align: center; }
.cal__day { min-height: 98px; padding: 6px; display: grid; align-content: start; gap: 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-out { background: #FBFBFC; }
.cal__day.is-out .cal__num { color: var(--muted-2); }
.cal__num { justify-self: start; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.cal__num:hover { background: var(--bg); }
.cal__day.is-today .cal__num { background: var(--lime); color: var(--ink); }
.cal__ev { display: block; padding: 3px 6px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__ev span { color: var(--lime); }
.cal__ev--confirmado { background: var(--lime); color: var(--ink); }
.cal__ev--confirmado span { color: var(--ink); opacity: .7; }
.cal__ev--realizado { background: var(--bg); color: var(--muted); }
.cal__ev--realizado span { color: var(--muted-2); }
.cal__ev--cancelado { background: var(--bg); color: var(--muted-2); text-decoration: line-through; }
.cal__more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal__foot { font-size: 13px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ev-list a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.ev-list a:hover { background: var(--bg); }
.ev-list strong { font-size: 14px; overflow-wrap: anywhere; }
.ev-list span { font-size: 12.5px; color: var(--muted); }
.ev-list li.is-cancelled strong { text-decoration: line-through; color: var(--muted); }
.cal-list { display: none; }
.evs { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-3); }
.evs--confirmado { background: var(--lime); color: var(--ink); }
.evs--agendado { background: var(--ink); color: #fff; }
.evs--cancelado { background: var(--danger-50); color: #B42318; }

/* Rotinas · página e formulário */
.day-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.day-nav strong { font-size: 15px; }
.seg--days .seg__opt span { min-width: 54px; justify-content: center; }
[data-freq-panel] { display: none; }
[data-freq-panel].is-visible { display: grid; }

/* Relatório */
.report-h { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; font-size: 18px; font-weight: 800; }
.report-h .icon { color: var(--lime-700); }
.consolidated { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius-lg); background: var(--ink); color: #fff; margin-bottom: 8px; }
.consolidated__label { font-size: 12.5px; color: #a8a8a8; font-weight: 600; }
.consolidated__value { font-family: var(--font-display); font-size: 40px; font-weight: 800; color: var(--lime); line-height: 1.1; }
.consolidated__split { flex: 1 1 300px; display: grid; gap: 4px; font-size: 14.5px; color: #e5e5e5; }
.consolidated__split span { font-size: 12.5px; color: #8f8f8f; }

@media (max-width: 1024px) {
    .cal-layout { grid-template-columns: minmax(0, 1fr); }
    .event-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .cal__grid, .cal__foot { display: none; }
    .cal-list { display: grid; }
    .hero__actions .btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
    /* Banner enxuto no celular: só a ação principal da saudação */
    .hero__cta, .hero__actions .btn--hero-ghost { display: none; }
    .hero__actions { margin-top: 14px; }
}
.cal__ev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.cal__day { grid-template-columns: minmax(0, 1fr); }

/* =====================================================================
   Demandas disponíveis
   ===================================================================== */
.sp--free { --sp: #E5484D; background: var(--danger-50); color: #B42318; }
.choice-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.avail-opts { display: grid; gap: 4px; padding: 6px; border-radius: 14px; background: var(--bg); }
[data-modality-panel][hidden] { display: none !important; }
.avail-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avail-box .muted { font-size: 13.5px; }
.avail-direct { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 0 16px; }
.avail-direct[open] { padding-bottom: 16px; border-style: solid; border-color: var(--lime-600); }
.avail-direct summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; font-weight: 700; list-style: none; }
.avail-direct summary::-webkit-details-marker { display: none; }
.avail-direct summary .icon { color: var(--lime-700); }

.av-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.av { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--danger); }
.av.is-late { background: #FFFBFB; }
.av__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.av__code { font-size: 11.5px; font-weight: 700; color: var(--muted-2); letter-spacing: .03em; }
.av__title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.av__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.av__meta li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.av__meta li.is-late { color: var(--danger); font-weight: 650; }
.av__meta .icon { width: 13px; height: 13px; flex-shrink: 0; }
.av__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.av__actions form { margin: 0; }
@media (max-width: 640px) {
    .choice-list--2 { grid-template-columns: minmax(0, 1fr); }
}
