/* ============ TOKENS ============ */
:root{
  --bg:#FAFAFA;
  --surface:#FFFFFF;
  --surface-2:#F0F0F0;
  --rail:#0E0E0F;
  --rail-ink:#9A9A9E;
  --rail-ink-active:#FFFFFF;
  --border:#E2E2E2;
  --ink:#111113;
  --ink-soft:#4D4D52;
  --muted:#8A8A8F;
  --accent:var(--rail);
  --accent-ink:var(--rail-ink-active);
  --accent-soft:#EBEBEB;
  --focus:var(--accent);

  --st-queue:#5B6178;      --st-queue-soft:#EDEEF3;
  --st-progress:#1D5FE0;   --st-progress-soft:#E7EFFE;
  --st-approval:#A9700A;   --st-approval-soft:#FBF0DA;
  --st-adjust:#C1401F;     --st-adjust-soft:#FBE8E2;
  --st-delivered:#177A4C;  --st-delivered-soft:#E3F5EB;
  --bday-personal:#C2255C; --bday-personal-soft:#FCE4EC;

  --shadow-1:0 1px 2px rgba(22,24,44,.06);
  --shadow-2:0 8px 24px rgba(22,24,44,.10);
  --radius-s:8px;
  --radius-m:12px;
  --radius-l:18px;
  --font-display:"Manrope",system-ui,sans-serif;
  --font-body:"Inter",system-ui,sans-serif;
  --font-mono:"IBM Plex Mono",ui-monospace,monospace;

  --glass-bg:rgba(255,255,255,.81);
  --glass-border:rgba(255,255,255,.7);
  --glass-shadow:0 2px 8px rgba(20,18,10,.05), 0 22px 44px -12px rgba(20,18,10,.22);
  --dash-grad:linear-gradient(135deg,#e3e3e3 0%,#fbfbfb 55%,color-mix(in srgb, #ffffff 26%, #d7d7d7) 100%);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0B0B0C;
    --surface:#161616;
    --surface-2:#1F1F20;
    --rail:#000000;
    --rail-ink:#8A8A8E;
    --rail-ink-active:#FFFFFF;
    --border:#2A2A2C;
    --ink:#F3F3F4;
    --ink-soft:#C2C2C6;
    --muted:#8F8F94;
    --accent:var(--rail-ink-active);
    --accent-ink:var(--rail);
    --accent-soft:#2A2A2C;

    --glass-bg:rgba(255,255,255,.05);
    --glass-border:rgba(255,255,255,.12);
    --glass-shadow:0 2px 8px rgba(0,0,0,.3), 0 22px 44px -12px rgba(0,0,0,.55);
    --dash-grad:linear-gradient(135deg,#121212 0%,#121212 55%,color-mix(in srgb, var(--accent) 22%, #121212) 100%);

    --st-queue:#A6ABC2;      --st-queue-soft:#2A2C3B;
    --st-progress:#7DA8FF;   --st-progress-soft:#1E2C48;
    --st-approval:#E3B15A;   --st-approval-soft:#3A2E17;
    --st-adjust:#F0846A;     --st-adjust-soft:#3B2320;
    --st-delivered:#6FCE9C;  --st-delivered-soft:#173226;
    --bday-personal:#F2A6C4; --bday-personal-soft:#3B1F2B;

    --shadow-1:0 1px 2px rgba(0,0,0,.4);
    --shadow-2:0 12px 28px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"]{
  --bg:#0B0B0C; --surface:#161616; --surface-2:#1F1F20; --rail:#000000;
  --rail-ink:#8A8A8E; --rail-ink-active:#FFFFFF; --border:#2A2A2C;
  --ink:#F3F3F4; --ink-soft:#C2C2C6; --muted:#8F8F94;
  --accent:var(--rail-ink-active); --accent-ink:var(--rail); --accent-soft:#2A2A2C;
  --glass-bg:rgba(255,255,255,.05); --glass-border:rgba(255,255,255,.12);
  --glass-shadow:0 2px 8px rgba(0,0,0,.3), 0 22px 44px -12px rgba(0,0,0,.55);
  --dash-grad:linear-gradient(135deg,#121212 0%,#121212 55%,color-mix(in srgb, var(--accent) 22%, #121212) 100%);
  --st-queue:#A6ABC2; --st-queue-soft:#2A2C3B;
  --st-progress:#7DA8FF; --st-progress-soft:#1E2C48;
  --st-approval:#E3B15A; --st-approval-soft:#3A2E17;
  --st-adjust:#F0846A; --st-adjust-soft:#3B2320;
  --st-delivered:#6FCE9C; --st-delivered-soft:#173226;
  --bday-personal:#F2A6C4; --bday-personal-soft:#3B1F2B;
  --shadow-1:0 1px 2px rgba(0,0,0,.4); --shadow-2:0 12px 28px rgba(0,0,0,.45);
}

*{box-sizing:border-box;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--font-body); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-display); color:var(--ink); margin:0; text-wrap:balance;}
.mono{font-family:var(--font-mono); font-variant-numeric:tabular-nums;}
a{color:inherit;}
button{font-family:inherit;}
:focus-visible{outline:2px solid var(--focus); outline-offset:2px;}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important;}}

.icon{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-0.16em;}
.icon-fill{fill:currentColor;stroke:none;}

/* ============ DEMO CONTROL BAR ============ */
.demo-bar{
  position:sticky; top:0; z-index:50;
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  padding:10px 20px; background:repeating-linear-gradient(135deg,var(--surface-2),var(--surface-2) 10px,var(--bg) 10px,var(--bg) 20px);
  border-bottom:1.5px dashed var(--border);
  font-size:12.5px;
}
.demo-bar b{font-family:var(--font-display); text-transform:uppercase; letter-spacing:.06em; font-size:11px; color:var(--muted);}
.demo-btns{display:flex; gap:6px; flex-wrap:wrap;}
.demo-btn{
  border:1px solid var(--border); background:var(--surface); color:var(--ink-soft);
  padding:6px 12px; border-radius:999px; font-size:12.5px; font-weight:600; cursor:pointer;
}
.demo-btn.is-active{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.demo-note{margin-left:auto; color:var(--muted); font-size:12px; max-width:420px;}

/* ============ APP SHELL — top navbar, full-bleed ============ */
.app{
  display:none; flex-direction:column;
  min-height:100vh;
  background:var(--dash-grad);
  background-attachment:fixed;
}
.app.is-active{display:flex;}

.topnav{
  display:flex; align-items:center; gap:14px; padding:18px 30px;
  background:transparent;
  flex-wrap:nowrap; flex:none;
}
.topnav > .topnav-links{margin:0 auto;}
.topnav-brand{
  display:flex; align-items:center; gap:10px; flex:none;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  padding:8px 16px 8px 8px;
}
.topnav-brand .mark{
  width:32px;height:32px;border-radius:50%; background:var(--ink); color:var(--bg);
  display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:800;font-size:15px;
}
.top-actions .who .avatar{border-radius:50%;}
.topnav-brand .name{font-family:var(--font-display); font-weight:800; color:var(--ink); font-size:15px; line-height:1.15;}
.topnav-brand .tag{display:block; font-size:10px; color:var(--muted); font-weight:600;}

.topnav-links{
  display:flex; align-items:center; gap:2px;
  background:var(--surface); border:1px solid var(--border);
  padding:5px; border-radius:999px; flex:0 1 auto; min-width:0; max-width:100%; overflow-x:auto; justify-content:center;
}
.rail-link{
  display:flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px;
  color:var(--ink-soft); font-weight:700; font-size:12.8px; cursor:pointer; border:none; background:none; white-space:nowrap; flex:none;
}
.rail-link .icon{width:15px;height:15px;flex:none;}
.rail-link:hover{color:var(--ink);}
.rail-link.is-active{background:var(--rail); color:var(--rail-ink-active);}

.top-actions{
  display:flex; align-items:center; gap:10px; flex:none;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  padding:6px 8px;
}
.icon-btn{
  position:relative; width:32px;height:32px; border-radius:10px; border:none;
  background:var(--surface-2); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); cursor:pointer; flex:none;
}
.icon-btn .dot{position:absolute; top:6px; right:7px; width:7px; height:7px; border-radius:50%; background:var(--st-adjust); border:1.5px solid var(--surface);}
.who{display:flex; align-items:center; gap:9px; padding-left:8px; border-left:1px solid var(--border);}

.notif-wrap{position:relative;}
.notif-dropdown{
  position:absolute; top:calc(100% + 10px); left:50%; transform:translateX(-50%);
  width:320px; max-height:360px; overflow-y:auto; z-index:50;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-m);
}
.notif-dropdown .notif-head{padding:12px 14px; font-size:12.5px; font-weight:800; border-bottom:1px solid var(--border); color:var(--ink);}
.notif-item{display:flex; gap:10px; padding:12px 14px; border-bottom:1px solid var(--border);}
.notif-item:last-child{border-bottom:none;}
.notif-item .ico{width:30px;height:30px;border-radius:9px; background:var(--surface-2); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; flex:none;}
.notif-item .ico .icon{width:15px;height:15px;}
.notif-item .txt b{display:block; font-size:12.5px; color:var(--ink); font-weight:700;}
.notif-item .txt span{display:block; font-size:11.8px; color:var(--muted); margin-top:2px;}
.notif-empty{padding:22px 14px; text-align:center; font-size:12.5px; color:var(--muted);}
.avatar{width:32px;height:32px;border-radius:10px; background:var(--accent); color:var(--accent-ink); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:800; font-size:12.5px; flex:none;}
.person .avatar,
.dash-table .who .avatar,
#modalAvatar{background:var(--surface-2); color:var(--ink-soft); overflow:hidden;}
.who .name{font-weight:700; font-size:13px;}
.who .role{display:block; font-size:11px; color:var(--muted);}

.canvas{padding:34px; display:flex; flex-direction:column; gap:28px; flex:1;}
.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.page-head h1{font-size:22px;}
.page-head p{margin:4px 0 0; color:#424242; font-size:13px;}

.btn{
  display:inline-flex; align-items:center; gap:8px; border-radius:var(--radius-s); border:1px solid var(--border);
  background:var(--surface); color:var(--ink); font-weight:700; font-size:13px; padding:9px 15px; cursor:pointer;
}
.btn .icon{width:15px;height:15px;}
.btn-primary{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.btn-ghost{border-color:transparent; background:none;}
.btn-danger{color:var(--st-adjust); border-color:var(--st-adjust);}
.btn-danger:hover{background:var(--st-adjust-soft);}
.btn-sm{padding:6px 11px; font-size:12.5px;}
.btn-row{display:flex; gap:10px; flex-wrap:wrap;}
.btn:disabled{opacity:.5; cursor:not-allowed;}

/* ============ DASHBOARD BACKDROP (glass) ============ */
.dash-canvas{
  background:var(--dash-grad);
}

/* ============ STAT CARDS (glass) ============ */
.dash-left{display:flex; flex-direction:column; gap:18px; min-height:0;}
.dash-left > .panel{flex:1; min-height:0; display:flex; flex-direction:column;}
.dash-left > .panel > .panel-body{flex:1; min-height:0; overflow-y:auto;}
.dash-stats-row{display:flex; gap:14px;}
.dash-stats-row .stat-card-glass{flex:1; min-width:0; flex-direction:column; align-items:flex-start; gap:10px; padding:16px;}
.dash-stats-row .icon-chip-glass{width:36px; height:36px; border-radius:11px;}
.dash-stats-row .icon-chip-glass .icon{width:16px; height:16px;}
.dash-stats-row .value{font-size:22px;}
.stat-card-glass{
  display:flex; align-items:center; gap:16px;
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:24px;
  padding:22px 24px;
  backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%);
}
.icon-chip-glass{width:46px;height:46px;border-radius:15px; background:var(--rail); color:var(--rail-ink-active); display:flex; align-items:center; justify-content:center; flex:none;}
.icon-chip-glass .icon{width:19px;height:19px;}
.stat-card-glass .txt .value{font-family:var(--font-display); font-weight:800; font-size:27px; line-height:1;}
.stat-card-glass .txt .top{font-size:12px; color:var(--ink-soft); font-weight:600; margin-top:6px;}

/* ============ CARD / PANEL ============ */
.panel{
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:24px;
  backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%);
}
.panel .panel-head{border-bottom:1px solid var(--glass-border);}
.panel-head{display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--border); gap:10px;}
.panel-head h3{font-size:14.5px;}
.panel-head .hint{font-size:12px; color:var(--muted); font-weight:600;}
.panel-body{padding:20px 22px;}
.two-col{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:22px; align-items:start;}
.two-col-wide{grid-template-columns:minmax(260px,490px) minmax(0,1fr); align-items:stretch;}
.two-col-wide > .panel{display:flex; flex-direction:column;}
.two-col-wide > .panel .panel-body{flex:1;}

.panel-glass{
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:24px;

  backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%);
}
.panel-glass .panel-head{border-bottom:1px solid var(--glass-border);}

/* ============ TABELAS DE VIDRO (início: solicitações + aniversários) ============ */
.dash-table{width:100%; min-width:0; border-collapse:collapse; font-size:13px;}
.dash-table th{text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); padding:0 10px 8px; font-weight:700;}
.dash-table td{padding:10px; border-top:1px solid var(--glass-border); vertical-align:middle;}
.dash-table tr:first-child td{border-top:none;}
.dash-table .who{display:flex; align-items:center; gap:9px; padding-left:0; border-left:none;}
.dash-table .who .n{font-weight:700; font-size:13px;}
.dash-table .date{font-family:var(--font-mono); font-weight:600; white-space:nowrap;}
.dash-table td.req-title{font-weight:700;}
.badge-type{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px; white-space:nowrap;}
.badge-type.personal{background:var(--bday-personal-soft); color:var(--bday-personal);}
.badge-type.company{background:var(--st-delivered-soft); color:var(--st-delivered);}

/* ============ TABLE ============ */
.table-wrap{overflow-x:auto;}
.panel > .table-wrap:first-child{padding-top:20px;}
table{width:100%; border-collapse:collapse; min-width:720px;}
th{
  text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);
  padding:0 18px 10px; border-bottom:1px solid var(--border); font-weight:700;
}
td{padding:12px 18px; border-bottom:1px solid var(--border); font-size:13px; vertical-align:middle;}
tbody tr:last-child td{border-bottom:none;}
tbody tr:hover{background:color-mix(in srgb, var(--ink) 10%, var(--surface));}
.person{display:flex; align-items:center; gap:10px;}
.person .n{font-weight:700;}
.n.is-clickable{cursor:pointer;}
.n.is-clickable:hover{color:var(--ink); text-decoration:underline; text-underline-offset:3px;}
.req-title-cell.is-clickable{cursor:pointer; font-weight:700;}
.req-title-cell.is-clickable:hover{text-decoration:underline; text-underline-offset:3px;}

.user-row{border:1px solid var(--border); border-radius:var(--radius-m); padding:12px 14px; margin-bottom:10px;}
.user-row-main{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.user-row .n{font-weight:700; font-size:13px;}
.user-row .role-line{font-size:12px; color:var(--muted);}

/* ============ CONSTRUTOR DE FORMULÁRIO (admin) ============ */
#formBuilderSteps{display:flex; flex-direction:column; gap:18px; margin-bottom:16px;}
.fb-step{border:1px solid var(--border); border-radius:var(--radius-m); padding:16px;}
.fb-step-head{display:flex; align-items:center; gap:10px; margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid var(--border);}
.fb-step-title{flex:1; border:none; background:none; font-family:var(--font-display); font-weight:800; font-size:15px; color:var(--ink); padding:4px 2px;}
.fb-step-title:focus{outline:none; border-bottom:1.5px solid var(--accent);}
.fb-field-row{border:1px solid var(--border); border-radius:var(--radius-m); padding:14px; margin-bottom:10px; background:var(--surface-2);}
.fb-field-row .form-grid{margin-bottom:10px;}
.fb-field-foot{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.fb-field-foot label{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--ink-soft);}
.person .role-line{font-size:11.5px; color:var(--muted);}
.badge{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px; white-space:nowrap;}
.badge-company-tag{display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; color:var(--ink-soft); white-space:nowrap;}
.badge-company-tag .dot{width:8px; height:8px; border-radius:50%; flex:none;}
.badge-company-tag.is-clickable{cursor:pointer;}
.badge-company-tag.is-clickable:hover{color:var(--ink);}
.row-actions{display:flex; gap:6px;}
.icon-only{width:28px;height:28px;border-radius:7px;border:1px solid var(--border); background:var(--surface); display:flex;align-items:center;justify-content:center;color:var(--ink-soft); cursor:pointer;}
.icon-only:disabled{opacity:.35; cursor:default;}
.icon-only.danger:hover{color:var(--st-adjust); border-color:var(--st-adjust);}

.filter-row{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.select{
  border:1px solid var(--border); background:var(--surface); border-radius:var(--radius-s);
  padding:8px 12px; font-size:12.5px; font-weight:600; color:var(--ink-soft);
}
.search-input{
  min-width:230px; font-family:inherit; color:var(--ink);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A8F' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.3'/%3E%3Cpath d='m19.5 19.5-4.2-4.2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:10px center; background-size:14px; padding-left:32px;
}
.search-input::-webkit-search-cancel-button{cursor:pointer;}

.status-pill{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; padding:5px 11px; border-radius:999px;}
.status-pill .dot{width:6px;height:6px;border-radius:50%; background:currentColor;}
.st-queue{background:var(--st-queue-soft); color:var(--st-queue);}
.st-progress{background:var(--st-progress-soft); color:var(--st-progress);}
.st-approval{background:var(--st-approval-soft); color:var(--st-approval);}
.st-adjust{background:var(--st-adjust-soft); color:var(--st-adjust);}
.st-delivered{background:var(--st-delivered-soft); color:var(--st-delivered);}
.st-deleted{background:transparent; color:var(--muted); box-shadow:inset 0 0 0 1px currentColor;}

/* ============ WIZARD ============ */
.wizard-shell{max-width:760px; margin:0 auto; width:100%; display:flex; flex-direction:column; gap:20px;}
.stepper{display:flex; align-items:center; gap:0;}
.step{display:flex; align-items:center; gap:9px; flex:1;}
.step .bullet{
  width:28px;height:28px;border-radius:9px; border:2px solid var(--border); color:var(--muted);
  display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:800; font-size:12px; flex:none; background:var(--surface);
}
.step .label{font-size:11.5px; font-weight:700; color:var(--muted); white-space:nowrap;}
.step.is-done .bullet{background:var(--st-delivered); border-color:var(--st-delivered); color:#fff;}
.step.is-active .bullet{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.step.is-active .label,.step.is-done .label{color:var(--ink);}
.step-line{flex:1; height:2px; background:var(--border); margin:0 6px;}

.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px 16px;}
.field{display:flex; flex-direction:column; gap:6px;}
.field.full{grid-column:1/-1;}
.field label{font-size:12px; font-weight:700; color:var(--ink-soft);}
.field .opt{font-weight:500; color:var(--muted);}
.field input,.field select,.field textarea{
  border:1px solid var(--border); border-radius:var(--radius-s); padding:10px 12px; font-size:13px;
  background:var(--surface); color:var(--ink); font-family:inherit; width:100%;
}
.field textarea{resize:vertical; min-height:80px;}
.field .hintline{font-size:11px; color:var(--muted);}
.upload-box{
  border:1.5px dashed var(--border); border-radius:var(--radius-m); padding:18px; display:flex; align-items:center; gap:12px; color:var(--muted); font-size:12.5px;
}
.upload-box .thumb{width:52px;height:52px;border-radius:14px; background:var(--surface-2); color:var(--ink-soft); display:flex;align-items:center;justify-content:center; font-family:var(--font-display); font-weight:800;}
.chip-add{display:inline-flex; align-items:center; gap:6px; border:1px dashed var(--border); border-radius:999px; padding:6px 12px; font-size:12px; color:var(--muted); font-weight:700; background:none; cursor:pointer;}
.review-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px 22px;}
.review-item dt{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:2px;}
.review-item dd{margin:0; font-size:13.5px; font-weight:600;}
.wizard-foot{display:flex; justify-content:space-between; align-items:center; padding-top:6px;}

/* ============ NEW REQUEST FORM ============ */
.req-form{display:flex; flex-direction:column; gap:14px; max-width:520px;}

/* ============ EDITOR DE TEXTO SIMPLES ============ */
.rte-toolbar{display:flex; flex-wrap:wrap; align-items:center; gap:3px; border:1px solid var(--border); border-bottom:none; border-radius:var(--radius-s) var(--radius-s) 0 0; padding:5px; background:var(--surface-2);
  position:sticky; top:0; z-index:5;} /* fica presa no topo do modal ao rolar um texto longo */
.modal-card .rte-toolbar{top:14px;}
/* quando presa: faixa branca atrás da barra, cobrindo as laterais (padding do modal) e o respiro acima */
.modal-card .rte-toolbar.is-stuck{
  box-shadow:
    -24px 0 0 var(--surface), 24px 0 0 var(--surface),
    0 -14px 0 var(--surface), -24px -14px 0 var(--surface), 24px -14px 0 var(--surface);
}
.rte-btn{width:29px;height:29px;border-radius:6px; border:1px solid transparent; background:none; display:flex; align-items:center; justify-content:center; color:var(--ink-soft); cursor:pointer; font-size:13px; font-weight:800; font-family:inherit;}
.rte-btn .icon{width:15px;height:15px;}
.rte-btn:hover{background:var(--surface); border-color:var(--border);}
.rte-btn.is-active{background:var(--surface); border-color:var(--border); color:var(--ink);}
.rte-sep{width:1px; align-self:stretch; background:var(--border); margin:4px 2px;}
.rte-editor{
  border:1px solid var(--border); border-radius:0 0 var(--radius-s) var(--radius-s); padding:10px 12px; min-height:200px;
  font-size:13px; font-weight:400; line-height:1.55; background:var(--surface); color:var(--ink); font-family:inherit; overflow-y:auto;
}
.rte-editor:focus{outline:none; border-color:var(--accent);}
.rte-editor img{max-width:100%; border-radius:6px; margin:4px 0; display:block;}
.rte-editor ul,.rte-editor ol{margin:6px 0; padding-left:22px;}
.rte-editor blockquote{border-left:3px solid var(--border); margin:8px 0; padding:2px 0 2px 12px; color:var(--ink-soft);}
.rte-editor h3{font-size:17px; margin:8px 0 4px;}
.rte-editor h4{font-size:14.5px; margin:8px 0 4px;}
.rte-editor a{color:var(--st-progress); text-decoration:underline;}
.rte-editor:empty::before{content:attr(data-placeholder); color:var(--muted);}

/* ============ LOGIN ============ */
.login-screen{display:none; min-height:100vh; align-items:center; justify-content:center; padding:40px 20px;
  background:
    radial-gradient(700px 400px at 15% 10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.login-screen.is-active{display:flex;}
.login-card{width:100%; max-width:400px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-l); padding:34px 32px;}
.login-brand{display:flex; align-items:center; gap:11px; margin-bottom:22px;}
.login-brand .mark{width:36px;height:36px;border-radius:50%;background:var(--rail);color:var(--rail-ink-active);display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:800;}
.login-card .btn-primary{background:var(--rail); border-color:var(--rail); color:var(--rail-ink-active);}
.login-brand .name{font-family:var(--font-display); font-weight:800; font-size:18px;}
.login-brand .tag{display:block; font-size:11.5px; color:var(--muted);}
.login-tabs{display:flex; gap:4px; background:var(--surface-2); border-radius:999px; padding:4px; margin-bottom:20px;}
.login-tabs button{flex:1; border:none; background:none; border-radius:999px; padding:8px 0; font-weight:700; font-size:12.5px; color:var(--muted); cursor:pointer;}
.login-tabs button.is-active{background:var(--surface); color:var(--ink);}
.login-card .field{margin-bottom:14px;}
.login-foot{margin-top:6px; font-size:11.5px; color:var(--muted); text-align:center;}

.hidden{display:none!important;}

/* ============ CADASTRO PÚBLICO (estilo Typeform) ============ */
.pub-screen{
  display:none; flex-direction:column; min-height:100vh;
  background:
    radial-gradient(900px 500px at 85% 0%, var(--accent-soft), transparent 60%),
    var(--bg);
  position:relative;
}
.pub-screen.is-active{display:flex;}
.pub-demo-tag{
  display:flex; align-items:center; gap:8px;
  background:repeating-linear-gradient(135deg,var(--surface-2),var(--surface-2) 8px,var(--surface) 8px,var(--surface) 16px);
  border:1.5px dashed var(--border); border-radius:999px; padding:6px 8px 6px 14px; font-size:11.5px; color:var(--muted); font-weight:600;
}
.pub-demo-tag select{border:1px solid var(--border); border-radius:999px; padding:5px 10px; font-size:11.5px; font-weight:700; color:var(--ink); background:var(--surface);}
.pub-progress-track{width:100%; height:4px; background:var(--border);}
.pub-progress-fill{height:100%; width:0%; background:var(--accent); transition:width .4s cubic-bezier(.22,.68,.36,1);}
.pub-topbar{display:flex; align-items:center; justify-content:space-between; padding:22px 30px 0;}
.pub-brand{display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:800; font-size:14px; color:var(--ink);}
.pub-brand .mark{width:30px;height:30px;border-radius:50%;background:var(--ink);color:var(--bg);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;}
.pub-stage{flex:1; display:flex; align-items:center; justify-content:center; padding:30px 24px; overflow:hidden; position:relative;}
.pub-question{max-width:600px; width:100%; opacity:0; transform:translateY(26px); transition:opacity .38s cubic-bezier(.22,.68,.36,1), transform .38s cubic-bezier(.22,.68,.36,1);}
.pub-question.is-active{opacity:1; transform:translateY(0);}
.pub-question.is-leaving{opacity:0; transform:translateY(-26px);}
.pub-eyebrow{display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:14px;}
.pub-eyebrow .num{display:inline-flex; align-items:center; justify-content:center; width:20px;height:20px;border-radius:6px; background:var(--accent); color:var(--accent-ink); font-size:11px;}
.pub-question h2{font-size:28px; line-height:1.3; margin:0 0 26px; text-wrap:balance;}
.pub-question .opt{font-weight:500; color:var(--muted); font-size:15px;}
.pub-input{
  width:100%; border:none; border-bottom:2.5px solid var(--border); background:none; padding:10px 2px;
  font-family:inherit; font-size:24px; color:var(--ink); font-weight:600;
}
.pub-input:focus{outline:none; border-bottom-color:var(--accent);}
.pub-group{margin-bottom:4px;}
.pub-group .field label{font-size:12px; font-weight:700; color:var(--ink-soft); display:block; margin-bottom:6px;}
/* inputs do cadastro público: texto digitado, placeholder e data com o mesmo tamanho e fonte */
.pub-input-sm{font-size:14px!important; font-weight:500!important; padding:12px!important; font-family:var(--font-body);}
.pub-input-sm::placeholder{font-size:14px; font-weight:400; color:var(--muted);}
.pub-group .field.is-invalid input,
.pub-group .field.is-invalid textarea,
.pub-group .field.is-invalid .upload-box{border-color:var(--st-adjust);}
.field-error{font-size:12px; font-weight:600; color:var(--st-adjust);}
/* campo com várias respostas (ex.: pets) */
.pub-repeat{display:flex; flex-direction:column; gap:8px;}
.pub-repeat-row{display:flex; align-items:center; gap:8px; max-width:calc(50% + 40px);}
.pub-repeat-row .pub-input{flex:1;}
@media (max-width:640px){ .pub-repeat-row{max-width:none;} }
.pub-choices-inline{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;} /* sempre 2 opções por linha */
.pub-choice-sm{width:auto; padding:9px 16px; font-size:13.5px;}
textarea.pub-input{font-size:17px; font-weight:500; min-height:90px; resize:vertical; border:1.5px solid var(--border); border-radius:var(--radius-m); padding:14px;}
textarea.pub-input:focus{border-color:var(--accent);}
.pub-choices{display:flex; flex-direction:column; gap:10px;}
.pub-choice{
  display:flex; align-items:center; gap:12px; text-align:left; width:100%;
  border:1.5px solid var(--border); border-radius:var(--radius-m); padding:14px 16px; background:var(--surface);
  font-family:inherit; font-size:16px; font-weight:600; color:var(--ink); cursor:pointer;
}
.pub-choice .letter{width:26px;height:26px;border-radius:7px; border:1.5px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:var(--muted); flex:none;}
.pub-choice:hover{border-color:var(--accent);}
.pub-choice.is-selected{border-color:var(--accent); background:var(--accent-soft);}
.pub-choice.is-selected .letter{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.pub-actions{display:flex; align-items:center; gap:14px; margin-top:28px;}
.pub-hint{font-size:12px; color:var(--muted);}
.pub-footer{display:flex; align-items:center; justify-content:space-between; padding:0 30px 26px;}
.pub-nav-btn{width:40px;height:40px;border-radius:12px; border:1.5px solid var(--border); background:var(--surface); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; cursor:pointer;}
.pub-nav-btn:disabled{opacity:.35; cursor:default;}
.pub-counter{font-size:12px; color:var(--muted); font-weight:600;}
.pub-error{color:var(--st-adjust); font-size:12.5px; font-weight:600; margin-top:10px; display:none;}
.pub-error.is-visible{display:block;}

.pub-success{max-width:520px; width:100%; text-align:center;}
.success-check{
  width:76px;height:76px;border-radius:20px; background:var(--st-delivered-soft); color:var(--st-delivered);
  display:flex; align-items:center; justify-content:center; margin:0 auto 22px; animation:pubPop .5s cubic-bezier(.22,1.4,.36,1);
}
.success-check .icon{width:34px;height:34px;}
.pub-success h2{font-size:26px; margin:0 0 10px;}
.pub-success p{color:var(--muted); font-size:14.5px; margin:0 0 26px;}
@keyframes pubPop{0%{transform:scale(.3); opacity:0;}70%{transform:scale(1.08); opacity:1;}100%{transform:scale(1);}}

@media (max-width:640px){
  .pub-question h2{font-size:22px;}
  .pub-input{font-size:19px;}
}

/* ============ MODAL: DETALHES DO COLABORADOR ============ */
.modal-overlay{
  position:fixed; inset:0; z-index:200; background:rgba(10,10,12,.5);
  display:flex; align-items:center; justify-content:center; padding:24px;
  backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px);
}
.modal-card{
  width:100%; max-width:580px; max-height:86vh; overflow-y:auto;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-l);
}
.modal-head{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:22px 24px; border-bottom:1px solid var(--border);}
.modal-tabs{display:flex; gap:22px; padding:0 24px; border-bottom:1px solid var(--border);}
.modal-tab{border:none; background:none; padding:14px 0; font-family:inherit; font-weight:700; font-size:13px; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px;}
.modal-tab.is-active{color:var(--ink); border-bottom-color:var(--accent);}
.modal-person{display:flex; align-items:center; gap:14px; min-width:0;}
.modal-person h3{font-size:16.5px;}
.modal-person .hint{display:block; margin-top:2px; font-weight:600;}
.modal-body{padding:22px 24px;}
.modal-body .review-grid{gap:16px 22px;}
.modal-foot{display:flex; justify-content:flex-end; gap:10px; padding:18px 24px; border-top:1px solid var(--border);}
.modal-card-wide{max-width:680px;}
.modal-card-small{max-width:440px;}
.modal-overlay-top{z-index:250;} /* abre por cima de outro modal */

/* ============ LIGHTBOX DE IMAGEM ============ */
.rte-editor img{cursor:zoom-in;}
.lightbox{
  position:fixed; inset:0; z-index:300; background:rgba(10,10,12,.85);
  display:flex; align-items:center; justify-content:center; padding:72px 24px 24px;
}
.lightbox img{max-width:100%; max-height:100%; object-fit:contain; border-radius:var(--radius-s); box-shadow:0 10px 40px rgba(0,0,0,.4);}
.lightbox-actions{position:absolute; top:16px; right:16px; display:flex; align-items:center; gap:8px;}
.lightbox-actions .btn{text-decoration:none;}
.lightbox-actions .icon-only{background:var(--surface);}
.modal-card .req-form{max-width:none;}

/* ============ ANNOTATION NOTES ============ */
.note{
  background:var(--glass-bg); border:1px solid var(--glass-border); color:var(--ink); border-radius:var(--radius-m); padding:13px 16px; font-size:12.8px; display:flex; gap:10px;
  backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%);
}
.note .icon{color:var(--ink-soft); flex:none; margin-top:2px;}
.legend{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px;}
.legend .li{display:flex; gap:10px; align-items:flex-start; font-size:12.3px;}
.legend .li .dot{width:9px;height:9px;border-radius:50%; margin-top:4px; flex:none;}
.legend .li b{display:block; font-size:12.8px;}
.legend .li span{color:var(--muted);}

footer.brief{padding:26px; color:var(--muted); font-size:11.5px; text-align:center;}

@media (max-width:920px){
  .two-col{grid-template-columns:1fr;}
  .form-grid{grid-template-columns:1fr;}
  .review-grid{grid-template-columns:1fr;}
  .topnav-brand .name,.topnav-brand .tag{display:none;}
  .canvas{padding:20px;}
}
input[type="date"]{cursor:text; font-family:var(--font-body);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A8F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; background-size:16px; padding-right:38px!important;}
/* esconde o calendário nativo (usamos o nosso, que deixa digitar ao mesmo tempo) */
input[type="date"]::-webkit-calendar-picker-indicator{display:none;}

/* ============ CALENDÁRIO (datepicker) ============ */
.datepicker{position:fixed; z-index:400; width:292px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-m); box-shadow:var(--shadow-2); padding:12px; font-family:var(--font-body);}
.dp-head{display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:8px;}
.dp-selects{display:flex; gap:6px;}
.dp-selects select{border:1px solid var(--border); border-radius:8px; padding:5px 6px; font-size:12.5px; font-weight:600; color:var(--ink); background:var(--surface); font-family:inherit; cursor:pointer;}
.dp-nav{width:30px; height:30px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; cursor:pointer;}
.dp-nav:hover{color:var(--ink); background:var(--surface-2);}
.dp-week,.dp-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:2px; text-align:center;}
.dp-week span{font-size:11px; font-weight:700; color:var(--muted); padding:4px 0;}
.dp-day{height:34px; border:none; border-radius:8px; background:none; font-family:inherit; font-size:13px; color:var(--ink); cursor:pointer;}
.dp-day:hover{background:var(--surface-2);}
.dp-day.is-out{color:var(--muted);}
.dp-day.is-today{box-shadow:inset 0 0 0 1px var(--border); font-weight:700;}
.dp-day.is-selected{background:var(--accent); color:var(--accent-ink); font-weight:700;}
.dp-day.is-disabled{color:var(--border); cursor:not-allowed; background:none; text-decoration:line-through;}
.dp-foot{margin-top:8px; font-size:11px; color:var(--muted); text-align:center;}
/* data vazia fica na cor de placeholder (dd/mm/aaaa), igual aos outros campos */
input[type="date"]:required:invalid{color:var(--muted);}

/* múltipla escolha em linha (ex.: tamanho da camiseta): botões lado a lado, do tamanho do texto */
.pub-choices-inline .pub-choice{width:100%;}
/* lista suspensa sem opção escolhida fica na cor de placeholder */
select:required:invalid{color:var(--muted);}
select option{color:var(--ink);}

.fb-dep-values{display:flex; flex-wrap:wrap; gap:6px 14px; padding-top:4px;}
.fb-dep-values label{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:500; color:var(--ink-soft);}
.fb-dep-values input{width:auto; padding:0; margin:0;}

/* ============ INTEGRAÇÕES (Asana) ============ */
.soon-tag{font-size:11.5px; font-weight:700; color:var(--st-approval); background:var(--st-approval-soft); padding:5px 11px; border-radius:999px;}
.integ-grid{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:22px; align-items:stretch;}
@media (max-width:900px){ .integ-grid{grid-template-columns:1fr;} }
.integ-title{display:flex; align-items:center; gap:12px;}
.integ-title .hint{display:block;}
.integ-logo{width:36px; height:36px; border-radius:50%; background:#F06A6A; color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:800; flex:none;}
.integ-map{display:flex; flex-direction:column; gap:10px;}
.integ-map-row{display:grid; grid-template-columns:minmax(0,1fr) auto 150px; align-items:center; gap:12px;}
.integ-map-row input{border:1px solid var(--border); border-radius:var(--radius-s); padding:9px 12px; font-size:13px; background:var(--surface); color:var(--ink); font-family:inherit; width:100%;}
.integ-map-row .icon{color:var(--muted);}
.integ-map-row .status-pill{justify-self:start;}
.integ-checks{display:flex; gap:18px; flex-wrap:wrap; padding-top:8px;}
.integ-checks label{display:flex; align-items:center; gap:7px; font-size:13px; font-weight:500; color:var(--ink-soft);}
.integ-checks input{width:auto; padding:0; margin:0;}
.integ-form code, .field .hintline code{font-family:var(--font-mono); font-size:11px; background:var(--surface-2); padding:1px 5px; border-radius:4px;}
.field input:disabled,.field select:disabled,.field textarea:disabled{background:var(--surface-2); color:var(--muted); cursor:not-allowed;}
.integ-form textarea{min-height:92px;}
.empty-state{padding:22px; text-align:center; color:var(--muted); font-size:13px; border:1.5px dashed var(--border); border-radius:var(--radius-m);}
/* interruptor (liga/desliga) */
.switch{display:inline-flex; align-items:center; gap:10px; cursor:pointer; flex:none;}
.switch input{position:absolute; opacity:0; pointer-events:none;}
.switch-track{width:38px; height:22px; border-radius:999px; background:var(--border); position:relative; transition:background .2s;}
.switch-track::after{content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:var(--surface); box-shadow:var(--shadow-1); transition:transform .2s;}
.switch input:checked + .switch-track{background:var(--accent);}
.switch input:checked + .switch-track::after{transform:translateX(16px);}
.switch-label{font-size:12.5px; font-weight:700; color:var(--ink-soft);}
.switch.is-disabled{opacity:.6; cursor:not-allowed;}

/* ============ APROVAÇÃO DE CADASTROS ============ */
.pending-panel{border:1px solid #F5B400;} /* amarelo gema: chama atenção para cadastros pendentes */
.note-action{align-items:center;}
.note-action > div{flex:1;}

/* ============ LOGO PRODCREW (assets/logo-prodcrew.svg) ============ */
.brand-logo{display:block; width:auto; flex:none;}
.topnav-brand{padding:10px 18px;}
.topnav-brand .brand-logo{height:17px;}
.topnav-brand .tag{padding-left:10px; border-left:1px solid var(--border); font-size:11px; line-height:1.2;}
.login-brand{flex-direction:column; align-items:flex-start; gap:8px;}
.login-brand .brand-logo{height:30px;}
.pub-brand .brand-logo{height:20px;}
/* o arquivo do logo é preto: no tema escuro ele é invertido para branco */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .brand-logo{filter:invert(1);} }
:root[data-theme="dark"] .brand-logo{filter:invert(1);}

/* ============ DIÁLOGO PRÓPRIO E MENSAGENS DE ERRO EM FORMULÁRIOS ============ */
.modal-overlay-dialog{z-index:350;}
.form-alert-inline{flex:1; font-size:12.5px; font-weight:600; color:var(--st-adjust); text-align:right;}
.form-alert-inline:empty{display:none;}
.wizard-foot .form-alert-inline{text-align:center; padding:0 12px;}
.form-alert{font-size:12.5px; font-weight:600; color:var(--st-adjust); background:var(--st-adjust-soft); border-radius:var(--radius-s); padding:9px 12px; margin-bottom:12px;}
.form-alert:empty{display:none;}
.modal-section-title{font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin:22px 0 10px; padding-top:14px; border-top:1px solid var(--border);}
.modal-section-title:first-child{margin-top:0; padding-top:0; border-top:none;}
.modal-body .pub-group .pub-input-sm{font-size:13px!important; padding:10px 12px!important;}
/* stepper com muitas etapas: mostra o nome só da etapa atual */
.stepper.is-compact .step:not(.is-active) .label{display:none;}
.stepper.is-compact .step{flex:0 0 auto;}
.stepper.is-compact .step-line{flex:1;}

/* ============ ACESSO (login, esqueci a senha, convite) ============ */
.auth-title{font-size:19px; margin:0 0 6px;}
.auth-text{font-size:13px; color:var(--ink-soft); margin:0 0 18px; line-height:1.55;}
.auth-link{background:none; border:none; padding:0; font:inherit; font-size:12.5px; font-weight:700; color:var(--ink-soft); text-decoration:underline; cursor:pointer;}
.auth-link:hover{color:var(--ink);}
.auth-row{display:flex; justify-content:space-between; align-items:center; margin:-4px 0 16px;}
.auth-icon{width:48px; height:48px; border-radius:14px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; margin-bottom:14px; color:var(--ink);}
.auth-icon .icon{width:22px; height:22px;}
.auth-icon.ok{background:var(--st-delivered-soft); color:var(--st-delivered);}
.auth-icon.warn{background:var(--st-approval-soft); color:var(--st-approval);}
.btn-block{width:100%; justify-content:center;}
.pwd-rules{list-style:none; margin:0 0 14px; padding:0; display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted);}
.pwd-rules li::before{content:"○"; margin-right:7px;}
.pwd-rules li.ok{color:var(--st-delivered);}
.pwd-rules li.ok::before{content:"✓";}
.form-ok{font-size:12.5px; font-weight:600; color:var(--st-delivered); background:var(--st-delivered-soft); border-radius:var(--radius-s); padding:9px 12px; margin-bottom:12px;}
.form-ok:empty{display:none;}
.who.is-clickable{cursor:pointer; border-radius:999px;}
.who.is-clickable:hover .name{text-decoration:underline;}
.user-badge{display:inline-block; margin-left:6px; font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:999px; vertical-align:1px;}
.user-badge.ativo{background:var(--st-delivered-soft); color:var(--st-delivered);}
.user-badge.pendente{background:var(--st-approval-soft); color:var(--st-approval);}
.copy-row{display:flex; gap:8px;}
.copy-row input{flex:1; min-width:0;}
.politica-texto p{font-size:13.5px; color:var(--ink-soft); margin:0 0 12px; line-height:1.6;}
/* consentimento LGPD no cadastro público */
.pub-consent{display:flex; gap:10px; align-items:flex-start; margin-top:18px; padding:14px; border:1px solid var(--border); border-radius:var(--radius-m); background:var(--surface); font-size:13px; color:var(--ink-soft); line-height:1.5;}
.pub-consent input{margin-top:3px; width:16px; height:16px; flex:none; accent-color:var(--accent);}
.pub-consent.is-invalid{border-color:var(--st-adjust);}

/* ============ CELULAR (até 640px) ============ */
.two-col > *, .dash-left, .dash-stats-row > *{min-width:0;}
@media (max-width:920px){
  .two-col-wide{grid-template-columns:1fr;}
}
@media (max-width:640px){
  /* topo: logo + ações na 1ª linha; menu ocupa a 2ª linha inteira e rola para o lado */
  .topnav{flex-wrap:wrap; padding:14px 16px 6px; gap:10px;}
  .topnav > .topnav-links{order:3; width:100%; margin:0; justify-content:flex-start; border-radius:14px;}
  .topnav-brand{padding:9px 14px;}
  .topnav-brand .brand-logo{height:15px;}
  .top-actions{margin-left:auto; padding:5px 6px; gap:6px;}
  .top-actions .who{padding-left:6px;}
  .top-actions .who > div:not(.avatar){display:none;}
  .rail-link{padding:8px 12px;}
  .canvas{padding:16px; gap:18px;}
  .page-head h1{font-size:20px;}
  .page-head .btn-row{width:100%;}
  .dash-stats-row{flex-direction:column;}
  .panel-head{padding:14px 16px; flex-wrap:wrap;}
  .panel-body{padding:16px;}
  .filter-row{width:100%;}
  .filter-row > *{flex:1 1 100%; min-width:0;}
  .search-input{width:100% !important;}
  .note-action{flex-wrap:wrap;}

  /* tabelas viram cartões: cada linha é um bloco com rótulo e valor */
  .table-wrap table{min-width:0;}
  .table-wrap thead{display:none;}
  .table-wrap tr{display:block; padding:12px 16px; border-bottom:1px solid var(--border);}
  .table-wrap tr:last-child{border-bottom:none;}
  .table-wrap td{display:flex; justify-content:space-between; align-items:center; gap:12px; padding:5px 0; border:none; text-align:right; min-height:0;}
  .table-wrap td::before{content:attr(data-label); font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); font-weight:700; text-align:left; flex:none;}
  .table-wrap td[data-label=""]::before, .table-wrap td:not([data-label])::before{display:none;}
  .table-wrap td:first-child{justify-content:flex-start; text-align:left; padding-bottom:8px;}
  .table-wrap td:first-child::before{display:none;}
  .table-wrap td .row-actions, .table-wrap td > .btn{margin-left:auto;}
  .table-wrap td[colspan]{justify-content:flex-start; text-align:left;}

  /* modais ocupam quase a tela toda */
  .modal-overlay{padding:10px; align-items:flex-end;}
  .modal-card{max-height:92vh; border-radius:18px;}
  .modal-head,.modal-body,.modal-foot{padding-left:16px; padding-right:16px;}
  .modal-foot{flex-wrap:wrap;}
  .modal-foot .form-alert-inline{flex:1 1 100%; text-align:left;}

  /* cadastro (admin/empresa) */
  .stepper.is-compact .step.is-active .label{max-width:150px; overflow:hidden; text-overflow:ellipsis;}
  .wizard-foot{flex-wrap:wrap; gap:10px;}
  .wizard-foot .form-alert-inline{order:3; flex:1 1 100%;}

  /* cadastro público */
  .pub-topbar{padding:16px 16px 0; gap:10px; flex-wrap:wrap;}
  .pub-stage{padding:22px 16px;}
  .pub-footer{padding:0 16px 18px;}
  .pub-demo-tag span{display:none;}

  /* integrações */
  .integ-map-row{grid-template-columns:minmax(0,1fr) auto; }
  .integ-map-row .icon{display:none;}
  .copy-row{flex-direction:column;}
  .login-card{padding:28px 22px;}
}
.hintline{font-size:11.5px; color:var(--muted);}
@media (max-width:640px){
  /* stepper do cadastro: só as bolinhas; o nome da etapa já aparece no título do formulário */
  .stepper.is-compact .step .label{display:none;}
  .stepper.is-compact .step .bullet{width:26px; height:26px; font-size:11px;}
  .stepper.is-compact .step-line{margin:0 3px; min-width:4px;}
}

/* ============ DATA ESPECIAL, PENDÊNCIAS ANTIGAS, ATUALIZAÇÃO DE DADOS ============ */
.badge-especial{display:inline-flex; align-items:center; gap:4px; margin-left:6px; font-size:10.5px; font-weight:800; padding:3px 8px; border-radius:999px; background:#FFF4CC; color:#8A6400; white-space:nowrap;}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .badge-especial{background:#3A2E0A; color:#F5C84A;} }
:root[data-theme="dark"] .badge-especial{background:#3A2E0A; color:#F5C84A;}
.espera{font-size:12.5px; font-weight:600; color:var(--ink-soft);}
.espera.atrasada{color:var(--st-adjust);}
.pub-intro{margin:0 0 20px;}
