/* ==========================================================================
   Kapta · MINDBODY, sistema visual
   ========================================================================== */

:root {
    --bg:            #f4f0e9;
    --bg-soft:       #f8f5ef;
    --surface:       #ffffff;
    --tile:          #fbfaf7;
    --ink:           #1b1a17;
    --ink-soft:      #4a463e;
    --muted:         #8b8578;
    --muted-2:       #a8a294;
    --line:          #e9e4da;
    --line-soft:     #f0ece4;
    --black:         #111111;

    --green-bg:      #e7f3e9;
    --green-ink:     #2e6b41;
    --green-line:    #cfe6d5;
    --green-dot:     #3fa45b;

    --amber-bg:      #f5eede;
    --amber-ink:     #7a6533;
    --amber-line:    #eadfc6;

    --red-bg:        #fbedea;
    --red-ink:       #a03a2b;
    --red-line:      #f3d8d2;

    --slate-bg:      #eeeeea;
    --slate-ink:     #6b675e;
    --slate-line:    #e2ded4;

    --radius-lg:     24px;
    --radius:        20px;
    --radius-sm:     14px;
    --pill:          999px;

    --shadow-sm:     0 1px 2px rgba(28, 24, 14, .04);
    --shadow:        0 1px 2px rgba(28, 24, 14, .03), 0 14px 34px -18px rgba(40, 33, 18, .18);
    --shadow-lg:     0 2px 4px rgba(28, 24, 14, .04), 0 30px 60px -28px rgba(40, 33, 18, .28);

    --wrap:          1072px;
    --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --display:       'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
    --mono:          ui-monospace, SFMono-Regular, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
}

/* ------------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
}

h1, h2, h3, h4, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: #e5dfd0; }

/* ---------------------------------------------------------------- estrutura */

.shell { display: flex; flex-direction: column; min-height: 100vh; }
.wrap  { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.main  { flex: 1 0 auto; padding: 66px 0 90px; }

/* ------------------------------------------------------------------ topbar */

.topbar { padding: 26px 0 0; }

.topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 15px;
    letter-spacing: -.01em;
    color: var(--ink);
    white-space: nowrap;
}
.brand b { font-weight: 500; }
.brand span { color: var(--muted-2); margin: 0 .35em; }
.brand i { font-style: normal; font-weight: 300; color: var(--ink-soft); }

.topbar__tools { display: flex; align-items: center; gap: 10px; }

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--pill);
    background: var(--green-bg);
    color: var(--green-ink);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.status-chip::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green-dot);
}
.status-chip--muted { background: var(--slate-bg); color: var(--slate-ink); }
.status-chip--muted::before { background: var(--muted-2); }

.pill-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 30px 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .04em;
    cursor: pointer;
}
.pill-select select {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
}
.pill-select::after {
    content: '';
    position: absolute;
    right: 13px;
    width: 7px; height: 7px;
    border-right: 1.4px solid var(--muted);
    border-bottom: 1.4px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
}

/* conta */

.account { position: relative; }

.account__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 30px 0 6px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    max-width: 260px;
    position: relative;
}
.account__avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--black);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 500;
    flex: 0 0 auto;
}
.account__name {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account__btn::after {
    content: '';
    position: absolute;
    right: 14px;
    width: 6px; height: 6px;
    border-right: 1.4px solid var(--muted);
    border-bottom: 1.4px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
}

.account__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 40;
}
.account.is-open .account__menu { opacity: 1; visibility: visible; transform: none; }

.account__meta {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 6px;
}
.account__meta strong { display: block; font-size: 13.5px; font-weight: 500; }
.account__meta span { font-size: 12px; color: var(--muted); }

.account__menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--ink-soft);
    transition: background .14s ease;
}
.account__menu a:hover { background: var(--bg-soft); color: var(--ink); }
.account__menu a.is-danger { color: var(--red-ink); }

/* ---------------------------------------------------------------- navegação */

.nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 18px 0 22px;
    flex-wrap: wrap;
}

.nav a {
    padding: 9px 18px;
    border-radius: var(--pill);
    font-size: 14px;
    color: var(--ink-soft);
    transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: rgba(27, 26, 23, .05); color: var(--ink); }
.nav a.is-active { background: var(--black); color: #fff; }

.subnav {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .35);
}
.subnav__inner {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 9px 0;
    flex-wrap: wrap;
}
.subnav a {
    padding: 7px 16px;
    border-radius: var(--pill);
    font-size: 13.5px;
    color: var(--muted);
    transition: background .16s ease, color .16s ease;
}
.subnav a:hover { color: var(--ink); }
.subnav a.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------ cabeçalho de página */

.page-head { margin-bottom: 44px; }

.eyebrow {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}

.display {
    font-family: var(--display);
    font-weight: 200;
    letter-spacing: -.025em;
    line-height: 1.02;
    font-size: clamp(38px, 4.6vw, 56px);
}
.display--sm { font-size: clamp(28px, 3vw, 34px); line-height: 1.1; }
.display--xl { font-size: clamp(44px, 6.4vw, 82px); }
.display .dim { color: var(--muted-2); }

.lead {
    margin-top: 16px;
    max-width: 58ch;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 300;
}

.page-head__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------- filtros */

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.filters a {
    padding: 8px 18px;
    border-radius: var(--pill);
    font-size: 13.5px;
    color: var(--ink-soft);
    border: 1px solid transparent;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.filters a:hover { border-color: var(--line); background: rgba(255,255,255,.6); }
.filters a.is-active { background: var(--black); color: #fff; border-color: var(--black); }
.filters a .n { opacity: .5; margin-left: 6px; font-size: 12px; }

/* --------------------------------------------------------------- cartões */

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 22px; }
.card__body { padding: 30px 32px; }
.card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 0;
    flex-wrap: wrap;
}
.card__title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.card__desc { font-size: 13.5px; color: var(--muted); margin-top: 5px; max-width: 56ch; }
.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px;
    border-top: 1px solid var(--line-soft);
    flex-wrap: wrap;
}

.tile {
    background: var(--tile);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 20px 22px;
}

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

/* ------------------------------------------------------------------- KPI */

.kpi__label {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.kpi__value {
    font-family: var(--display);
    font-weight: 200;
    font-size: 42px;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-top: 12px;
}
.kpi__value small { font-size: 22px; letter-spacing: -.02em; color: var(--muted-2); }
.kpi__delta { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.kpi__delta b { font-weight: 500; }
.kpi__delta .up   { color: var(--green-ink); }
.kpi__delta .down { color: var(--red-ink); }

.segmented {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--pill);
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
}
.segmented a {
    padding: 6px 14px;
    border-radius: var(--pill);
    font-size: 12.5px;
    color: var(--muted);
}
.segmented a.is-active { background: var(--black); color: #fff; }

/* -------------------------------------------------------------- sparkline */

.spark { margin-top: 26px; }
.spark svg { width: 100%; height: 76px; display: block; overflow: visible; }
.spark__axis {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 10px;
}

/* ----------------------------------------------------------------- tabela */

.table-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
table.data th {
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 26px 16px 14px;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}
table.data td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    color: var(--ink-soft);
    vertical-align: middle;
}
table.data tr:last-child td { border-bottom: 0; }
table.data th:first-child, table.data td:first-child { padding-left: 30px; }
table.data th:last-child,  table.data td:last-child  { padding-right: 30px; }
table.data tbody tr { transition: background .14s ease; }
table.data tbody tr:hover { background: #fcfbf8; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .strong { color: var(--ink); font-weight: 500; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: -.01em; }
.cell-sub { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--pill);
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid transparent;
    white-space: nowrap;
}
.chip--green  { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.chip--amber  { background: var(--amber-bg); color: var(--amber-ink); border-color: var(--amber-line); }
.chip--red    { background: var(--red-bg);   color: var(--red-ink);   border-color: var(--red-line); }
.chip--slate  { background: var(--slate-bg); color: var(--slate-ink); border-color: var(--slate-line); }
.chip--plain  { background: var(--tile);     color: var(--ink-soft);  border-color: var(--line); }

.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 30px 22px;
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}
.pager { display: flex; align-items: center; gap: 10px; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions form { display: inline; }

.empty { padding: 74px 30px; text-align: center; }
.empty h3 { font-family: var(--display); font-weight: 200; font-size: 26px; letter-spacing: -.02em; }
.empty p  { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- botões */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 42px;
    padding: 0 20px;
    border-radius: var(--pill);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 450;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .12s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, opacity .16s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-loading { opacity: .55; pointer-events: none; }

.btn--dark { background: var(--black); border-color: var(--black); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-soft); }
.btn--ghost:hover { background: rgba(27,26,23,.05); box-shadow: none; }
.btn--sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn--block { width: 100%; height: 50px; font-size: 14.5px; }
.btn--danger { color: var(--red-ink); }
.btn .arrow { font-size: 15px; line-height: 1; transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ink-soft);
}
.link-arrow:hover { color: var(--ink); }
.link-arrow .arrow { transition: transform .18s ease; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------- avisos */

.notice {
    display: flex;
    gap: 20px;
    padding: 26px 30px;
    border-radius: var(--radius-lg);
    background: #f6ece4;
    margin-bottom: 34px;
}
.notice--ok { background: #eaf2ea; }
.notice__icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    display: grid; place-items: center;
    flex: 0 0 auto;
    color: #8a6f52;
}
.notice--ok .notice__icon { color: var(--green-ink); }
.notice__eyebrow {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #a08464;
    font-weight: 500;
}
.notice--ok .notice__eyebrow { color: #5f8168; }
.notice__title { font-size: 18px; font-weight: 400; margin-top: 6px; letter-spacing: -.01em; }
.notice__desc  { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; max-width: 66ch; }
.notice__actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------- atalhos */

.section-label { margin: 62px 0 14px; }
.shortcut {
    display: block;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 26px 28px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .2s ease;
}
.shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.shortcut__eyebrow {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted-2);
    font-weight: 500;
}
.shortcut h3 { font-size: 19px; font-weight: 400; letter-spacing: -.015em; margin-top: 12px; }
.shortcut p  { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.shortcut .link-arrow { margin-top: 20px; }

/* ------------------------------------------------------------- formulários */

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.label {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 9px;
}
.label .opt { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; }

.input, .select textarea, textarea.input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--tile);
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea.input { height: auto; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.input::placeholder { color: var(--muted-2); }
.input:focus {
    outline: none;
    background: var(--surface);
    border-color: #cfc8b8;
    box-shadow: 0 0 0 4px rgba(27, 26, 23, .05);
}
.input[readonly] { color: var(--muted); }

.select { position: relative; }
.select select {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--tile);
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    appearance: none;
    cursor: pointer;
}
.select select:focus { outline: none; border-color: #cfc8b8; box-shadow: 0 0 0 4px rgba(27,26,23,.05); }
.select::after {
    content: '';
    position: absolute;
    right: 18px; top: 50%;
    width: 7px; height: 7px;
    border-right: 1.4px solid var(--muted);
    border-bottom: 1.4px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.help { font-size: 12px; color: var(--muted-2); margin-top: 8px; line-height: 1.5; }
.help code { font-family: var(--mono); font-size: 11.5px; }

.input-group { position: relative; }
.input-group .input { padding-right: 84px; }
.input-group__action {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: var(--surface);
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
}
.input-group__action:hover { color: var(--ink); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
    width: 42px; height: 24px;
    border-radius: var(--pill);
    background: #e2ded3;
    position: relative;
    transition: background .18s ease;
    flex: 0 0 auto;
}
.switch__track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform .18s ease;
}
.switch input:checked + .switch__track { background: var(--black); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch__text { font-size: 14px; color: var(--ink-soft); }

.form-row { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.form-status { font-size: 12.5px; color: var(--muted); }

/* -------------------------------------------------------------- auth/landing */

.centered {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 60px;
}
.auth-card {
    width: 100%;
    max-width: 396px;
    background: var(--surface);
    border-radius: 26px;
    padding: 40px 38px 36px;
    box-shadow: var(--shadow-lg);
}
.auth-card .display { font-size: 36px; }
.auth-card .lead { font-size: 14px; margin-top: 10px; margin-bottom: 30px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 1px; }

.auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 396px;
    margin: 0 auto 22px;
}
.auth-top .brand { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.auth-top .brand b { font-weight: 500; color: var(--muted); }

.main--hero { padding: 0; }
.hero { padding: 58px 0 62px; }
.hero .lead { font-size: 17px; margin-top: 26px; max-width: 54ch; }
.hero__actions { display: flex; align-items: center; gap: 18px; margin-top: 38px; flex-wrap: wrap; }


/* ------------------------------------------------------------------ flash */

.flash-stack {
    position: fixed;
    top: 22px; left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(560px, calc(100vw - 40px));
}
.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    border-left: 3px solid var(--slate-line);
    animation: flash-in .3s cubic-bezier(.2,.8,.3,1);
}
.flash--success { border-left-color: var(--green-dot); }
.flash--error   { border-left-color: #c0503d; }
.flash--info    { border-left-color: #a8a294; }
.flash button { margin-left: auto; background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 16px; line-height: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- rodapé */

.footer {
    border-top: 1px solid var(--line);
    padding: 26px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer .sep { margin: 0 12px; color: var(--muted-2); }

.bubble {
    position: fixed;
    right: 26px; bottom: 26px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--black);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px -8px rgba(0,0,0,.45);
    transition: transform .18s ease;
    z-index: 50;
}
.bubble:hover { transform: translateY(-2px) scale(1.03); }

/* ------------------------------------------------------------- utilitários */

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.stack-8  > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 26px 0; }

/* ------------------------------------------------------------- responsivo */

@media (max-width: 900px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .main { padding: 40px 0 70px; }
    .wrap { padding: 0 18px; }
    .topbar__row { flex-wrap: wrap; }
    .account__name { max-width: 120px; }
    .grid--2, .grid--3, .grid--4, .form-row { grid-template-columns: minmax(0, 1fr); }
    .card__body { padding: 24px 22px; }
    .card__head { padding: 24px 22px 0; }
    .card__foot { padding: 16px 22px; }
    .page-head { margin-bottom: 32px; }
    .hero { padding: 34px 0 40px; }
    .status-chip { display: none; }
    .bubble { right: 16px; bottom: 16px; }
}

/* botão em forma de item de menu */
.account__menu button.as-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: 0;
    border-radius: 12px;
    background: none;
    font-size: 13.5px;
    color: var(--red-ink);
    cursor: pointer;
    transition: background .14s ease;
}
.account__menu button.as-link:hover { background: var(--bg-soft); }

/* cartão suave com tiles brancos (bloco de ligações do painel) */
.card--soft { background: var(--bg-soft); box-shadow: none; border: 1px solid var(--line-soft); }
.tile--white { background: var(--surface); border-color: transparent; box-shadow: var(--shadow-sm); }
.tile__label {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.tile__value { font-size: 19px; font-weight: 300; margin-top: 10px; letter-spacing: -.01em; }

/* no ecrã inicial o topo acompanha a largura do conteúdo */
.auth-top--wide { max-width: var(--wrap); }

/* linhas compactas: o texto é truncado no servidor, nada quebra */
table.data th, table.data td { white-space: nowrap; }
table.data td .cell-sub { white-space: nowrap; }

/* densidade da tabela */
table.data td { padding: 13px 14px; }
table.data th { padding: 24px 14px 13px; }
table.data td.num .cell-sub { text-align: right; }

/* margens exteriores da tabela um pouco mais curtas */
table.data th:first-child, table.data td:first-child { padding-left: 26px; }
table.data th:last-child,  table.data td:last-child  { padding-right: 26px; }
table.data td .mono, table.data td.mono { font-size: 11.5px; }

/* painel de impostos do InvoiceXpress */
.tax-panel {
    border-top: 1px solid var(--line-soft);
    background: var(--bg-soft);
    padding: 22px 32px 26px;
}
.tax-panel__title { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.tax-panel .card__desc { margin-top: 4px; }
.tax-create {
    display: grid;
    grid-template-columns: 1.5fr .8fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}
.tax-create .label { margin-bottom: 7px; }
.input--sm { height: 42px; font-size: 14px; background: var(--surface); }
.select--sm select { height: 42px; font-size: 14px; background: var(--surface); }
.tax-create .btn { height: 42px; }

@media (max-width: 720px) {
    .tax-panel { padding: 20px 22px 24px; }
    .tax-create { grid-template-columns: minmax(0, 1fr); }
}

/* cartões que encolhem quando a ligação está a funcionar */
.card--fold > summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 32px;
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-lg);
    transition: background .16s ease;
}
.card--fold > summary::-webkit-details-marker { display: none; }
.card--fold > summary:hover { background: #fdfcfa; }
.card--fold[open] > summary { padding-bottom: 16px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card--fold[open] .card__body { padding-top: 6px; }
.card--fold .card__desc { margin-top: 5px; }

.fold-caret {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--muted-2);
    border-bottom: 1.5px solid var(--muted-2);
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin: 6px 4px 0 4px;
    flex: 0 0 auto;
}
.card--fold[open] .fold-caret { transform: rotate(-135deg); margin-top: 9px; }

@media (max-width: 720px) {
    .card--fold > summary { padding: 22px; }
    .card--fold[open] > summary { padding-bottom: 12px; }
}
