:root {
  --navy: #08263e;
  --navy-2: #0f3858;
  --gold: #d9a33c;
  --gold-soft: #f9e9bf;
  --sand: #f6f1e8;
  --white: #ffffff;
  --ink: #18232b;
  --muted: #6e7b83;
  --line: #e8e5df;
  --green: #31866b;
  --green-soft: #e5f4ed;
  --coral: #b95750;
  --coral-soft: #fbe8e6;
  --blue-soft: #e7f0f7;
  --shadow: 0 18px 50px rgba(18, 42, 58, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--sand); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 264px; display: flex; flex-direction: column; background: var(--navy); color: #fff; padding: 30px 18px 20px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 32px; }
.brand-mark { width: 38px; height: 42px; position: relative; border: 3px solid var(--gold); border-radius: 18px 18px 20px 20px; transform: rotate(45deg); }
.brand-mark span { position: absolute; width: 15px; height: 3px; background: var(--gold); transform: rotate(-45deg); right: -8px; bottom: 8px; border-radius: 99px; }
.brand strong { display: block; font: 700 23px "Playfair Display", serif; letter-spacing: .1px; }
.brand small { display: block; margin-top: 2px; color: var(--gold); font-size: 9px; letter-spacing: 2px; }
.main-nav { display: grid; gap: 8px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #c7d6df; display: flex; align-items: center; gap: 14px; border-radius: 11px; padding: 13px 14px; text-align: left; font-size: 14px; transition: .2s; }
.nav-item span { display: inline-grid; width: 19px; place-items: center; color: var(--gold); font-weight: 700; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-bottom { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.profile-mini { display: flex; gap: 10px; align-items: center; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 700; }
.profile-mini strong, .profile-mini small { display: block; font-size: 12px; }
.profile-mini small { color: #aebfca; margin-top: 2px; font-size: 10px; }
.main-content { width: calc(100% - 264px); margin-left: 264px; min-height: 100vh; padding: 36px clamp(20px, 4vw, 62px) 52px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 30px; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; margin: 0 0 6px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font: 700 clamp(25px, 3vw, 35px)/1.05 "Playfair Display", serif; color: var(--navy); }
h2 { font: 700 clamp(27px, 3vw, 38px)/1.1 "Playfair Display", serif; color: var(--navy); margin: 0; }
h3 { color: var(--navy); font-size: 18px; margin-bottom: 0; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.date-badge { color: var(--muted); font-size: 12px; white-space: nowrap; }
.primary-button, .outline-button, .text-button { border-radius: 10px; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { border: 1px solid var(--gold); background: var(--gold); color: var(--navy); padding: 12px 17px; box-shadow: 0 7px 15px rgba(217,163,60,.15); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(217,163,60,.22); }
.outline-button { border: 1px solid #d6d9d8; background: #fff; color: var(--navy); padding: 10px 14px; }
.text-button { color: var(--navy-2); background: transparent; border: 0; padding: 6px 0; }
.menu-button { display: none; background: none; border: 0; font-size: 24px; color: var(--navy); }
.content-section { display: none; animation: fade .25s ease; }
.content-section.active { display: block; }
@keyframes fade { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.hero-strip { min-height: 185px; padding: 30px clamp(24px, 4vw, 48px); display: flex; justify-content: space-between; align-items: center; border-radius: 18px; color: #fff; overflow: hidden; position: relative; background: linear-gradient(118deg, #08263e, #185979); box-shadow: var(--shadow); }
.hero-strip::after { content: ""; position: absolute; right: -100px; top: -170px; width: 380px; height: 380px; border: 55px solid rgba(217,163,60,.24); border-radius: 50%; }
.hero-strip > * { position: relative; z-index: 1; }
.hero-strip h2 { color: #fff; font-size: clamp(28px, 3vw, 42px); margin-bottom: 10px; }
.hero-strip p:not(.eyebrow) { color: #d4e2ea; max-width: 480px; margin-bottom: 0; font-size: 14px; }
.hero-stat { padding: 18px 26px; min-width: 150px; text-align: center; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); }
.hero-stat span { display: block; font: 700 40px/1 "Playfair Display", serif; color: var(--gold); }
.hero-stat small { font-size: 11px; color: #edf5f7; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0; }
.metric-card { min-width: 0; display: flex; gap: 12px; align-items: flex-start; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 18px rgba(17,39,50,.035); }
.metric-icon { flex: 0 0 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; }
.metric-icon.gold { background: var(--gold-soft); color: #876119; }.metric-icon.blue { background: var(--blue-soft); color: var(--navy-2); }.metric-icon.green { background: var(--green-soft); color: var(--green); }.metric-icon.coral { background: var(--coral-soft); color: var(--coral); }
.metric-card p { font-size: 11px; color: var(--muted); margin-bottom: 3px; }.metric-card strong { display: block; color: var(--navy); font-size: 20px; line-height: 1.1; white-space: nowrap; }.metric-card small { display: block; color: #9ca5a8; font-size: 10px; margin-top: 3px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .8fr); gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; box-shadow: 0 5px 18px rgba(17,39,50,.035); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }.panel-head .eyebrow { margin-bottom: 3px; }
.agenda-list { display: grid; gap: 10px; }
.agenda-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0eee9; }.agenda-row:last-child { border-bottom: 0; padding-bottom: 0; }.agenda-date { text-align: center; padding: 7px 5px; background: var(--sand); border-radius: 9px; color: var(--navy); }.agenda-date strong { display: block; font-size: 18px; line-height: 1; }.agenda-date small { font-size: 9px; text-transform: uppercase; color: var(--muted); }.agenda-row h4 { margin: 0 0 3px; color: var(--navy); font-size: 13px; }.agenda-row p { margin: 0; font-size: 11px; color: var(--muted); }.agenda-price { font-size: 12px; font-weight: 700; color: var(--navy); }
.donut-row { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 145px; }.donut { width: 105px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--green) 0deg, var(--green) 0deg, #efece6 0deg); }.donut::after { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%; }.donut span { position: relative; z-index: 1; color: var(--navy); font-size: 17px; font-weight: 700; }.donut-info { display: grid; gap: 11px; }.donut-info p { font-size: 11px; color: var(--muted); margin: 0; }.donut-info strong { display: block; color: var(--navy); font-size: 13px; margin: 2px 0 0 17px; }.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }.dot.paid { background: var(--green); }.dot.pending { background: #dfcba0; }.payment-panel .outline-button { width: 100%; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }.section-heading > div > p:last-child { color: var(--muted); font-size: 13px; margin: 8px 0 0; }.filters { display: flex; gap: 12px; margin-bottom: 16px; }.filters input, .filters select, .form-grid input, .form-grid select, textarea { background: #fff; border: 1px solid #dcdedb; border-radius: 9px; outline: none; padding: 11px 12px; color: var(--ink); }.filters input { flex: 1; }.filters select { min-width: 180px; }.filters input:focus, .filters select:focus, .form-grid input:focus, .form-grid select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,163,60,.12); }.table-panel { padding: 0; overflow: hidden; }.table-wrap { overflow-x: auto; } table { border-collapse: collapse; width: 100%; min-width: 720px; } th { color: #8b9498; font-size: 10px; letter-spacing: .6px; text-transform: uppercase; text-align: left; background: #faf9f6; } th, td { padding: 16px 20px; border-bottom: 1px solid #efede9; } tbody tr:last-child td { border-bottom: 0; } td { color: #33434c; font-size: 13px; } td strong { display: block; color: var(--navy); font-size: 13px; } td small { color: var(--muted); font-size: 11px; }.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 5px 8px; font-size: 10px; font-weight: 700; }.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }.status.confirmada { color: var(--green); background: var(--green-soft); }.status.confirmada::before { background: var(--green); }.status.pendente { color: #9a6d1a; background: #fcf2d9; }.status.pendente::before { background: var(--gold); }.status.cancelada { color: var(--coral); background: var(--coral-soft); }.status.cancelada::before { background: var(--coral); }.delete-button { color: var(--coral); background: transparent; border: 0; font-size: 13px; }.empty-state { padding: 40px; text-align: center; color: var(--muted); }.empty-state strong { display: block; color: var(--navy); margin-bottom: 6px; }
.operation-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.operation-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 5px 18px rgba(17,39,50,.035); }.operation-card > div:first-child { padding: 14px 16px; background: var(--navy); color: #fff; }.operation-card h3 { color: #fff; font-size: 15px; }.operation-card .eyebrow { color: var(--gold); margin-bottom: 3px; }.op-item { padding: 14px 16px; border-bottom: 1px solid #efede9; }.op-item:last-child { border-bottom: 0; }.op-item strong { display: block; color: var(--navy); font-size: 13px; margin-bottom: 4px; }.op-item span { font-size: 11px; color: var(--muted); }.op-empty { padding: 25px 16px; color: var(--muted); font-size: 13px; }
.finance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }.finance-card { border-radius: 15px; padding: 24px; color: #fff; box-shadow: var(--shadow); }.finance-card p { font-size: 12px; opacity: .8; margin-bottom: 7px; }.finance-card strong { display: block; font: 700 31px/1.1 "Playfair Display", serif; margin-bottom: 10px; }.finance-card span { font-size: 11px; opacity: .82; }.received-card { background: linear-gradient(130deg, #1f6c57, #3e9a7d); }.pending-card { background: linear-gradient(130deg, #9d6e17, #d59b2c); }.total-card { background: linear-gradient(130deg, #153e5b, #2a6c93); }
.modal-backdrop { display: none; position: fixed; z-index: 50; inset: 0; padding: 18px; background: rgba(5, 24, 38, .62); align-items: center; justify-content: center; }.modal-backdrop.open { display: flex; }.modal { width: min(680px, 100%); max-height: 92vh; overflow: auto; position: relative; background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 25px 80px rgba(0,0,0,.22); }.modal h2 { margin-bottom: 7px; }.modal-subtitle { color: var(--muted); font-size: 12px; line-height: 1.45; max-width: 540px; }.close-button { position: absolute; right: 17px; top: 13px; background: transparent; border: 0; color: var(--navy); font-size: 30px; }.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0 14px; }label { display: grid; gap: 6px; color: #4b5b64; font-size: 12px; font-weight: 700; }textarea { resize: vertical; min-height: 82px; }.full { width: 100%; margin-top: 17px; }
@media (max-width: 1100px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.operation-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .sidebar { width: 255px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 10px 0 45px rgba(0,0,0,.25); }.sidebar.open { transform: translateX(0); }.main-content { width: 100%; margin-left: 0; padding: 22px 16px 36px; }.menu-button { display: block; }.topbar { align-items: flex-start; margin-bottom: 23px; }.topbar-actions { margin-left: auto; }.date-badge { display: none; }.primary-button { padding: 11px 13px; font-size: 12px; }.hero-strip { align-items: flex-start; min-height: 230px; flex-direction: column; }.hero-stat { align-self: flex-end; }.metrics-grid, .finance-grid { grid-template-columns: 1fr 1fr; gap: 11px; }.metric-card { padding: 14px; }.metric-card strong { font-size: 16px; }.metric-card small { display: none; }.metric-icon { flex-basis: 30px; height: 30px; }.section-heading { align-items: flex-start; flex-direction: column; }.filters { flex-direction: column; }.filters select { min-width: 0; }.operation-board { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.modal { padding: 24px 18px; }.donut-row { justify-content: flex-start; }.finance-card { padding: 18px; }.finance-card strong { font-size: 24px; } }
@media (max-width: 430px) { .topbar-actions .primary-button { font-size: 0; width: 42px; height: 42px; padding: 0; }.topbar-actions .primary-button::before { content: "+"; font-size: 22px; }.metrics-grid { grid-template-columns: 1fr; }.hero-strip h2 { font-size: 29px; }.hero-stat { align-self: flex-start; }.finance-grid { grid-template-columns: 1fr; } }

/* Controle de sinal e saldo */
.balance-preview { min-height: 67px; display: grid; align-content: center; gap: 3px; padding: 10px 12px; border: 1px dashed #d4a13a; border-radius: 9px; background: #fffaf0; }
.balance-preview span { color: #4b5b64; font-size: 12px; font-weight: 700; }
.balance-preview strong { color: var(--navy); font-size: 18px; line-height: 1.1; }
.balance-preview small { color: #8a6d2f; font-size: 10px; font-weight: 500; }
.balance-value { color: #9a6d1a; }
.status.pago { color: var(--green); background: var(--green-soft); }.status.pago::before { background: var(--green); }
.status.parcial { color: #9a6d1a; background: #fcf2d9; }.status.parcial::before { background: var(--gold); }
.status.sem-pagamento { color: var(--coral); background: var(--coral-soft); }.status.sem-pagamento::before { background: var(--coral); }
.status.sem-valor { color: #66747b; background: #edf1f2; }.status.sem-valor::before { background: #8d9ba0; }
.row-actions { white-space: nowrap; }
.edit-button { color: var(--navy-2); background: transparent; border: 0; font-size: 13px; margin-right: 8px; }
.edit-button:hover, .delete-button:hover { text-decoration: underline; }

/* Prestação de contas entre empresas parceiras */
.statement-note { margin: -4px 0 18px; padding: 14px 16px; border: 1px solid #ead9b5; border-left: 4px solid var(--gold); border-radius: 11px; background: #fffaf1; color: #5c6263; font-size: 12px; line-height: 1.55; }
.statement-note strong { color: var(--navy); }
.statement-filters { align-items: center; }
.statement-filters select { background: #fff; }
.partner-finance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.partner-card { min-height: 143px; padding: 22px; border-radius: 15px; color: #fff; box-shadow: var(--shadow); }
.partner-card p { margin-bottom: 8px; font-size: 12px; opacity: .86; }
.partner-card strong { display: block; margin-bottom: 9px; font: 700 28px/1.05 "Playfair Display", serif; }
.partner-card span { display: block; font-size: 11px; line-height: 1.35; opacity: .85; }
.receivable-card { background: linear-gradient(130deg, #0e4b70, #287d9a); }
.payable-card { background: linear-gradient(130deg, #795224, #b47b31); }
.fiado-card { background: linear-gradient(130deg, #91514d, #c67565); }
.settled-card { background: linear-gradient(130deg, #245b48, #3f9c79); }
.statement-head { padding: 21px 22px 0; margin-bottom: 17px; }
.statement-badge { display: inline-flex; align-items: center; padding: 6px 9px; border: 1px solid #e8d5a7; border-radius: 99px; color: #806021; background: #fff8e8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.a-receber { color: #17647c; background: #e4f3f7; }
.status.a-receber::before { background: #237e9c; }
.status.a-pagar { color: #8c611a; background: #fff0d7; }
.status.a-pagar::before { background: #c18a2c; }
.partner-fields { margin: 4px 0 17px; padding: 0 16px 3px; border: 1px solid #dfe6e8; border-radius: 11px; background: #f9fbfb; transition: opacity .2s; }
.partner-fields.is-disabled { opacity: .62; background: #f5f5f2; }
.partner-fields legend { padding: 0 7px; color: var(--navy); font-size: 12px; font-weight: 700; }
.partner-fields .form-grid { margin: 12px 0 13px; }
.partner-preview { min-height: 66px; display: grid; align-content: center; gap: 3px; padding: 10px 12px; border: 1px dashed #83a2ae; border-radius: 9px; background: #f3fafb; }
.partner-preview span { color: #4b5b64; font-size: 12px; font-weight: 700; }
.partner-preview strong { color: var(--navy); font-size: 17px; line-height: 1.1; }
.partner-preview small { color: #5c757e; font-size: 10px; line-height: 1.35; }

@media (max-width: 1100px) { .partner-finance-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .partner-finance-grid { grid-template-columns: 1fr; gap: 11px; }.statement-note { margin-top: -8px; }.statement-filters { flex-direction: column; align-items: stretch; }.statement-filters select { width: 100%; }.partner-card { min-height: 0; padding: 18px; }.partner-card strong { font-size: 25px; }.statement-head { align-items: flex-start; flex-direction: column; }.partner-fields .form-grid { grid-template-columns: 1fr; } }
