:root{
  --cinema-bg:#061329;
  --cinema-deep:#030c1d;
  --cinema-panel:#0c2042;
  --cinema-panel-2:#122a52;
  --cinema-line:rgba(226,185,72,.22);
  --cinema-gold:#e2b948;
  --cinema-gold-soft:#f7d875;
  --cinema-text:#f8f5ed;
  --cinema-muted:#aebbd0;
  --cinema-shadow:0 22px 60px rgba(0,5,20,.38);
}

body{
  min-height:100vh;
  color:var(--cinema-text);
  background:
    radial-gradient(circle at 83% 3%,rgba(226,185,72,.16),transparent 26%),
    radial-gradient(circle at 25% 85%,rgba(46,94,166,.2),transparent 34%),
    linear-gradient(145deg,var(--cinema-deep),var(--cinema-bg) 52%,#091b38);
  background-attachment:fixed;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.28;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:54px 54px;
  mask-image:linear-gradient(to bottom,black,transparent 86%);
}

aside{
  background:
    radial-gradient(circle at 30% 8%,rgba(226,185,72,.18),transparent 20%),
    linear-gradient(180deg,#071731 0%,#0b2145 54%,#06132a 100%);
  border-right:1px solid rgba(226,185,72,.24);
  box-shadow:18px 0 60px rgba(0,0,0,.22);
}
.brand{color:#fff;text-shadow:0 1px 18px rgba(226,185,72,.18)}
.brand>img{filter:drop-shadow(0 0 13px rgba(226,185,72,.36))}
.brand small{color:#d5c79f}
nav{position:relative}
nav::before{content:"NAVEGAÇÃO";display:block;margin:0 13px 9px;color:#7e8da8;font-size:9px;font-weight:850;letter-spacing:.2em}
.nav{position:relative;color:#b9c5d8;border:1px solid transparent;transition:.22s ease}
.nav:hover,.nav.active{color:#fff;background:linear-gradient(90deg,rgba(35,69,120,.88),rgba(17,43,83,.74));border-color:rgba(226,185,72,.18);box-shadow:inset 3px 0 0 var(--cinema-gold),0 10px 30px rgba(0,0,0,.18)}
.aside-foot{border:1px solid rgba(226,185,72,.13);border-radius:12px;background:rgba(255,255,255,.025);color:#bec9da}
.aside-foot i{background:var(--cinema-gold);box-shadow:0 0 14px var(--cinema-gold)}
.aside-foot small{color:#8292ad}

main{max-width:none;background:transparent}
header{
  position:relative;
  padding:20px 22px;
  border:1px solid var(--cinema-line);
  border-radius:18px;
  background:linear-gradient(115deg,rgba(14,38,77,.94),rgba(7,22,48,.88));
  box-shadow:var(--cinema-shadow),inset 0 1px 0 rgba(255,255,255,.06);
  overflow:visible;
}
header::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at 82% 0,rgba(226,185,72,.12),transparent 34%)}
header>div{position:relative;z-index:1}
h1,h2,h3,.panel h2,.cards strong{color:#fff}
h1{font-size:32px;letter-spacing:-.03em}
.eyebrow{color:var(--cinema-gold-soft)}
.workspace-name{color:#d9e2f1}
.header-actions{position:relative;z-index:2}
.portal-link,.account-trigger{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:43px;
  padding:10px 15px;
  border:1px solid rgba(226,185,72,.28);
  border-radius:11px;
  color:#f7f2e5;
  background:rgba(255,255,255,.045);
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:.2s ease;
}
.portal-link:hover,.account-trigger:hover{transform:translateY(-1px);border-color:rgba(226,185,72,.62);background:rgba(226,185,72,.11);box-shadow:0 10px 24px rgba(0,0,0,.2)}
.account-trigger{font:inherit}
.account-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;color:transparent;background:linear-gradient(#f5d56d,#b68518);box-shadow:0 0 18px rgba(226,185,72,.28)}
.account-icon::before{content:"";width:8px;height:8px;border:2px solid #10234a;border-radius:50%;box-shadow:0 9px 0 3px #10234a}

.cards article,.panel,.list-item,.certificate-card,.token-item,.cert-monitor article{
  color:var(--cinema-text);
  border-color:var(--cinema-line);
  background:linear-gradient(145deg,rgba(17,43,83,.96),rgba(8,27,58,.96));
  box-shadow:var(--cinema-shadow),inset 0 1px 0 rgba(255,255,255,.045);
}
.cards article{position:relative;overflow:hidden;transition:transform .2s ease,border-color .2s ease}
.cards article::after{content:"";position:absolute;width:100px;height:100px;right:-42px;bottom:-58px;border-radius:50%;border:1px solid rgba(226,185,72,.12);box-shadow:0 0 38px rgba(226,185,72,.07)}
.cards article:hover{transform:translateY(-3px);border-color:rgba(226,185,72,.45)}
.cards span,.cards small,.panel p,.list-item small,.token-item small,.certificate-card p,.certificate-card dt{color:var(--cinema-muted)}
.cards strong{font-weight:800;text-shadow:0 3px 22px rgba(0,0,0,.35)}
.cards .accent{background:linear-gradient(135deg,#8a6418,#d0a436 52%,#f0d47a);border-color:#f0d47a;color:#061329}
.cards .accent strong,.cards .accent span,.cards .accent small{color:#061329}
.cards .status-good{border-top-color:#35b887}
.cards .status-warning{border-top-color:var(--cinema-gold);background:linear-gradient(145deg,rgba(70,54,19,.97),rgba(24,38,62,.98))}
.cards .status-danger{border-top-color:#df6672;background:linear-gradient(145deg,rgba(73,25,40,.96),rgba(24,29,55,.98))}
.cards .status-warning strong{color:#f7d875}.cards .status-danger strong{color:#ff8f98}

.panel{position:relative;overflow:hidden}
.panel::before{content:"";position:absolute;inset:0 0 auto;height:1px;background:linear-gradient(90deg,transparent,var(--cinema-gold),transparent);opacity:.55}
.panel-head{position:relative;z-index:1}
.pill.live{color:#10234a;background:linear-gradient(135deg,#f4d66e,#c89728);box-shadow:0 8px 22px rgba(226,185,72,.16)}

input,select{
  color:#f5f7fb;
  border-color:rgba(171,190,220,.22);
  background:rgba(4,18,42,.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
input::placeholder{color:#7f8da6}
select option{color:#f5f7fb;background:#0b2042}
input:focus,select:focus{outline:2px solid rgba(226,185,72,.3);border-color:var(--cinema-gold);box-shadow:0 0 0 5px rgba(226,185,72,.06)}
.form label,.token-form label,.log-filters label,.document-filterbar label{color:#c1ccdc}
.primary{color:#07152c;background:linear-gradient(135deg,#f4d66e,#c79727);box-shadow:0 10px 24px rgba(202,154,39,.17)}
.primary:hover{background:linear-gradient(135deg,#ffe48b,#daaF3c)}
.ghost,.secondary{color:#e8edf6;background:rgba(255,255,255,.055);border:1px solid rgba(226,185,72,.2)}
.ghost:hover,.secondary:hover{background:rgba(226,185,72,.12);border-color:rgba(226,185,72,.44)}
.danger{color:#ffd8dc;background:rgba(174,57,71,.24);border:1px solid rgba(232,104,117,.28)}

.track{background:rgba(255,255,255,.07)}
.fill{background:linear-gradient(90deg,#b9871d,#f0d271);box-shadow:0 0 14px rgba(226,185,72,.32)}
.bar b,.bar strong{color:#f6f2e9}
.stored-secret,.info,.certificate-message,.token-result{
  color:#cbd5e4;
  border-color:rgba(226,185,72,.18);
  background:rgba(255,255,255,.04);
}
.certificate-message.error,.account-message.error{color:#ffd0d5;border-color:rgba(232,104,117,.36);background:rgba(151,38,54,.24)}

.table-wrap{border:1px solid rgba(226,185,72,.12);border-radius:12px;background:rgba(2,14,34,.42)}
table{color:#ecf0f7}
th{color:#d8bb67;border-bottom-color:rgba(226,185,72,.18);background:rgba(4,17,40,.88)}
td,#docsTable th,#docsTable td{background:transparent;border-bottom-color:rgba(172,188,214,.1)}
tbody tr{transition:background .15s ease}
tbody tr:hover{background:rgba(226,185,72,.055)}
td small{color:#92a1b8}
.actions-col{background:#0a1e3e!important;box-shadow:-14px 0 22px -18px #000}
.doc-actions .table-action{color:#f5d56d;background:rgba(226,185,72,.09)}
.doc-actions .pdf{color:#07152c!important;background:linear-gradient(135deg,#f0d36f,#c79727)!important}
.badge,.token-state{color:#9ef0d2;background:rgba(41,164,124,.18)}
.badge.cancel,.token-state.expired,.token-state.revoked{color:#ffabb3;background:rgba(195,61,77,.2)}

.certificate-card.inactive{background:rgba(42,53,76,.72);opacity:.78}
.certificate-card.warning,.cert-monitor article.status-warning{background:linear-gradient(145deg,rgba(70,54,19,.94),rgba(18,37,69,.96))}
.certificate-card.expired,.cert-monitor article.status-danger{background:linear-gradient(145deg,rgba(75,25,39,.94),rgba(20,35,66,.96))}
.cert-state{color:#8ce4c2}.warning .cert-state{color:#f4d66e}.expired .cert-state{color:#ff969f}
.token-result code{background:#030d20;border:1px solid rgba(226,185,72,.16)}

#notice{z-index:60}
.notice{background:linear-gradient(135deg,#102b53,#081a38);border:1px solid rgba(226,185,72,.3);border-left:4px solid var(--cinema-gold);box-shadow:0 18px 48px rgba(0,0,0,.38)}
.notice.error{background:linear-gradient(135deg,#7f2937,#3d1726);border-left-color:#ff8b96}

dialog{color:var(--cinema-text);border:1px solid rgba(226,185,72,.3);background:linear-gradient(150deg,#102b53,#06152f 72%);box-shadow:0 35px 100px rgba(0,0,0,.58),inset 0 1px 0 rgba(255,255,255,.06)}
dialog::backdrop{background:rgba(1,6,18,.82);backdrop-filter:blur(8px)}
.account-dialog{width:min(690px,calc(100vw - 28px));padding:0;overflow:hidden;border-radius:20px}
.account-dialog-head{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:15px;padding:25px 27px;border-bottom:1px solid rgba(226,185,72,.18);background:radial-gradient(circle at 15% 0,rgba(226,185,72,.15),transparent 42%)}
.account-dialog-head h2{margin:2px 0;font-size:24px}
.account-dialog-head p{margin:0;color:var(--cinema-muted)}
.account-avatar{display:grid;place-items:center;width:54px;height:54px;border-radius:17px;color:transparent;background:linear-gradient(145deg,#f5d773,#a97b17);box-shadow:0 10px 28px rgba(226,185,72,.2)}
.account-avatar::before{content:"";width:12px;height:12px;border:3px solid #10234a;border-radius:50%;box-shadow:0 15px 0 6px #10234a}
.dialog-close{width:38px;height:38px;border:1px solid rgba(255,255,255,.1);border-radius:10px;color:#fff;background:rgba(255,255,255,.05);font-size:24px;cursor:pointer}
.account-data{display:grid;grid-template-columns:1fr 1fr;gap:1px;padding:1px;background:rgba(226,185,72,.1)}
.account-data>div{padding:17px 26px;background:rgba(7,24,52,.97)}
.account-data small{display:block;color:#8292ad;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.account-data strong{display:block;margin-top:5px;color:#f7f4ed;overflow-wrap:anywhere}
.change-password-form{display:grid;gap:13px;padding:25px 27px}
.change-password-form label{color:#c4cede;font-size:12px;font-weight:750}
.change-password-form input{margin-top:6px}
.account-section-title{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:2px}
.account-section-title span{color:var(--cinema-gold);font-size:10px;font-weight:850;letter-spacing:.15em;text-transform:uppercase}
.account-section-title h3{margin:2px 0 0;font-size:19px}
.account-section-title small{color:#8493aa;text-align:right}
.account-message{margin:0;padding:11px 13px;border:1px solid rgba(84,202,158,.28);border-radius:9px;color:#a7efd4;background:rgba(34,137,103,.16)}
.account-dialog-actions{display:flex;justify-content:space-between;gap:10px;padding:17px 27px;border-top:1px solid rgba(226,185,72,.14);background:rgba(2,13,31,.46)}
.portal-dialog-link{text-decoration:none;text-align:center}

@media(max-width:720px){
  body::before{display:none}
  aside{border-right:0;border-bottom:1px solid rgba(226,185,72,.22)}
  main{padding:16px 11px}
  header{padding:16px;align-items:flex-start;flex-direction:column}
  .header-actions{width:100%;justify-content:flex-start}
  .portal-link,.account-trigger{flex:1 1 auto;justify-content:center}
  header #authButton{max-width:none}
  .cards article:hover{transform:none}
  .account-data{grid-template-columns:1fr}
  .account-dialog-head,.change-password-form,.account-dialog-actions{padding-left:18px;padding-right:18px}
  .account-section-title{align-items:flex-start;flex-direction:column}
  .account-section-title small{text-align:left}
  .account-dialog-actions{flex-direction:column}
}
