:root {
  color-scheme: dark;
  --gold: #f2c477;
  --cream: #f8eedc;
  --muted: #d0c0a7;
  --line: #7a633e;
  --ink: #251b11;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
  --bar: 80px;
  font: 16px/1.5 var(--sans);
  background: #060504;
  color: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.13; }
h1 { font-size: clamp(2rem, 4vw, 3.45rem); font-weight: 600; }
h2 { font-size: 1.45rem; }
button, input, textarea, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { opacity: .63; cursor: wait; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #e8a934; outline-offset: 4px; }
svg { width: 1.4rem; height: 1.4rem; flex: none; vertical-align: middle; }
button {
  border: 1px solid currentColor; border-radius: .6rem; padding: .54rem .9rem;
  background: transparent; color: inherit; min-height: 42px;
}
button:hover { background: #a7732522; }
.primary {
  color: #160e04; border: 1px solid #bb8a43; font-weight: 700;
  background: radial-gradient(ellipse at 50% 0%, #ffe2a1, transparent 61%),
    linear-gradient(110deg, #b5813e, #efb252 55%, #b17a37);
}
.primary:hover { background: #ffd286; }
.icon-button { border: 0; display: grid; place-items: center; padding: .5rem; }
.initial-loading { min-height: 100svh; display: grid; place-items: center; }
.login-page {
  min-height: 100svh; position: relative; overflow: hidden; isolation: isolate;
  display: grid; place-items: center; padding: 35px 20px 9vh;
  background: radial-gradient(ellipse at center, #171007 0%, #070604 42%, #030303 72%);
}
.scenery { position: absolute; inset-block: 0; z-index: -1; pointer-events: none; background-repeat: no-repeat; background-size: auto 100%; }
.scenery-left { left: 0; width: 37%; background-image: url('/assets/personagem.jpg'); background-position: left center; mask-image: linear-gradient(90deg,#000 78%,transparent); }
.scenery-right { right: 0; width: 35%; background-image: url('/assets/escritorio.jpg'); background-position: right center; mask-image: linear-gradient(270deg,#000 78%,transparent); }
.login-content { width: min(100%, 590px); text-align: center; zoom: .6; }
.login-brand { width: max-content; margin: 0 auto clamp(22px, 4vh, 42px); font-size: clamp(2.65rem, 5.2vw, 4.55rem); }
.login-brand img { width: clamp(95px, 11vw, 145px); height: auto; display: block; margin: 0 auto 4px; mix-blend-mode: screen; }
.wordmark { color: #f4d39e; font: 600 1em/1.03 var(--serif); letter-spacing: .045em; }
.login-brand p {
  margin: .65rem 0 0; color: #fae7c8; text-transform: uppercase;
  font: bold .25em/1.5 var(--serif); letter-spacing: .22em;
  display: flex; align-items: center; justify-content: space-between; white-space: nowrap;
}
.login-brand p span:last-child { letter-spacing: .22em; margin-right: -.22em; }
.login-panel {
  position: relative; border: 1px solid #967340; border-radius: 32px;
  padding: clamp(23px, 3.35vw, 53px); padding-block: clamp(23px, 3.65vh, 36px);
  background: linear-gradient(160deg,#19140deb,#080604f7 82%);
  box-shadow: 0 24px 70px #0009, inset 0 0 50px #9b6a1d0b;
}
.login-panel::before, .login-panel::after {
  content: ''; position: absolute; width: 38%; height: 2px; left: 31%; top: -1px;
  background: radial-gradient(ellipse,#ffedc3 0%,#e8a943 30%,transparent 73%);
  filter: drop-shadow(0 0 8px #ffa439); pointer-events: none;
}
.login-panel::after { top: auto; bottom: -1px; }
.login-panel h1 { font-size: clamp(1.85rem, 3vw, 2.4rem); margin: 0 0 clamp(20px, 3.7vh, 38px); }
.login-panel form { display: grid; gap: clamp(13px, 2.55vh, 24px); }
.credential {
  display: flex; align-items: center; gap: 14px; min-height: clamp(50px, 7vh, 66px);
  border: 1px solid #a18861; border-radius: 16px; padding: 0 14px 0 22px; color: #f5dcb0;
  background: #0f0b07a0;
}
.credential:focus-within { box-shadow: 0 0 0 2px #edba5c; }
.credential > svg, .credential button svg { width: 29px; height: 29px; }
.credential input {
  border: 0; background: transparent; outline: none; color: var(--cream);
  min-width: 0; width: 100%; padding: 12px 4px; font-size: clamp(1rem, 1.4vw, 1.23rem);
}
.credential input::placeholder { color: #d2c2a9; opacity: 1; }
.enter { min-height: clamp(50px, 7vh, 66px); border-radius: 16px; font-size: clamp(1.15rem, 1.7vw, 1.68rem); }
.feedback { color: #a03419; margin: .55rem 0; font-weight: 600; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.login-panel .feedback, .dark-dialog .feedback, .dropdown-panel .feedback { color: #ffb59c; margin: 0; }
.login-options { margin-top: clamp(17px, 3vh, 32px); display: grid; gap: 12px; }
.access-note { color: var(--muted); font-size: .94rem; }
.access-note p { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 12px; }
.access-note p::before, .access-note p::after { content: ''; height: 1px; flex: 1; background: #725c3b; }
.access-note button { border-radius: 50px; color: var(--gold); min-width: min(100%, 220px); margin: .2rem; }
.demo-note { color: var(--gold); font-size: .88rem; }
.demo-note p { color: var(--cream); margin-top: .4rem; }
.clock, .clock > span { display: flex; align-items: center; gap: .65rem; white-space: nowrap; }
.clock { gap: clamp(.65rem, 1.8vw, 1.6rem); }
.clock svg { color: var(--gold); }
.time-piece { border-left: 1px solid #6f644e; padding-left: clamp(.65rem, 1.8vw, 1.6rem); }
[data-date]::first-letter { text-transform: uppercase; }
[data-compact-date] { display: none; }
.login-clock { position: absolute; top: 33px; right: clamp(20px, 2.5vw, 42px); color: #fce6c8; }
.login-clock time { font-weight: 600; font-variant-numeric: tabular-nums; }
.topbar {
  position: fixed; z-index: 5; inset: 0 0 auto; min-height: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.4rem;
  padding: 0 clamp(.8rem, 2.4vw, 2.7rem); color: #fff6e8;
  background: linear-gradient(#161514, #070707); border-bottom: 2px solid #ac7a30;
  box-shadow: 0 3px 20px #0007;
}
.topbar::after { content: ''; position: absolute; inset: auto 0 -2px; height: 2px; background: linear-gradient(90deg, transparent, #ffe5a0 63%, transparent); pointer-events: none; }
.top-start, .top-end { display: flex; gap: clamp(.45rem, 1.3vw, 1.6rem); align-items: center; min-width: 0; }
.top-end { justify-content: flex-end; }
.top-brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: #e9bd73; font: 600 clamp(1.1rem, 2.05vw, 1.85rem)/1 var(--serif); letter-spacing: .035em; white-space: nowrap; }
.top-brand img { object-fit: contain; width: clamp(30px, 4.3vw, 54px); height: auto; mix-blend-mode: screen; }
.top-clock { font-family: var(--serif); font-size: clamp(.86rem, 1.35vw, 1.15rem); }
.top-clock time { font-variant-numeric: tabular-nums; }
.dropdown { position: relative; }
.dropdown summary { display: flex; align-items: center; gap: .46rem; min-height: 44px; padding: .46rem .65rem; list-style: none; position: relative; white-space: nowrap; font-family: var(--serif); }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover, .dropdown[open] summary { background: #e7b4581b; border-radius: 10px; }
.dropdown svg { color: var(--gold); }
.dropdown summary svg:last-child:not(:first-child) { width: 1rem; height: 1rem; color: inherit; }
.systems summary { border: 1px solid #51483b; border-radius: 10px; }
.top-end .dropdown { border-left: 1px solid #4e4639; padding-left: .35rem; }
.count { position: absolute; top: -.12rem; right: -.16rem; min-width: 1.32rem; text-align: center; font: 700 .77rem/1.32rem var(--sans); border-radius: 100%; background: var(--gold); color: #24170a; }
.dropdown-panel {
  position: absolute; top: calc(100% + 9px); left: 0; width: min(320px, calc(100vw - 24px));
  background: #121110; border: 1px solid #b08036; border-radius: 12px; padding: 8px;
  box-shadow: 0 12px 28px #0009; max-height: min(65vh, 440px); overflow: auto;
}
.top-end .dropdown-panel { right: 0; left: auto; }
.profile-menu .dropdown-panel { width: 176px; }
.profile-menu .dropdown-panel > a, .profile-menu .dropdown-panel > button { display: block; padding: .62rem; }
.profile-menu .dropdown-panel > button { width: 100%; text-align: left; border: 0; }
.notifications .dropdown-panel { padding: 1rem; }
.notifications ul { list-style: none; margin: .8rem 0; padding: 0; }
.notifications li { padding: .6rem 0; border-block-start: 1px solid #79603d; }
.unread { display: inline; color: var(--gold); margin-left: .55rem; }
.service-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: .55rem .73rem; text-decoration: none; border-radius: 8px; }
.service-link:hover, .service-link[aria-current] { background: #bd8b3b58; }
.skip-link { position: fixed; top: .5rem; left: .5rem; transform: translateY(-150%); z-index: 10; background: #fff; color: #21180d; padding: .55rem; }
.skip-link:focus { transform: translateY(0); }
.workspace {
  color-scheme: light; color: var(--ink); padding: calc(var(--bar) + clamp(2rem, 6vw, 6rem)) clamp(12px, 3vw, 48px) 3rem;
  min-height: 100svh; background: #2b2621 url('/assets/faixa.jpg') center var(--bar) / 100% auto no-repeat;
}
.paper {
  max-width: 1440px; min-height: 380px; margin: 0 auto; padding: clamp(20px, 4vw, 62px);
  border: 1px solid #fff; border-radius: 22px; background: linear-gradient(140deg,#f9f4eb,#e9e1d8);
  box-shadow: 0 18px 50px #0005;
}
.paper h2 { margin-bottom: .75rem; }
.page-title { margin-bottom: 1.8rem; }
.page-title p { color: #604d39; margin-top: .55rem; }
.demo-flag { font-size: .84rem; color: #ffdfab; margin: 0 auto .6rem; max-width: 1440px; }
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 5vw, 5rem); }
.simple-list { padding: 0; margin: 0; list-style: none; }
.simple-list li { border-bottom: 1px solid #a78c664d; padding: .27rem 0; }
.simple-list li > p { margin-bottom: .55rem; }
.simple-list svg { color: #885711; }
.chat-trigger { margin-top: 1.8rem; }
.account { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin: 0 0 2rem; }
.account div, .metrics div { border-top: 1px solid #ae997d; padding-top: .65rem; min-width: 0; overflow-wrap: anywhere; }
dt { color: #604d39; }
dd { margin: .2rem 0 0; font-weight: 650; }
.service-title { display: flex; align-items: flex-start; gap: 1.1rem; }
.service-emblem { display: grid; place-items: center; flex: none; height: clamp(52px,6vw,78px); aspect-ratio: 1; border-radius: 15px; border: 1px solid #ba8d43; background: #161410; color: var(--gold); }
.service-emblem svg { width: 55%; height: 55%; }
.integration-state { border-top: 1px solid #bfa989; padding-top: 1.4rem; }
.integration-state .actions { margin-top: 1rem; }
.empty { color: #644e39; }
.dropdown .empty { color: #e3cdaa; padding: .7rem; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .45rem; border-bottom: 1px solid #a88e68; padding-bottom: .65rem; margin: 0 0 1.35rem; }
.admin-nav a { text-decoration: none; padding: .42rem .7rem; border-radius: 7px; min-height: 40px; }
.admin-nav a:hover, .admin-nav a[aria-current] { background: #d8c19e; color: #281a0d; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 20px; }
.metrics dd { font: 600 1.8rem var(--serif); }
.admin-content { display: grid; gap: .75rem; }
.admin-content > button { justify-self: start; }
.filters, .actions { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.filters { margin: .65rem 0 .85rem; }
.filters .field:first-child { flex: 1 1 240px; }
.field { display: grid; gap: .28rem; font-weight: 600; min-width: 0; }
.field :is(input,select,textarea), .route-value {
  color: inherit; background: #fff9ef; border: 1px solid #9a805e; padding: .58rem .68rem; border-radius: 7px; width: 100%; min-width: 0; min-height: 42px;
}
.route-value { overflow-wrap: anywhere; }
.field select { padding-right: .7rem; }
.editor { border: 1px solid #c2ad90; padding: 1rem; border-radius: 12px; margin: .55rem 0; background: #f6eee2; }
.editor form { display: grid; gap: .75rem; }
.check { display: flex; align-items: center; gap: .45rem; overflow-wrap: anywhere; min-height: 34px; }
.check input { accent-color: #865519; height: 1.13rem; width: 1.13rem; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr)); gap: .2rem .7rem; }
fieldset { border: 1px solid #b69d7b; border-radius: 8px; margin: 0; min-width: 0; }
legend { font-weight: 650; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .68rem .75rem; border-bottom: 1px solid #c7b69d; vertical-align: top; min-width: 110px; overflow-wrap: anywhere; }
th { background: #e1d2bf; }
td small { display: block; color: #68523a; margin-top: .25rem; }
.success { color: #325828; }
.dark-dialog { width: min(calc(100% - 2rem), 560px); max-height: 85svh; color: var(--cream); background: #15100b; border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 4vw, 2rem); }
.dark-dialog::backdrop { background: #000b; }
.dark-dialog form { display: grid; gap: .9rem; }
.dark-dialog h2, .dark-dialog p { margin-bottom: .7rem; }
.dark-dialog :is(input,textarea) { background: #090705; }
.transcript { max-height: 13rem; overflow-y: auto; padding-left: 1.25rem; }
.transcript p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1110px) {
  [data-date] { display: none; }
  [data-compact-date] { display: inline; }
  .scenery-left, .scenery-right { opacity: .8; }
}
@media (max-width: 760px) {
  :root { --bar: 66px; }
  .login-page { padding-top: 70px; padding-bottom: 28px; }
  .login-clock { top: 18px; }
  .scenery { opacity: .45; width: 52%; }
  .scenery-left { background-position: 35% center; }
  .scenery-right { background-position: 72% center; }
  .topbar { gap: .48rem; padding-inline: .55rem; }
  .top-start, .top-end { gap: .3rem; }
  .top-brand span, .menu-label, .top-end .dropdown { border: 0; }
  .top-end .dropdown { padding: 0; }
  .top-brand span, .menu-label { display: none; }
  .top-clock { gap: .4rem; }
  .top-clock svg { width: 1rem; height: 1rem; }
  .top-clock > span { gap: .3rem; }
  .top-clock .time-piece { padding-left: .4rem; }
  .dropdown summary { padding: .38rem .42rem; }
  .notifications .dropdown-panel { right: -36px; }
  .systems .dropdown-panel { left: -34px; }
  .home-columns { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .top-clock .date-piece { display: none; }
  .top-clock .time-piece { border: 0; padding: 0; }
  .profile-menu summary svg:last-child { display: none; }
  .login-panel { border-radius: 22px; }
  .workspace { padding-top: calc(var(--bar) + 1.3rem); }
}

@media (min-width: 761px) {
  .login-content { width: min(100%, clamp(395px, 36vw, 590px)); }
  .login-brand { font-size: clamp(2.65rem, 4.15vw, 4.55rem); }
  .login-page { padding-block: min(4vh, 35px) min(6vh, 55px); }
  .login-brand img { width: clamp(95px, 9.2vw, 145px); }
  .login-panel { padding-inline: clamp(24px, 3.15vw, 53px); }
}
@media (min-width: 350px) and (max-width: 430px) {
  .top-clock .date-piece { display: flex; }
  .top-clock .date-piece svg { display: none; }
  .top-clock [data-compact-date] { font-size: .76rem; }
}
.admin-content { grid-template-columns: minmax(0, 1fr); }
.admin-content > * { min-width: 0; }
