:root {
  --theme-bg: #f3f8f7;
  --theme-bg-soft: #f8fcfb;
  --theme-card: #fff;
  --theme-card-soft: #eff9f7;
  --theme-text: #17343a;
  --theme-muted: #63777b;
  --theme-border: #dbe9e6;
  --theme-primary: #087f73;
  --theme-primary-dark: #075e57;
  --theme-accent: #f28c55;
  --theme-secondary: #3867aa;
  --theme-danger: #bd4038;
  --theme-primary-bright: #20a88d;
  --theme-bg-start: #f3f8f7;
  --theme-bg-end: #fff8f2;
  --theme-primary-rgb: 8, 127, 115;
  --theme-radius: 8px;
  --theme-shadow: 0 12px 30px rgba(8, 82, 75, .10);
}

:root[data-theme="ocean"] { --theme-primary:#0876a6; --theme-primary-dark:#075a80; --theme-primary-bright:#19a7ce; --theme-accent:#ff9f66; --theme-secondary:#2b8d79; --theme-primary-rgb:8,118,166; --theme-bg:#f2f8fb; --theme-bg-start:#f2f8fb; --theme-bg-end:#fff8f2; --theme-card-soft:#e0f2f9; --theme-border:#d8e8ee; }
:root[data-theme="royal"] { --theme-primary:#2855a6; --theme-primary-dark:#1e4386; --theme-primary-bright:#4878d0; --theme-accent:#f2a65a; --theme-secondary:#218763; --theme-primary-rgb:40,85,166; --theme-bg:#f4f6fb; --theme-bg-start:#f4f6fb; --theme-bg-end:#fff8f1; --theme-card-soft:#e7eefb; --theme-border:#dce4f0; }
:root[data-theme="indigo"] { --theme-primary:#4f46a5; --theme-primary-dark:#3e3787; --theme-primary-bright:#6d65d8; --theme-accent:#f59e72; --theme-secondary:#087f73; --theme-primary-rgb:79,70,165; --theme-bg:#f6f5fb; --theme-bg-start:#f6f5fb; --theme-bg-end:#fff7f1; --theme-card-soft:#eceafb; --theme-border:#e0deef; }
:root[data-theme="violet"] { --theme-primary:#7650a8; --theme-primary-dark:#5d3e87; --theme-primary-bright:#9a6bc4; --theme-accent:#f1a35c; --theme-secondary:#087f73; --theme-primary-rgb:118,80,168; --theme-bg:#f8f5fa; --theme-bg-start:#f8f5fa; --theme-bg-end:#fff8f0; --theme-card-soft:#f1ebf8; --theme-border:#e7ddef; }
:root[data-theme="rose"] { --theme-primary:#a83f68; --theme-primary-dark:#873252; --theme-primary-bright:#d15d88; --theme-accent:#e9ad55; --theme-secondary:#087f73; --theme-primary-rgb:168,63,104; --theme-bg:#fbf5f7; --theme-bg-start:#fbf5f7; --theme-bg-end:#fff9f0; --theme-card-soft:#faeaf0; --theme-border:#eedce4; }
:root[data-theme="coral"] { --theme-primary:#c95746; --theme-primary-dark:#a54335; --theme-primary-bright:#ee795e; --theme-accent:#f2bd52; --theme-secondary:#087f73; --theme-primary-rgb:201,87,70; --theme-bg:#fcf6f3; --theme-bg-start:#fcf6f3; --theme-bg-end:#fff9ed; --theme-card-soft:#fdebe7; --theme-border:#f0ded9; }
:root[data-theme="amber"] { --theme-primary:#a86412; --theme-primary-dark:#854e0d; --theme-primary-bright:#d68a20; --theme-accent:#2a9d8f; --theme-secondary:#3867aa; --theme-primary-rgb:168,100,18; --theme-bg:#fbf8f1; --theme-bg-start:#fbf8f1; --theme-bg-end:#f1fbf8; --theme-card-soft:#fff1d9; --theme-border:#ece2cf; }
:root[data-theme="graphite"] { --theme-primary:#344a53; --theme-primary-dark:#283a42; --theme-primary-bright:#54727d; --theme-accent:#d9934e; --theme-secondary:#087f73; --theme-primary-rgb:52,74,83; --theme-bg:#f3f5f5; --theme-bg-start:#f3f5f5; --theme-bg-end:#fff8ef; --theme-card-soft:#e9eef0; --theme-border:#dce3e5; }
:root[data-theme="turquoise"] { --theme-primary:#087f8c; --theme-primary-dark:#07636d; --theme-primary-bright:#16a6a8; --theme-accent:#ef8f61; --theme-secondary:#3867aa; --theme-primary-rgb:8,127,140; --theme-bg:#f2f8f8; --theme-bg-start:#f2f8f8; --theme-bg-end:#fff7f0; --theme-card-soft:#e0f4f4; --theme-border:#d8e9e9; }

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(var(--theme-primary-rgb),.07), transparent 24rem),
    linear-gradient(135deg, var(--theme-bg-start), var(--theme-bg) 58%, var(--theme-bg-end));
  color: var(--theme-text);
}

.cadastro-container,
.main-dashboard,
.conteudo-principal,
.card-soft,
.orc-container {
  background: var(--theme-card) !important;
  color: var(--theme-text);
  border-radius: var(--theme-radius) !important;
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
}

.topbar {
  background: #252a2d;
  color: #fffdf9;
  border-bottom: 2px solid var(--theme-accent);
  box-shadow: 0 5px 18px rgba(37, 42, 45, .24);
  backdrop-filter: none;
}

.topbar-brand,
.topbar-appname,
.topbar-user,
.topbar-pagetitle {
  color: #fffdf9 !important;
}

.topbar-link,
.topbar-logout {
  color: #fffdf9 !important;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
}

.topbar-link:hover,
.topbar-logout:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}

.topbar-logout.is-danger {
  color: #fff !important;
  background: var(--theme-primary);
  border-color: var(--theme-primary);
}

.cadastro-title,
.dashboard-title,
.login-title,
h1,
h2,
h3 {
  color: var(--theme-text) !important;
  letter-spacing: 0;
}

.dashboard-subtitle,
.module-sub,
.module-note,
.small-label,
label {
  color: var(--theme-muted) !important;
}

.cadastro-form input,
.cadastro-form select,
.cadastro-form textarea,
.login-form input,
.login-form select,
.campo input,
.campo select,
.campo textarea,
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: #fff !important;
  color: var(--theme-text) !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.cadastro-form input:focus,
.cadastro-form select:focus,
.cadastro-form textarea:focus,
.login-form input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb),.16) !important;
}

.cadastro-btn,
.login-form button,
.dashboard-btn,
.cadastro-pesquisa button,
.btn-primary,
.btn-add,
.btn-save,
.btn-finalizar,
.cadastro-btn2 {
  background: linear-gradient(180deg, var(--theme-primary-bright), var(--theme-primary-dark)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 18px rgba(var(--theme-primary-rgb),.20);
}

.cadastro-btn:hover,
.login-form button:hover,
.dashboard-btn:hover,
.btn-primary:hover,
.btn-add:hover,
.btn-save:hover,
.btn-finalizar:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.sair-btn,
.logout-btn,
.btn-danger,
.btn-del {
  background: var(--theme-danger) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

.btn-edit,
a.btn-edit,
button.btn-edit,
.btn-link.btn-edit {
  background: linear-gradient(180deg, var(--theme-primary-bright), var(--theme-primary-dark)) !important;
  color: #fff !important;
  border-color: var(--theme-primary-dark) !important;
  box-shadow: 0 8px 18px rgba(var(--theme-primary-rgb),.20);
}

.btn-edit:hover,
a.btn-edit:hover,
button.btn-edit:hover,
.btn-link.btn-edit:hover {
  background: linear-gradient(180deg, var(--theme-primary-bright), var(--theme-primary-dark)) !important;
  color: #fff !important;
  border-color: var(--theme-primary-dark) !important;
}

.success-msg {
  background: #e7f7ed !important;
  color: #17613a !important;
  border: 1px solid #bce7c9;
}

.error-msg {
  background: #fff0ee !important;
  color: #9f2f28 !important;
  border: 1px solid #f3c4bf;
}

.tabela-usuarios,
.dashboard-table,
.tabela-itens,
.items-table,
table {
  background: #fff !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}

.tabela-usuarios th,
.dashboard-table th,
.tabela-itens th,
.items-table th,
table th {
  background: var(--theme-card-soft) !important;
  color: var(--theme-primary-dark) !important;
  border-color: var(--theme-border) !important;
}

.tabela-usuarios td,
.dashboard-table td,
.tabela-itens td,
.items-table td,
table td {
  color: var(--theme-text);
  border-color: var(--theme-border) !important;
}

.total-label,
.items-table td.total-label,
table td.total-label {
  color: #000 !important;
  font-weight: 800 !important;
  text-align: right !important;
}

.total-value,
.items-table td.total-value,
table td.total-value {
  color: #000 !important;
  font-weight: 800 !important;
  text-align: right !important;
}

.tabela-usuarios tr:hover,
.dashboard-table tr:hover,
tbody tr:hover {
  background: var(--theme-card-soft) !important;
}

.autocomplete {
  background: #fff !important;
  color: var(--theme-text) !important;
  border: 1px solid var(--theme-border) !important;
  box-shadow: 0 12px 28px rgba(32,55,78,.16) !important;
}

.autocomplete .item:hover {
  background: var(--theme-card-soft) !important;
}

.sic-topbar {
  position: relative;
  z-index: 1000;
  min-height: 66px;
  background: linear-gradient(112deg, var(--theme-primary-dark), var(--theme-primary) 68%, var(--theme-primary-bright));
  box-shadow: 0 5px 18px rgba(5,60,56,.24);
  color: #fff;
}
.sic-topbar-inner {
  width: min(1440px, calc(100% - 32px));
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
}
.sic-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  color: #fff;
  font-weight: 800;
  font-size: 1.04rem;
  text-decoration: none;
  white-space: nowrap;
}
.sic-brand:hover { color: #fff; }
.sic-brand-logo {
  width: 37px;
  height: 37px;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px 8px 8px 3px;
  background: rgba(255,255,255,.14);
}
.sic-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sic-menu-toggle-icon { display: grid; gap: 4px; }
.sic-menu-toggle-icon i { display: block; width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
.sic-menu-links { display: flex; align-items: center; flex: 1 1 auto; gap: 2px; min-width: 0; }
.sic-nav-home,
.sic-nav-group > summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 7px;
  color: rgba(255,255,255,.88);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.sic-nav-group > summary::-webkit-details-marker { display: none; }
.sic-nav-group > summary::after {
  width: 0;
  height: 0;
  margin: 3px 0 0 7px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  content: "";
}
.sic-nav-home:hover,
.sic-nav-group > summary:hover,
.sic-nav-group[open] > summary,
.sic-nav-home:focus-visible,
.sic-nav-group > summary:focus-visible {
  background: rgba(255,255,255,.14);
  color: #fff;
  outline: none;
}
.sic-nav-group { position: relative; }
.sic-nav-group:not([open]) > .sic-dropdown { display: none; }
.sic-dropdown {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  min-width: 218px;
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(8,127,115,.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(5,64,59,.22);
}
.sic-dropdown a {
  padding: 9px 10px;
  border-radius: 5px;
  color: #29484c;
  font-size: .88rem;
  line-height: 1.3;
  text-decoration: none;
}
.sic-dropdown a:hover,
.sic-dropdown a:focus-visible { background: var(--theme-card-soft); color: var(--theme-primary-dark); outline: none; }
.sic-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sic-page-title { max-width: 150px; overflow: hidden; color: rgba(255,255,255,.74); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.sic-user { max-width: 145px; overflow: hidden; color: #fff; font-size: .86rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sic-logout {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 7px;
  color: #fff !important;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sic-logout:hover { background: rgba(255,255,255,.14); }
.sic-theme-options { min-width: 250px; }
.sic-theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #29484c;
  font: inherit;
  font-size: .86rem;
  text-align: left;
  cursor: pointer;
}
.sic-theme-option:hover,
.sic-theme-option:focus-visible,
.sic-theme-option[aria-pressed="true"] { background: var(--theme-card-soft); color: var(--theme-primary-dark); outline: none; }
.sic-theme-option[aria-pressed="true"]::after { margin-left: auto; color: var(--theme-primary); content: "✓"; font-weight: 800; }
.sic-theme-swatches { display: flex; width: 50px; height: 19px; overflow: hidden; flex: 0 0 auto; border-radius: 4px; }
.sic-theme-swatches i { flex: 1; background: var(--swatch); }
.sic-theme-option[data-theme-choice="emerald"] .sic-theme-swatches i:nth-child(1) { --swatch:#087f73; }
.sic-theme-option[data-theme-choice="emerald"] .sic-theme-swatches i:nth-child(2) { --swatch:#20a88d; }
.sic-theme-option[data-theme-choice="emerald"] .sic-theme-swatches i:nth-child(3) { --swatch:#f28c55; }
.sic-theme-option[data-theme-choice="ocean"] .sic-theme-swatches i:nth-child(1) { --swatch:#0876a6; }
.sic-theme-option[data-theme-choice="ocean"] .sic-theme-swatches i:nth-child(2) { --swatch:#19a7ce; }
.sic-theme-option[data-theme-choice="ocean"] .sic-theme-swatches i:nth-child(3) { --swatch:#ff9f66; }
.sic-theme-option[data-theme-choice="royal"] .sic-theme-swatches i:nth-child(1) { --swatch:#2855a6; }
.sic-theme-option[data-theme-choice="royal"] .sic-theme-swatches i:nth-child(2) { --swatch:#4878d0; }
.sic-theme-option[data-theme-choice="royal"] .sic-theme-swatches i:nth-child(3) { --swatch:#f2a65a; }
.sic-theme-option[data-theme-choice="indigo"] .sic-theme-swatches i:nth-child(1) { --swatch:#4f46a5; }
.sic-theme-option[data-theme-choice="indigo"] .sic-theme-swatches i:nth-child(2) { --swatch:#6d65d8; }
.sic-theme-option[data-theme-choice="indigo"] .sic-theme-swatches i:nth-child(3) { --swatch:#f59e72; }
.sic-theme-option[data-theme-choice="violet"] .sic-theme-swatches i:nth-child(1) { --swatch:#7650a8; }
.sic-theme-option[data-theme-choice="violet"] .sic-theme-swatches i:nth-child(2) { --swatch:#9a6bc4; }
.sic-theme-option[data-theme-choice="violet"] .sic-theme-swatches i:nth-child(3) { --swatch:#f1a35c; }
.sic-theme-option[data-theme-choice="rose"] .sic-theme-swatches i:nth-child(1) { --swatch:#a83f68; }
.sic-theme-option[data-theme-choice="rose"] .sic-theme-swatches i:nth-child(2) { --swatch:#d15d88; }
.sic-theme-option[data-theme-choice="rose"] .sic-theme-swatches i:nth-child(3) { --swatch:#e9ad55; }
.sic-theme-option[data-theme-choice="coral"] .sic-theme-swatches i:nth-child(1) { --swatch:#c95746; }
.sic-theme-option[data-theme-choice="coral"] .sic-theme-swatches i:nth-child(2) { --swatch:#ee795e; }
.sic-theme-option[data-theme-choice="coral"] .sic-theme-swatches i:nth-child(3) { --swatch:#f2bd52; }
.sic-theme-option[data-theme-choice="amber"] .sic-theme-swatches i:nth-child(1) { --swatch:#a86412; }
.sic-theme-option[data-theme-choice="amber"] .sic-theme-swatches i:nth-child(2) { --swatch:#d68a20; }
.sic-theme-option[data-theme-choice="amber"] .sic-theme-swatches i:nth-child(3) { --swatch:#2a9d8f; }
.sic-theme-option[data-theme-choice="graphite"] .sic-theme-swatches i:nth-child(1) { --swatch:#344a53; }
.sic-theme-option[data-theme-choice="graphite"] .sic-theme-swatches i:nth-child(2) { --swatch:#54727d; }
.sic-theme-option[data-theme-choice="graphite"] .sic-theme-swatches i:nth-child(3) { --swatch:#d9934e; }
.sic-theme-option[data-theme-choice="turquoise"] .sic-theme-swatches i:nth-child(1) { --swatch:#087f8c; }
.sic-theme-option[data-theme-choice="turquoise"] .sic-theme-swatches i:nth-child(2) { --swatch:#16a6a8; }
.sic-theme-option[data-theme-choice="turquoise"] .sic-theme-swatches i:nth-child(3) { --swatch:#ef8f61; }
@media (max-width: 1200px) {
  .sic-topbar-inner { flex-wrap: wrap; gap: 9px 12px; padding: 10px 0; }
  .sic-menu-toggle { display: inline-flex; }
  .sic-menu-links { display: none; order: 4; flex: 1 0 100%; align-items: stretch; flex-direction: column; gap: 3px; padding: 5px 0; }
  .sic-menu-links.is-open { display: flex; }
  .sic-nav-home, .sic-nav-group > summary { width: 100%; }
  .sic-nav-group > summary { justify-content: space-between; }
  .sic-dropdown { position: static; min-width: 0; max-height: 40vh; margin: 2px 0 5px; border: 0; background: rgba(255,255,255,.08); box-shadow: none; }
  .sic-dropdown a { color: rgba(255,255,255,.9); }
  .sic-dropdown a:hover, .sic-dropdown a:focus-visible { background: rgba(255,255,255,.14); color: #fff; }
  .sic-theme-option { color: rgba(255,255,255,.94); }
  .sic-theme-option:hover, .sic-theme-option:focus-visible, .sic-theme-option[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; }
  .sic-theme-option[aria-pressed="true"]::after { color: #fff; }
  .sic-account { margin-left: auto; }
  .sic-page-title { display: none; }
}
@media (max-width: 520px) {
  .sic-topbar-inner { width: calc(100% - 22px); }
  .sic-brand { font-size: .96rem; }
  .sic-brand-logo { width: 33px; height: 33px; }
  .sic-account { gap: 7px; }
  .sic-user { max-width: 90px; font-size: .78rem; }
  .sic-logout { min-height: 34px; padding: 6px 9px; }
}
