:root {
  --bg: #140d08;
  --bg-soft: #1a1209;
  --surface: #241808;
  --surface-2: #2c1d0a;
  --line: #4a3417;
  --line-soft: #34270f;
  --text: #f1e3c4;
  --muted: #b8a37f;
  --gold: #d6a23f;
  --gold-soft: #f0c878;
  --purple: #8b5cf6;
  --purple-2: #6d28d9;
  --purple-soft: #a78bfa;
  --display: 'Cinzel', Georgia, serif;
  --display-sc: 'Spectral SC', Georgia, serif;
  --body: 'Spectral', Georgia, serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
  font-family: var(--body);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, #8b5cf622, transparent 38%),
    radial-gradient(circle at 90% 6%, #7c3aed1b, transparent 40%), var(--bg);
  line-height: 1.5;
}
button, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--purple); color: white; }
.shell { max-width: 1320px; margin: auto; padding: 0 28px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--gold-soft);
  font: 700 1.08rem var(--display); letter-spacing: .05em; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { font-weight: 600; color: var(--text); }
.user-name { color: var(--muted); font-size: .87rem; }
.auth-link, .details-actions a:first-child {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border: 1px solid #a78bfa77; color: white;
  box-shadow: 0 8px 22px -8px #8b5cf699;
}
.auth-link { padding: 9px 17px; border-radius: 8px; font: 600 .84rem var(--display-sc); }
.auth-link:hover, .details-actions a:hover { filter: brightness(1.15); }
.boot, .login-shell { min-height: calc(100vh - 72px); display: grid; place-items: center; }
.boot { color: var(--muted); font-size: .9rem; }
.login-shell { padding: 34px 16px; }
.login-card { width: min(100%, 460px); padding: clamp(30px, 5vw, 48px);
  text-align: center; background: linear-gradient(150deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 26px 90px #0008; }
.login-logo { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 23px; }
.login-card .eyebrow { margin-bottom: 10px; font-size: .7rem; }
.login-card .eyebrow::before { display: none; }
.login-card h1 { margin: 0 0 27px; color: var(--gold-soft);
  font: 600 clamp(1.65rem, 4vw, 2.1rem)/1.2 var(--display); }
.login-card .auth-link { display: inline-flex; align-items: center; justify-content: center;
  gap: 13px; min-width: 220px; padding: 12px 19px; }
.login-message { margin: 23px 0 0; color: var(--muted); font-size: .86rem; }
.eyebrow { margin: 0 0 17px; color: var(--purple-soft);
  font: 600 .8rem var(--display-sc); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ''; display: inline-block; vertical-align: middle;
  width: 7px; height: 7px; margin-right: 12px; background: var(--purple); transform: rotate(45deg); }
.notice { margin: 0 0 24px; padding: 15px 19px; border: 1px solid var(--line);
  border-left: 3px solid var(--purple); border-radius: 8px; background: var(--surface); color: var(--text); }
.notice:empty { display: none; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-bottom: 62px; }
.toolbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px;
  padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.toolbar-group { min-width: 150px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.toolbar label { font: 600 .75rem var(--display-sc); letter-spacing: .06em; color: var(--muted); }
.toolbar select { width: 100%; padding: 9px 12px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 7px; color: var(--text); outline: none; }
.toolbar select:focus { border-color: var(--purple-soft); }
.calendar-panel, .details { background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 48px #0005; }
.calendar-panel { min-width: 0; padding: 23px; min-height: 600px; }
.calendar-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.calendar-head .eyebrow { margin-bottom: 8px; }
.calendar-head h2 { margin: 0; font: 600 1.9rem var(--display); color: var(--gold-soft); text-transform: capitalize; }
.calendar-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.calendar-controls > button, .view-switch button { min-height: 36px; padding: 5px 11px;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 7px; }
.calendar-controls button:hover, .view-switch button.active { background: var(--purple-2);
  border-color: var(--purple); color: white; }
.view-switch { display: flex; gap: 4px; margin-left: 7px; padding-left: 12px; border-left: 1px solid var(--line); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.weekday, .day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weekday { padding: 10px 6px; text-align: center; color: var(--muted);
  font: 600 .7rem var(--display-sc); letter-spacing: .05em; }
.day { min-height: 104px; padding: 7px; overflow: hidden; background: var(--bg-soft); }
.day.outside { opacity: .42; }
.day.today { background: #2b1c17; }
.day-number { display: block; margin-bottom: 7px; color: var(--gold-soft);
  font: 600 .8rem var(--display-sc); }
.today .day-number { width: 25px; height: 25px; display: grid; place-items: center;
  background: var(--purple); border-radius: 50%; color: white; }
.event-chip { display: block; width: 100%; margin: 3px 0; padding: 5px 6px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0;
  border-left: 3px solid var(--gold); border-radius: 4px; background: #573d1a; color: var(--text); font-size: .72rem; }
.event-chip.campaign { border-color: var(--purple-soft); background: #3d285c; }
.event-chip.canceled { opacity: .55; text-decoration: line-through; }
.event-chip:hover { filter: brightness(1.25); }
.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px;
  text-align: left; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9px; color: var(--text); }
.event-row:hover { border-color: var(--purple); background: var(--surface-2); }
.event-date { min-width: 38px; color: var(--gold-soft); font: 600 1.45rem var(--display); }
.event-copy { display: grid; gap: 3px; }
.event-copy small { color: var(--muted); }
.details { min-height: 330px; padding: 23px; align-self: start; position: sticky; top: 92px; }
.empty-details { padding: 58px 12px; text-align: center; color: var(--muted); }
.empty-details h3 { margin: 14px 0 6px; color: var(--gold-soft); font: 600 1.15rem var(--display); }
.empty-details p { font-size: .88rem; }
.details .tag { display: inline-block; padding: 5px 8px; border-radius: 4px;
  color: var(--purple-soft); background: #3a2653; font: 600 .68rem var(--display-sc); letter-spacing: .07em; }
.details h3 { margin: 16px 0 8px; color: var(--gold-soft); font: 600 1.45rem/1.2 var(--display); }
.details h4 { margin: 20px 0 4px; color: var(--gold-soft); font: 600 .85rem var(--display-sc); }
.details p { color: var(--muted); white-space: pre-wrap; font-size: .9rem; line-height: 1.6; }
.details dl { display: grid; grid-template-columns: 80px 1fr; gap: 9px; margin: 20px 0; }
.details dt { color: var(--muted); font: 600 .7rem var(--display-sc); }
.details dd { margin: 0; color: var(--text); font-size: .9rem; }
.details-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.details-actions a { display: block; padding: 10px; border-radius: 7px; text-align: center;
  font: 600 .86rem var(--display-sc); }
.details-actions a.secondary { background: var(--surface-2); border: 1px solid var(--line); }
.empty-list { padding: 65px 20px; text-align: center; color: var(--muted); }
footer { border-top: 1px solid var(--line-soft); color: var(--muted); padding: 22px 10px 34px;
  font-size: .82rem; text-align: center; }
@media (max-width: 1040px) {
  .app { grid-template-columns: 1fr; }
  .details { position: static; }
}
@media (max-width: 700px) {
  .shell { padding: 0 14px; }
  .brand { font-size: .88rem; }
  .brand img { width: 34px; height: 34px; }
  .user-name { display: none; }
  .calendar-panel { padding: 11px; }
  .calendar-head { display: block; }
  .calendar-controls { margin-top: 14px; }
  .weekday { font-size: .58rem; padding: 7px 2px; }
  .day { min-height: 75px; padding: 4px; }
  .day-number { font-size: .64rem; }
  .event-chip { font-size: .58rem; padding: 4px 2px; }
  .toolbar { gap: 10px; }
  .toolbar-group { min-width: calc(50% - 5px); }
}

/* Entrada sem barra superior, com a iconografia oficial do GDI. */
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.shell { max-width: 1380px; }
.boot { min-height: 100svh; }
.login-shell { position: relative; isolation: isolate; min-height: 100svh; overflow: hidden; padding: 58px 24px; }
.login-shell::before { content: ''; position: absolute; z-index: -2; width: min(83vw, 830px);
  aspect-ratio: 1; border: 1px solid #8b5cf62d; border-radius: 50%;
  box-shadow: 0 0 0 115px #8b5cf608, inset 0 0 95px #8b5cf60c; }
.login-shell::after { content: ''; position: absolute; z-index: -1; width: 580px; height: 580px;
  border-radius: 50%; background: #6334a329; filter: blur(110px); }
.login-orbit { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orbit-icon { position: absolute; width: clamp(80px, 11vw, 158px); object-fit: contain;
  filter: drop-shadow(0 18px 20px #0008); animation: orbit-float 5.5s ease-in-out infinite alternate; }
.orbit-dice { top: 11%; left: 12%; transform: rotate(-16deg); }
.orbit-campaign { top: 9%; right: 12%; width: clamp(100px, 14vw, 190px); animation-delay: -2s; }
.orbit-oneshot { bottom: 13%; left: 15%; animation-delay: -3.5s; }
.orbit-sheet { bottom: 9%; right: 14%; width: clamp(100px, 13vw, 178px); animation-delay: -1.2s; }
.orbit-hub { top: 46%; right: 3%; width: clamp(70px, 9vw, 122px); animation-delay: -4s; }
@keyframes orbit-float { to { translate: 0 -13px; } }
.login-card { position: relative; z-index: 1; width: min(100%, 500px); padding: 46px 44px 42px;
  overflow: hidden; border: 1px solid #9a71375e; border-radius: 22px;
  background: radial-gradient(circle at 50% -15%, #7641b636, transparent 62%),
    linear-gradient(150deg, #2a1a12f5, #1a120bf7); box-shadow: 0 32px 95px #0009, inset 0 1px #f0c87816; }
.login-card::before { content: ''; position: absolute; inset: 7px; border: 1px solid #d6a23f24;
  border-radius: 16px; pointer-events: none; }
.login-logo { width: 100px; height: 100px; margin-bottom: 14px; filter: drop-shadow(0 11px 24px #7c3aed77); }
.login-card .eyebrow { margin: 0; color: var(--purple-soft); font-size: .73rem; letter-spacing: .14em; }
.login-card h1 { margin: 12px 0 10px; font-size: clamp(1.85rem, 4vw, 2.55rem); }
.login-lead { max-width: 330px; margin: 0 auto 29px; color: var(--text); font-size: 1rem; }
.login-card .auth-link { min-width: 235px; padding: 12px 20px; }
.login-message { margin-top: 18px; }

/* Cabeçalho e filtros da área autenticada. */
#dashboard { padding-bottom: 34px; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 22px 0 20px; padding: 10px 16px; min-height: 68px;
  border: 1px solid var(--line-soft); border-radius: 14px;
  background: linear-gradient(120deg, #25180f, #1a120c); box-shadow: 0 10px 32px #0003; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 45px; height: 45px; }
.workspace-header nav { display: flex; align-items: center; gap: 14px; }
.logout-link { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font: 600 .82rem var(--display-sc); }
.logout-link:hover { border-color: var(--purple-soft); color: white; }
.dashboard-intro { display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; padding: 5px 2px; }
.intro-icon { flex: none; width: 65px; height: 65px; display: grid; place-items: center; }
.intro-icon img { width: 64px; filter: drop-shadow(0 8px 11px #0008); }
.intro-copy { position: relative; z-index: 1; }
.intro-copy .eyebrow { margin: 0; font-size: .7rem; }
.intro-copy .eyebrow::before { display: none; }
.intro-copy h1 { margin: 5px 0 4px; font: 700 clamp(1.5rem, 2.7vw, 2.3rem)/1.2 var(--display); }
.intro-copy h1 em { font-style: normal; color: var(--gold-soft); }
.intro-copy p:last-child { margin: 0; color: var(--muted); font-size: .95rem; }
.notice { margin-bottom: 19px; }
.app { gap: 19px; }
.toolbar { display: block; padding: 19px 21px 21px; border-radius: 15px;
  background: linear-gradient(150deg, #2b1c10, #211609); box-shadow: 0 14px 35px #0003; }
.toolbar-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.toolbar-heading span { color: var(--gold-soft); font: 600 1rem var(--display); }
.toolbar-heading small { color: var(--muted); font-size: .79rem; }
.toolbar-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.toolbar-group { min-width: 0; display: block; }
.toolbar label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.toolbar label img { width: 23px; height: 23px; object-fit: contain; }
.picker { position: relative; min-width: 0; }
.toolbar select.native-select-hidden { position: absolute; width: 1px; height: 1px; padding: 0;
  opacity: 0; pointer-events: none; }
.picker-trigger { width: 100%; min-height: 43px; display: flex; align-items: center;
  justify-content: space-between; gap: 9px; padding: 9px 12px; text-align: left;
  border: 1px solid #74512d; border-radius: 9px; background: #1a120c;
  color: var(--text); font: 600 .86rem var(--body); box-shadow: inset 0 1px #ffffff0b; }
.picker-trigger::after { content: ''; flex: none; width: 7px; height: 7px; margin-right: 3px;
  border-right: 2px solid var(--gold-soft); border-bottom: 2px solid var(--gold-soft);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.picker.open .picker-trigger, .picker-trigger:hover { border-color: var(--purple-soft); background: #2a1b27; }
.picker.open .picker-trigger::after { transform: rotate(225deg) translate(-2px, -1px); }
.picker-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  width: max-content; min-width: 100%; max-width: min(320px, 90vw); max-height: 250px;
  padding: 5px; overflow: auto; border: 1px solid #795d8e; border-radius: 10px;
  background: #281d2e; box-shadow: 0 18px 42px #000a; }
.picker-option { width: 100%; display: block; padding: 9px 10px; text-align: left;
  border: 0; border-radius: 6px; background: transparent; color: var(--text);
  font: 600 .85rem var(--body); white-space: nowrap; }
.picker-option:hover, .picker-option:focus-visible { background: #4b345e; outline: 0; }
.picker-option[aria-selected="true"] { color: white; background: #67428f; }

/* Calendário e detalhe. */
.calendar-panel, .details { border-radius: 15px;
  background: linear-gradient(150deg, #291b0d, #211609); }
.calendar-panel { padding: 22px; min-height: 615px; }
.calendar-head { align-items: start; }
.calendar-head .eyebrow { margin: 0; }
.calendar-head h2 { margin: 5px 0 7px; }
.calendar-legend { display: flex; gap: 15px; color: var(--muted); font-size: .75rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.calendar-legend .legend-campaign { background: var(--purple-soft); }
.calendar-controls > button, .view-switch button { border-radius: 8px; font: 600 .79rem var(--display-sc); }
.view-switch { display: flex; gap: 3px; margin-left: 7px; padding: 3px;
  border: 1px solid var(--line); border-radius: 9px; background: #1a120c; }
.view-switch button { border: 0; background: transparent; }
.view-switch button.active { color: white; background: #67428f; box-shadow: 0 2px 8px #0007; }
.month { border-radius: 8px; overflow: hidden; }
.weekday { background: #21170f; }
.day { background: #1a120c; transition: background .2s; }
.day:hover { background: #271b15; }
.day.today { background: #2c1d2a; }
.event-row { background: #1a120c; }
.event-row:hover { background: #2c2030; }
.details { top: 20px; }
.empty-details { padding: 45px 8px; }
.empty-details img { width: 100px; margin: 0 auto 9px; filter: drop-shadow(0 10px 17px #0008); }
.empty-details h3 { margin-top: 9px; }
.empty-details p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .orbit-icon { animation: none; } }
@media (max-width: 1070px) {
  .toolbar-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .login-shell { padding: 24px 0; }
  .login-card { padding: 36px 22px 33px; }
  .login-logo { width: 84px; height: 84px; }
  .orbit-icon { width: 76px; opacity: .75; }
  .orbit-campaign { top: 6%; right: 4%; width: 92px; }
  .orbit-dice { top: 8%; left: 3%; }
  .orbit-oneshot { bottom: 7%; left: 4%; }
  .orbit-sheet { bottom: 6%; right: 3%; width: 92px; }
  .orbit-hub { display: none; }
  .workspace-header { margin: 14px 0; padding: 8px 11px; }
  .brand img { width: 35px; height: 35px; }
  .dashboard-intro { padding: 2px 0; gap: 10px; }
  .intro-icon { width: 58px; height: 58px; }
  .intro-icon img { width: 56px; }
  .intro-copy h1 { font-size: 1.28rem; }
  .intro-copy p:last-child { font-size: .81rem; }
  .toolbar { padding: 15px; }
  .toolbar-heading small { display: none; }
}
@media (max-width: 440px) {
  .login-card { margin: 0 7px; }
  .login-shell::before { width: 120vw; }
  .orbit-icon { opacity: .42; }
  .dashboard-intro .eyebrow { font-size: .62rem; }
  .toolbar-fields { grid-template-columns: 1fr; }
  .picker-menu { width: 100%; }
}

/* Barra flutuante da agenda, sem faixa de fundo no topo da página. */
#dashboard { padding-top: 14px; }
.workspace-header {
  position: sticky; top: 12px; z-index: 30; margin: 0 0 24px;
  min-height: 72px; padding: 10px 14px; gap: 16px;
  border-color: #7654349c; border-radius: 17px;
  background: #21160fe8; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px #0009, inset 0 1px #f0c8781a;
}
.workspace-header .brand { flex: none; }
.adventure-scope { display: flex; align-items: center; gap: 3px; min-width: 0;
  padding: 4px; border: 1px solid #68472d; border-radius: 11px; background: #130d0bc9; }
.adventure-scope button { min-height: 38px; padding: 7px 11px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font: 600 .8rem var(--display-sc); white-space: nowrap; }
.adventure-scope button:hover { color: white; background: #493051; }
.adventure-scope button.active { color: white; background: #67428f; box-shadow: 0 3px 10px #0008; }
.header-identity { display: flex; align-items: center; justify-content: flex-end; gap: 13px; min-width: 0; }
.server-identity { display: flex; align-items: center; gap: 8px; min-width: 0;
  padding-right: 13px; border-right: 1px solid var(--line); color: var(--gold-soft); font-size: .83rem; }
.server-identity #server-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 135px; }
.identity-image { width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  overflow: hidden; border: 1px solid #8e6842; border-radius: 10px;
  background: #35233e; color: var(--gold-soft); font: 700 .9rem var(--display); }
.identity-image img { width: 100%; height: 100%; object-fit: cover; }
.account-image { border-radius: 50%; }
.workspace-header nav { gap: 9px; min-width: 0; }
.workspace-header .user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details { top: 106px; }
@media (max-width: 1100px) {
  .workspace-header { flex-wrap: wrap; justify-content: space-between; row-gap: 8px; }
  .adventure-scope { order: 3; width: 100%; justify-content: center; }
  .adventure-scope button { flex: 1; }
}
@media (min-width: 1041px) and (max-width: 1100px) { .details { top: 154px; } }
@media (max-width: 700px) {
  #dashboard { padding-top: 9px; }
  .workspace-header { top: 8px; margin: 0 0 20px; padding: 8px 10px; max-width: 100%; }
  .brand img { width: 35px; height: 35px; }
  .header-identity { gap: 8px; }
  .server-identity { padding-right: 8px; }
  .server-identity #server-name { display: none; }
  .identity-image { width: 30px; height: 30px; }
  .adventure-scope { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .adventure-scope::-webkit-scrollbar { display: none; }
  .adventure-scope button { min-height: 36px; padding: 6px 3px; font-size: .72rem; }
  .logout-link { padding: 7px 9px; }
}
@media (max-width: 440px) {
  .workspace-header .brand span { display: none; }
  .workspace-header .brand { gap: 0; }
  .server-identity { padding-right: 8px; }
}
