:root {
  --ink: #10201c;
  --ink-2: #182b25;
  --ink-3: #263b34;
  --paper: #f4f5f0;
  --surface: #ffffff;
  --soft: #e9ede8;
  --line: #dbe1dc;
  --muted: #738079;
  --green: #91df64;
  --green-dark: #4f9d31;
  --green-soft: #e8f7df;
  --danger: #a64343;
  --danger-soft: #fbebeb;
  --shadow: 0 20px 55px rgba(16, 32, 28, .08);
  --radius: 18px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Aptos", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; border: 1px solid rgba(16,32,28,.18); display: grid; place-items: center; font-family: Georgia, serif; font-size: 15px; letter-spacing: -3px; transform: rotate(45deg); }
.brand-mark > * { transform: rotate(-45deg); }
.brand-mark span { color: var(--green-dark); }
.brand-name { font-size: 16px; letter-spacing: -.5px; white-space: nowrap; }
.brand-name strong { color: var(--green-dark); font-weight: 750; }
.brand-light { color: #fff; }
.brand-light .brand-mark { border-color: rgba(255,255,255,.23); }
.brand-light .brand-name strong, .brand-light .brand-mark span { color: var(--green); }

.eyebrow, .topbar-kicker, .nav-label { display: block; color: var(--green-dark); font-size: 10px; font-weight: 750; letter-spacing: 1.7px; text-transform: uppercase; }
.button { min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: 13px; transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .65; cursor: wait; transform: none; }
.button-primary { color: #12201b; background: var(--green); box-shadow: 0 10px 24px rgba(145,223,100,.18); }
.button-primary:hover { background: #a4eb7d; }
.button-secondary { color: white; background: var(--ink); }
.button-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.button-light { background: white; color: var(--ink); }
.button-confirmation { color: #12201b; background: var(--green); box-shadow: 0 10px 24px rgba(145,223,100,.18); }
.button-confirmation:hover { background: #a4eb7d; }
.button-outline-light { color: white; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); }
.button-danger-light { color: #ffd6d6; border-color: rgba(255,171,171,.32); background: rgba(166,67,67,.12); }
.button-danger-light:hover { color: white; border-color: rgba(255,171,171,.55); background: rgba(166,67,67,.28); }
.button-block { width: 100%; }
.button-compact { min-height: 41px; padding: 0 17px; }
.button-small { min-height: 40px; padding-inline: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 14px; color: var(--green); font-size: 13px; font-weight: 700; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }
.text-link.dark { color: var(--ink); }

.alert { margin-bottom: 22px; padding: 13px 16px; border: 1px solid; border-radius: 6px; font-size: 13px; transition: opacity .4s ease, transform .4s ease; }
.alert-error { color: var(--danger); background: var(--danger-soft); border-color: #f0cece; }
.alert-success { color: #326c20; background: var(--green-soft); border-color: #cbe9bd; }
.alert.fade-out { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.muted { color: var(--muted); }

/* Authentication */
.auth-body { min-height: 100vh; background: #e8ece7; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.08fr) minmax(420px, .92fr); }
.auth-story { min-height: 100vh; padding: 46px 7vw 45px; color: white; background:
  radial-gradient(circle at 76% 23%, rgba(145,223,100,.15), transparent 23%),
  linear-gradient(145deg, rgba(255,255,255,.055), transparent 38%),
  var(--ink); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-story::before { content: ""; position: absolute; width: 480px; height: 480px; right: -210px; top: 15%; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 65px rgba(255,255,255,.025), 0 0 0 130px rgba(255,255,255,.018); }
.auth-story::after { content: ""; position: absolute; width: 64%; height: 1px; bottom: 112px; right: -7%; background: linear-gradient(90deg, transparent, rgba(145,223,100,.55), transparent); transform: rotate(-22deg); box-shadow: 0 18px 55px rgba(145,223,100,.45); }
.story-content { position: relative; z-index: 1; max-width: 610px; }
.story-content .eyebrow { color: var(--green); margin-bottom: 22px; }
.story-content h1 { margin: 0 0 24px; font-family: Georgia, serif; font-size: clamp(48px, 5.3vw, 79px); font-weight: 400; line-height: .99; letter-spacing: -3.5px; }
.story-content h1 em { color: var(--green); font-weight: 400; }
.story-content p { max-width: 480px; margin: 0; color: #b7c5bf; font-size: 17px; line-height: 1.7; }
.story-foot { position: relative; z-index: 1; display: flex; gap: 34px; color: #7f9189; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.story-foot span + span::before { content: "•"; margin-right: 34px; color: var(--green); }
.auth-panel { padding: 70px clamp(48px, 8vw, 135px); display: flex; flex-direction: column; justify-content: center; background: rgba(248,249,245,.92); position: relative; }
.auth-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.88), transparent 35%); }
.auth-panel > * { position: relative; z-index: 1; }
.auth-panel .brand { margin-bottom: 70px; }
.auth-copy { margin-bottom: 33px; }
.auth-copy .eyebrow { margin-bottom: 14px; }
.auth-copy h2, .auth-copy h1 { margin: 0 0 11px; color: var(--ink); font-family: Georgia, serif; font-size: 36px; font-weight: 400; letter-spacing: -1px; }
.auth-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.form-stack { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: #43534c; font-size: 11px; font-weight: 750; letter-spacing: .7px; text-transform: uppercase; }
.field input, .field textarea, .field select, .search-box input, .select-box select { width: 100%; border: 1px solid var(--line); border-radius: 4px; outline: none; color: var(--ink); background: rgba(255,255,255,.82); transition: border-color .2s, box-shadow .2s, background .2s; }
.field input, .field select { height: 49px; padding: 0 14px; }
.field textarea { padding: 13px 14px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus, .search-box input:focus, .select-box select:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(145,223,100,.13); background: white; }
.field input::placeholder, .field textarea::placeholder { color: #a1aaa5; }
.field small { color: var(--muted); font-size: 11px; }
.secure-note { margin: 23px 0 0; text-align: center; color: #8c9792; font-size: 11px; }
.install-panel { max-width: 660px; min-height: 100vh; margin: auto; }

/* App shell */
.admin-body { min-height: 100vh; background: var(--paper); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar); padding: 31px 22px 22px; color: #dfe7e2; background: var(--ink); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-reflection { position: absolute; width: 280px; height: 530px; top: -210px; right: -165px; border-radius: 50%; border: 1px solid rgba(255,255,255,.055); box-shadow: 0 0 0 46px rgba(255,255,255,.015), 0 0 0 92px rgba(145,223,100,.012); pointer-events: none; }
.sidebar-reflection::after { content: ""; position: absolute; width: 200px; height: 1px; background: rgba(145,223,100,.26); transform: rotate(38deg); bottom: 72px; left: -30px; box-shadow: 0 8px 30px rgba(145,223,100,.4); }
.sidebar-brand { position: relative; z-index: 1; padding-left: 7px; margin-bottom: 62px; }
.main-nav { display: flex; flex-direction: column; gap: 5px; position: relative; z-index: 1; }
.nav-label { color: #5f736a; margin: 18px 12px 8px; font-size: 8px; }
.nav-item { min-height: 45px; padding: 0 13px; display: flex; align-items: center; gap: 13px; border-radius: 5px; color: #90a39a; font-size: 13px; font-weight: 600; transition: .2s ease; position: relative; }
.nav-item:hover { color: white; background: rgba(255,255,255,.045); }
.nav-item.active { color: white; background: rgba(145,223,100,.09); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 2px; background: var(--green); box-shadow: 0 0 14px rgba(145,223,100,.65); }
.nav-icon { width: 22px; text-align: center; color: var(--green); font-size: 17px; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.admin-mini { display: flex; align-items: center; min-width: 0; gap: 10px; }
.admin-mini > span:last-child { min-width: 0; display: grid; }
.admin-mini strong { color: #eef4ef; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.admin-mini small { color: #64786f; font-size: 9px; margin-top: 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--green); font-size: 11px; font-weight: 800; }
.logout-button { width: 30px; height: 30px; border: 0; color: #7c9187; background: transparent; font-size: 18px; }
.logout-button:hover { color: white; }
.main-content { min-height: 100vh; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.topbar { min-height: 96px; padding: 21px clamp(28px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(244,245,240,.9); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30; }
.topbar-kicker { font-size: 8px; color: #96a19c; margin-bottom: 5px; }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 400; letter-spacing: -.5px; }
.topbar-actions { display: flex; align-items: center; gap: 23px; }
.today { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.content-wrap { width: 100%; max-width: 1530px; margin: 0 auto; padding: 38px clamp(28px, 4vw, 56px) 54px; flex: 1; }
.app-footer { padding: 20px clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #939d98; font-size: 9px; letter-spacing: .5px; }

/* Dashboard */
.mirror-card { position: relative; overflow: hidden; color: white; background:
  linear-gradient(105deg, rgba(255,255,255,.07), transparent 34%),
  radial-gradient(circle at 88% 20%, rgba(145,223,100,.11), transparent 27%),
  var(--ink); box-shadow: var(--shadow); }
.mirror-card::after { content: ""; position: absolute; height: 1px; width: 68%; right: -12%; bottom: 25%; transform: rotate(-18deg); background: linear-gradient(90deg, transparent, rgba(145,223,100,.5), transparent); box-shadow: 0 10px 28px rgba(145,223,100,.35); }
.welcome-card { min-height: 312px; padding: 49px 53px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; }
.welcome-copy { max-width: 660px; position: relative; z-index: 2; }
.welcome-copy .eyebrow, .detail-hero .eyebrow { color: var(--green); margin-bottom: 16px; }
.welcome-copy h2 { margin: 0 0 16px; font-family: Georgia, serif; font-size: clamp(35px, 3.5vw, 52px); font-weight: 400; line-height: 1.08; letter-spacing: -1.5px; }
.welcome-copy h2 em { color: var(--green); font-weight: 400; }
.welcome-copy p { max-width: 565px; color: #aebcb6; font-size: 14px; line-height: 1.65; margin: 0 0 24px; }
.welcome-orbit { width: 205px; height: 205px; margin-right: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; }
.welcome-orbit strong { font-family: Georgia, serif; font-size: 38px; font-weight: 400; color: rgba(255,255,255,.88); }
.welcome-orbit .orbit-one, .welcome-orbit .orbit-two { position: absolute; border-radius: 50%; border: 1px solid rgba(145,223,100,.25); }
.welcome-orbit .orbit-one { inset: 25px -8px; transform: rotate(48deg); }
.welcome-orbit .orbit-two { inset: -10px 30px; transform: rotate(-52deg); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 18px 0 29px; }
.stat-card { min-height: 152px; padding: 24px 26px; border: 1px solid var(--line); background: rgba(255,255,255,.8); display: grid; grid-template-columns: 1fr auto; align-items: start; position: relative; overflow: hidden; }
.stat-icon { grid-column: 2; color: var(--green-dark); font-size: 20px; }
.stat-label { grid-row: 1; align-self: center; color: #78857e; font-size: 9px; font-weight: 750; letter-spacing: 1.3px; }
.stat-card strong { grid-column: 1; font-family: Georgia, serif; font-size: 41px; font-weight: 400; line-height: 1; margin-top: 12px; }
.stat-card small { grid-column: 2; align-self: end; color: #8e9893; font-size: 9px; }
.accent-stat { background: var(--green-soft); border-color: #cde9bf; }
.accent-stat::after { content: ""; position: absolute; width: 140px; height: 140px; border: 1px solid rgba(79,157,49,.11); border-radius: 50%; right: -65px; bottom: -80px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.88); box-shadow: 0 12px 40px rgba(16,32,28,.025); }
.panel-heading { padding: 25px 27px 21px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { font-size: 8px; margin-bottom: 7px; }
.panel-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 12px 20px; color: #89948e; background: #fafbf8; font-size: 8px; font-weight: 750; letter-spacing: 1.1px; text-align: left; text-transform: uppercase; }
.data-table td { padding: 17px 20px; border-top: 1px solid #e8ece8; color: #4c5c54; font-size: 12px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #fafcf8; }
.data-table.roomy td { padding-block: 21px; }
.client-cell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.client-cell > span:last-child { display: grid; gap: 3px; }
.client-cell strong, .cell-primary { color: var(--ink); font-size: 12px; }
.client-cell small, .cell-secondary { display: block; color: #87928c; font-size: 10px; }
.client-monogram { width: 37px; height: 37px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: #355d25; background: var(--green-soft); border: 1px solid #d4ebc9; font-family: Georgia, serif; font-size: 14px; }
.client-monogram.large { width: 48px; height: 48px; font-size: 18px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-finalizada { color: #3f8128; background: var(--green-soft); }
.status-rascunho { color: #8b7541; background: #f8f1dc; }
.status-enviada { color: #326f82; background: #e4f3f7; }
.file-ready { color: #4f8e36; font-size: 10px; font-weight: 700; }
.row-action { width: 29px; height: 29px; border: 1px solid var(--line); display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: .2s ease; }
.row-action:hover { color: white; background: var(--ink); border-color: var(--ink); }
.pdf-link { color: var(--green-dark); font-size: 10px; font-weight: 800; }
.empty-state { padding: 65px 28px; display: flex; align-items: center; flex-direction: column; text-align: center; }
.empty-state > span { width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--green-dark); background: var(--green-soft); font-size: 22px; }
.empty-state h3, .empty-state h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.empty-state p { max-width: 450px; margin: 0 0 23px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-state.standalone { min-height: 470px; background: white; border: 1px solid var(--line); }

/* Listing and clients */
.section-intro { margin: 4px 0 28px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-intro .eyebrow { margin-bottom: 9px; }
.section-intro h2 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 32px; font-weight: 400; letter-spacing: -.7px; }
.section-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { min-height: 76px; padding: 16px 21px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.search-form { width: min(400px, 100%); }
.search-form label, .search-box { height: 41px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: white; display: flex; align-items: center; gap: 10px; }
.search-form input, .search-box input { height: 39px; border: 0; background: transparent; box-shadow: none !important; }
.search-form label:focus-within, .search-box:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(145,223,100,.11); }
.result-count { color: #89938e; font-size: 10px; white-space: nowrap; }
.client-grid { padding: 21px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.client-card { min-height: 229px; padding: 21px; border: 1px solid var(--line); background: linear-gradient(140deg, white, #fbfcfa); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d2cc; }
.client-card-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 21px; }
.icon-link { color: #718078; font-size: 18px; }
.client-segment { color: var(--green-dark); font-size: 8px; font-weight: 750; letter-spacing: 1.1px; text-transform: uppercase; }
.client-card h3 { margin: 6px 0; font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.client-card p { height: 28px; margin: 0; color: var(--muted); font-size: 10px; overflow: hidden; }
.client-card-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #87928c; font-size: 9px; }
.client-card-foot strong { color: var(--ink); }
.client-card-foot a { color: var(--green-dark); font-weight: 700; }
.filter-form { display: flex; align-items: center; gap: 10px; flex: 1; }
.search-box { width: min(330px, 100%); }
.select-box select { height: 41px; min-width: 190px; padding: 0 34px 0 12px; }

/* Forms */
.form-layout, .form-section { display: grid; grid-template-columns: minmax(210px, .34fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 78px); align-items: start; }
.form-section { padding: 7px 0 42px; margin-bottom: 35px; border-bottom: 1px solid var(--line); }
.form-aside { position: sticky; top: 128px; }
.step-number { display: block; margin-bottom: 18px; color: #b6beb9; font-family: Georgia, serif; font-size: 25px; }
.form-aside .eyebrow { margin-bottom: 9px; }
.form-aside h2 { margin: 0 0 11px; font-family: Georgia, serif; font-size: 29px; font-weight: 400; line-height: 1.18; }
.form-aside p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.form-panel { padding: 27px; }
.form-grid { display: grid; gap: 20px; }
.form-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-wide { grid-column: span 2; }
.field-full { grid-column: 1 / -1; }
.form-actions { margin-top: 28px; padding-top: 21px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 11px; }
.repeater-head, .repeater-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(130px, .32fr) 82px 27px; gap: 11px; align-items: center; }
.repeater-head { padding: 0 8px 9px; color: #89948e; font-size: 8px; font-weight: 750; letter-spacing: 1px; text-transform: uppercase; }
.repeater-row { padding: 12px 8px; border-top: 1px solid var(--line); }
.repeater-row input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: white; outline: none; }
.repeater-row input:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(145,223,100,.12); }
.duration-input { position: relative; display: block; }
.duration-input input { padding-right: 32px; }
.duration-input span { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #8a958f; font-size: 9px; pointer-events: none; }
.stacked-inputs { display: grid; gap: 7px; }
.stacked-inputs input:first-child { font-weight: 650; }
.stacked-inputs input:last-child { height: 35px; color: var(--muted); font-size: 11px; background: #fafbf9; }
.row-number { color: var(--green-dark); font-family: Georgia, serif; font-size: 13px; }
.remove-row { width: 27px; height: 27px; border: 0; border-radius: 50%; color: #98a29d; background: transparent; font-size: 20px; line-height: 1; }
.remove-row:hover { color: var(--danger); background: var(--danger-soft); }
.add-row { margin-top: 13px; padding: 8px 7px; border: 0; color: var(--green-dark); background: transparent; font-size: 11px; font-weight: 750; }
.steps-repeater { margin-top: 29px; padding-top: 25px; border-top: 1px solid var(--line); }
.mini-heading { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.mini-heading span { color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.mini-heading small { padding: 3px 7px; border-radius: 20px; color: var(--muted); background: var(--soft); font-size: 8px; }
.steps-head, .steps-row { grid-template-columns: 34px minmax(0, 1fr) minmax(120px, .33fr) 125px 27px; }
.private-field { margin-top: 27px; padding-top: 24px; border-top: 1px solid var(--line); }
.private-field > span em { margin-left: 8px; color: #a36f39; font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }
.sticky-submit { position: sticky; z-index: 20; bottom: 18px; margin-left: calc(34% + 52px); padding: 15px 17px 15px 20px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; color: white; background: rgba(16,32,28,.96); backdrop-filter: blur(14px); box-shadow: 0 19px 45px rgba(16,32,28,.2); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sticky-submit > span { display: grid; gap: 3px; }
.sticky-submit strong { font-family: Georgia, serif; font-size: 15px; font-weight: 400; }
.sticky-submit small { color: #8da097; font-size: 9px; }
.sticky-submit > div { display: flex; gap: 9px; }
.sticky-submit .button-ghost { color: #bdc8c2; border-color: rgba(255,255,255,.18); }

/* Pauta detail */
.detail-hero { min-height: 215px; margin-bottom: 22px; padding: 37px 41px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.detail-hero > div { position: relative; z-index: 2; }
.detail-hero h2 { max-width: 760px; margin: 0 0 9px; font-family: Georgia, serif; font-size: clamp(31px, 3.2vw, 46px); font-weight: 400; letter-spacing: -1px; }
.detail-hero p { margin: 0; color: #aabbb3; font-size: 13px; }
.detail-actions { max-width: 560px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 19px; align-items: start; }
.detail-main { padding: 31px 34px; }
.detail-section { padding: 7px 0 31px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; margin-bottom: 0; }
.detail-section .eyebrow, .detail-side .eyebrow { margin-bottom: 8px; font-size: 8px; }
.detail-section h3, .folder-card h3 { margin: 0 0 14px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.detail-section p { color: #526159; font-size: 13px; line-height: 1.7; }
.detail-section .detail-lead { color: var(--ink); font-family: Georgia, serif; font-size: 18px; line-height: 1.65; }
.detail-section blockquote { margin: 18px 0 0; padding: 17px 19px; border-left: 3px solid var(--green); color: #4f5e56; background: #f3f6f1; font-size: 12px; line-height: 1.7; }
.agenda-preview { margin: 0; padding: 0; list-style: none; counter-reset: agenda; }
.agenda-preview li { min-height: 66px; padding: 13px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; counter-increment: agenda; }
.agenda-preview li::before { content: counter(agenda, decimal-leading-zero); color: var(--green-dark); font-family: Georgia, serif; font-size: 12px; }
.agenda-preview li > span { display: grid; gap: 4px; }
.agenda-preview strong { font-size: 12px; }
.agenda-preview small { color: var(--muted); font-size: 10px; }
.agenda-preview em { color: #89948e; font-size: 9px; font-style: normal; }
.next-steps-preview { display: grid; gap: 9px; }
.next-steps-preview > div { padding: 13px 15px; border: 1px solid var(--line); display: grid; grid-template-columns: 27px 1fr; gap: 3px 10px; }
.next-steps-preview > div > span { grid-row: span 2; color: var(--green-dark); }
.next-steps-preview strong { font-size: 11px; }
.next-steps-preview small { color: var(--muted); font-size: 9px; }
.detail-side { display: grid; gap: 15px; }
.info-card, .folder-card, .private-card { padding: 23px; }
.info-card dl { margin: 17px 0 0; }
.info-card dl div { padding: 12px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.info-card dt { color: var(--muted); font-size: 10px; }
.info-card dd { margin: 0; color: var(--ink); font-size: 11px; font-weight: 700; }
.folder-card code { display: block; padding: 13px; color: #496158; background: #f1f4f0; font-family: Consolas, monospace; font-size: 9px; line-height: 1.5; word-break: break-word; }
.folder-card p, .private-card p { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.document-links { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.pdf-link.secondary { color: #5f7469; }
.pdf-link.confirmation-link { color: #326c20; font-weight: 900; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-actions form, .detail-actions form { margin: 0; }
.row-delete { width: 29px; height: 29px; padding: 0; border: 1px solid #efd1d1; border-radius: 50%; color: var(--danger); background: var(--danger-soft); font-size: 18px; line-height: 1; }
.row-delete:hover { color: white; border-color: var(--danger); background: var(--danger); }
.private-card { border-color: #eadcc8; background: #fffcf6; }

@media (max-width: 1100px) {
  :root { --sidebar: 222px; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-orbit { margin-right: 0; transform: scale(.78); }
  .form-layout, .form-section { grid-template-columns: 220px minmax(0, 1fr); gap: 30px; }
  .sticky-submit { margin-left: 250px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 275px; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 60px max(26px, 10vw); }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 30px 0 60px rgba(16,32,28,.25); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu { display: block; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 125px; }
  .client-grid { grid-template-columns: 1fr; }
  .form-layout, .form-section { grid-template-columns: 1fr; gap: 22px; }
  .form-aside { position: static; }
  .form-aside p { max-width: 600px; }
  .sticky-submit { margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .private-card { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .topbar { min-height: 80px; padding: 16px 18px; }
  .topbar .today { display: none; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions .button { width: 42px; padding: 0; font-size: 0; }
  .topbar-actions .button span { font-size: 18px; }
  .content-wrap { padding: 25px 16px 40px; }
  .app-footer { padding: 17px; }
  .app-footer span:last-child { display: none; }
  .welcome-card { min-height: 350px; padding: 34px 25px; align-items: flex-start; }
  .welcome-copy h2 { font-size: 36px; }
  .welcome-orbit { position: absolute; right: -65px; bottom: -62px; opacity: .45; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .section-intro .button { width: 100%; }
  .toolbar, .filter-form { align-items: stretch; flex-direction: column; }
  .toolbar .result-count { display: none; }
  .search-box, .select-box select { width: 100%; min-width: 0; }
  .client-grid { padding: 13px; }
  .form-panel { padding: 20px 16px; }
  .form-grid.two-cols, .form-grid.three-cols { grid-template-columns: 1fr; }
  .field-wide, .field-full { grid-column: auto; }
  .repeater-head { display: none; }
  .repeater-row, .steps-row { position: relative; padding: 18px 4px; grid-template-columns: 26px 1fr; }
  .repeater-row > *:not(.row-number):not(.remove-row) { grid-column: 2; }
  .repeater-row .remove-row { position: absolute; top: 7px; right: 0; }
  .sticky-submit { bottom: 8px; align-items: stretch; flex-direction: column; }
  .sticky-submit > span { display: none; }
  .sticky-submit > div { width: 100%; }
  .sticky-submit .button { flex: 1; }
  .detail-hero { padding: 31px 24px; align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; flex-direction: column; }
  .detail-side { grid-template-columns: 1fr; }
  .detail-main { padding: 24px 20px; }
  .agenda-preview li { grid-template-columns: 30px 1fr; }
  .agenda-preview em { grid-column: 2; }
}
