@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #182a34;
  --muted: #728894;
  --paper: #f3f9fb;
  --white: #fff;
  --forest: #14394d;
  --forest-2: #215c73;
  --lime: #72e5ff;
  --line: #dce9ee;
  --coral: #ee7864;
  --blue: #78a8ec;
  --shadow: 0 16px 40px rgba(20, 42, 55, .08);
  font-family: 'DM Sans', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(76, 194, 225, .45); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: wait; }
/* Contêiner do Logótipo */
.brand {
  display: flex;
  align-items: center;
  padding: 16px;
  overflow: visible; /* Garante que nada fica cortado */
  text-decoration: none;
}

.brand-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  height: auto; /* Permite ajustar a altura automaticamente */
  overflow: visible;
}

/* Imagem do Logótipo */
.brand-logo {
  max-width: 140px; /* Defina a largura ideal para o menu */
  height: auto;     /* Mantém a proporção original da imagem */
  display: block;
  object-fit: contain;
}
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #d8e5ea; border-radius: 7px; color: var(--ink); background: #fff; }
.field input::placeholder { color: #97aab4; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; color: var(--ink); background: var(--lime); font-size: 13px; font-weight: 700; transition: transform .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-1px); background: #a6f1ff; }
.btn-primary { width: 100%; min-height: 46px; margin-top: 8px; }
.btn-secondary { border-color: var(--line); background: white; }
.btn-secondary:hover { background: #eff7fa; }
.btn-quiet { padding: 0 10px; border: 0; background: transparent; color: #617784; }
.btn-quiet:hover { background: #e8f3f7; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 25px 16px 18px; color: #f1f8fb; background: var(--forest); }
.sidebar .brand { padding: 0 10px 34px; }
.side-label { padding: 0 10px 10px; color: #849ba6; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 0 11px; border: 0; border-radius: 7px; color: #b4c5ce; background: transparent; text-align: left; font-size: 13px; font-weight: 600; }
.nav-item:hover, .nav-item.active { color: #fff; background: #203f52; }
.nav-item.active:before { content: ''; width: 3px; height: 17px; margin-left: -11px; margin-right: 6px; border-radius: 2px; background: var(--lime); }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 14px 9px 12px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; color: var(--forest); background: var(--lime); font-weight: 700; }
.user-name { overflow: hidden; color: #f1f8fb; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.user-mode { margin-top: 3px; color: #91a7b1; font-size: 10px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0 clamp(20px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.76); }
.topbar-date { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sync-indicator { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #72e5ff; }
.main-area { min-width: 0; }
.page-content { width: min(100%, 1230px); margin: 0 auto; padding: 35px clamp(20px, 4vw, 54px) 60px; animation: rise .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-enter { from { opacity: 0; } to { opacity: 1; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-heading h1 { margin: 0 0 6px; font: 600 29px 'Space Grotesk', sans-serif; letter-spacing: 0; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 8px; }
.grid { display: grid; gap: 15px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { min-height: 122px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-value { margin-top: 13px; font: 600 27px 'Space Grotesk', sans-serif; letter-spacing: 0; }
.stat-note { margin-top: 4px; color: var(--muted); font-size: 10px; }
.stat-accent { color: #1683a2; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-head h2 { margin: 0; font: 600 15px 'Space Grotesk', sans-serif; letter-spacing: 0; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-link { padding: 4px 0; border: 0; color: #2088a7; background: transparent; font-size: 11px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.form-grid .field { margin-bottom: 13px; }
.field.full { grid-column: 1/-1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.inline-form { margin-bottom: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #f7fbfc; }
.list { display: grid; gap: 8px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid #e6eef1; border-radius: 7px; background: #fff; }
.row-main { min-width: 0; }
.row-title { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.row-value { flex: 0 0 auto; color: #287d98; font-size: 12px; font-weight: 700; text-align: right; }
.delete-btn { padding: 4px 7px; border: 0; border-radius: 5px; color: #ad6558; background: transparent; font-size: 11px; }
.delete-btn:hover { background: #fff2ee; }
.empty-state { padding: 25px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 20px; color: #246e86; background: #e5f7fb; font-size: 10px; font-weight: 700; }
.badge.warn { color: #a65c3f; background: #fff0e9; }
.badge.neutral { color: #667b86; background: #edf3f5; }
.segment { display: inline-flex; gap: 3px; padding: 3px; border-radius: 7px; background: #edf5f8; }
.segment button { padding: 7px 10px; border: 0; border-radius: 5px; color: #697f89; background: transparent; font-size: 11px; font-weight: 700; }
.segment button.active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(24,36,28,.08); }
.mobile-nav { display: none; }
.toast { position: fixed; z-index: 10; right: 20px; bottom: 20px; max-width: calc(100vw - 40px); padding: 12px 16px; border-radius: 7px; color: #fff; background: #173a4b; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .app-shell { display: block; padding-bottom: 67px; }
  .sidebar { display: none; }
  .topbar { min-height: 59px; padding: 0 18px; }
  .topbar-date { font-size: 10px; }
  .page-content { padding: 25px 17px 38px; }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 11px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .grid { gap: 10px; }
  .grid-4 { gap: 9px; }
  .stat { min-height: 103px; padding: 13px; }
  .stat-value { margin-top: 11px; font-size: 22px; }
  .stat-label { font-size: 10px; }
  .stat-note { font-size: 9px; }
  .panel { padding: 15px; }
  .grid-2 { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(6, 1fr); min-height: 64px; padding: 6px 4px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
  .mobile-nav .nav-item { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 48px; padding: 3px 0; border-radius: 5px; color: #6e8390; font-size: 9px; }
  .mobile-nav .nav-item.active { color: var(--forest); background: #e5f8fc; }
  .mobile-nav .nav-item.active:before { display: none; }
  .mobile-nav .nav-icon { font-size: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .sync-indicator { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
