:root{color-scheme:dark;--bg:#0a0f13;--surface:#121a20;--panel:#172027;--panel2:#1e2930;--gold:#c3a46a;--gold-bright:#e2c38a;--text:#f4eddf;--muted:#9da7a7;--border:#344047;--danger:#ef9191;--ok:#98c9ad;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 92% 5%,#1b242c 0,transparent 44%),var(--bg);color:var(--text);min-height:100vh}
button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:var(--gold-bright);text-decoration:none}a:hover{text-decoration:underline}
h1,h2,h3,h4{font-family:Georgia,"Times New Roman",serif;margin:0;font-weight:600;line-height:1.15}h1{font-size:clamp(2rem,4vw,3.4rem)}h2{font-size:1.65rem}h3{font-size:1.22rem}p{line-height:1.65;margin:.4rem 0 0}small,.muted{color:var(--muted)}
button{border:1px solid transparent;border-radius:9px;padding:10px 16px;color:var(--text);background:var(--panel2);transition:background .16s,transform .16s}button:hover{transform:translateY(-1px);background:#2a353b}button:disabled{opacity:.5;cursor:not-allowed;transform:none}
button.primary{background:var(--gold);color:#171a1d;font-weight:750}button.primary:hover{background:var(--gold-bright)}button.outline{background:transparent;border-color:var(--border)}button.ghost{background:transparent;color:var(--gold-bright);padding:9px}
input,select,textarea{background:#0d1419;border:1px solid var(--border);color:var(--text);border-radius:9px;min-height:44px;padding:11px 13px;width:100%;outline:0}
input:focus,textarea:focus,select:focus{border-color:var(--gold);box-shadow:0 0 0 3px #c3a46a22}textarea{min-height:100px;resize:vertical}label{display:block;font-size:.83rem;color:#c7c5bd;font-weight:650;margin-bottom:6px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.eyebrow{font-size:.68rem;text-transform:uppercase;letter-spacing:.2em;color:var(--gold);font-weight:750}
.loading-screen{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted)}.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--gold);color:var(--gold);border-radius:12px;font-size:28px;box-shadow:inset 0 0 16px #c3a46a22}
.auth-page{min-height:100vh;display:grid;grid-template-columns:1fr minmax(370px,510px)}.auth-art{padding:clamp(30px,6vw,90px);position:relative;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;background:radial-gradient(circle at 50% 70%,#57462c40,transparent 40%),repeating-linear-gradient(90deg,#0e1419 0px,#131c24 58px,#25313a 60px,#0b1015 68px),linear-gradient(#0e161d,#06090d)}
.auth-art:before{content:"";position:absolute;inset:8% 16%;border:1px solid #c3a46a2b;border-top:0;border-bottom:0;pointer-events:none}.auth-art:after{content:"✧";position:absolute;font-size:clamp(160px,28vw,400px);color:#c3a46a10;top:10%;left:22%;pointer-events:none}
.auth-art>*{position:relative;z-index:1}.auth-art h1{max-width:620px;margin:25px 0;color:#f7efdf}.auth-art p{max-width:400px;color:#b4aea2}.auth-side{padding:44px clamp(24px,4vw,62px);background:#0d1419;display:flex;flex-direction:column;justify-content:center;border-left:1px solid var(--border)}
.auth-side h2{margin:28px 0 12px}.auth-side p{color:var(--muted);font-size:.91rem}.form-field{margin:15px 0}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.form-actions>*{flex:1}.auth-foot{margin-top:25px;font-size:.82rem}.auth-foot button{padding:0;border:0;background:none;color:var(--gold);text-align:left}
.shell{max-width:1500px;margin:auto;min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}.sidebar{border-right:1px solid var(--border);background:#0d1419;padding:27px 17px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:20px}
.brand{display:flex;gap:12px;align-items:center;padding:0 7px}.brand-text strong{font-family:Georgia,serif;font-size:1.15rem;display:block}.brand-text small{display:block;font-size:.62rem;text-transform:uppercase;letter-spacing:.18em;color:var(--gold)}
.nav{display:flex;flex-direction:column;gap:7px}.nav button{display:flex;gap:12px;text-align:left;align-items:center;background:transparent;width:100%;padding:13px;border-radius:9px;color:#bfc5c3}.nav button:hover,.nav button.active{background:#243038;color:var(--text);text-decoration:none}.nav button.active{border:1px solid #c3a46a55}.nav-icon{width:23px;color:var(--gold);text-align:center}
.sidebar-bottom{margin-top:auto;border-top:1px solid var(--border);padding-top:20px}.profile{padding:11px;border-radius:12px;background:#152027}.profile strong{display:block;font-size:.86rem}.profile span{font-size:.73rem;color:var(--gold)}.sidebar .logout{width:100%;text-align:left;margin-top:10px}
.main{min-width:0;padding:34px clamp(17px,4vw,54px) 65px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:38px}.topbar small{letter-spacing:.12em;text-transform:uppercase;font-size:.65rem}.grade-badge{border:1px solid #816e4c;color:var(--gold);border-radius:50px;padding:9px 12px;font-size:.73rem;white-space:nowrap}
.hero{padding:38px clamp(22px,4vw,46px);background:radial-gradient(circle at 91% 30%,#6a502f3b,transparent 40%),linear-gradient(135deg,#152129,#101719);border:1px solid #554932;border-radius:18px;position:relative;overflow:hidden}.hero:after{content:"✧";position:absolute;right:5%;top:-40px;font-size:200px;color:#c3a46a15;pointer-events:none}
.hero h1{max-width:700px;margin:9px 0 12px;position:relative;z-index:1}.hero p{color:#cbc5b7;max-width:610px;position:relative;z-index:1}.hero>*{position:relative;z-index:1}
.search-box{display:flex;gap:11px;margin-top:28px;max-width:900px}.search-box input{height:58px;padding:16px 20px;background:#f3ecdf;color:#1e2528;border-color:transparent;font-size:1rem}.search-box input::placeholder{color:#717976}.search-box button{min-width:120px}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:30px 0 16px}.section-head p{margin-top:4px;color:var(--muted);font-size:.85rem}
.filters{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;margin:20px 0}.chips{display:flex;flex-wrap:wrap;gap:9px}.chips button{border:1px solid var(--border);background:#152026;color:#c6cecc;font-size:.82rem}.chips button.on{border-color:var(--gold);color:var(--gold-bright);background:#2a2b25}
.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:15px}.book{border:1px solid var(--border);background:#121b21;border-radius:13px;overflow:hidden;display:flex;flex-direction:column;min-height:300px}.book-cover{height:135px;background:radial-gradient(circle at 80% 20%,#7c623439,transparent 50%),repeating-linear-gradient(115deg,#243038,#1c2b34 12px,#17232a 15px);display:flex;align-items:center;justify-content:center;border-bottom:1px solid #6b5b3d54}.book-glyph{font-family:Georgia,serif;font-size:64px;color:#cfad72;text-shadow:0 4px 20px #000;transform:rotate(-9deg)}
.book-body{padding:15px;display:flex;flex-direction:column;gap:9px;flex:1}.book-body h3{font-size:1.14rem;min-height:2.5em}.book-body small{font-size:.72rem;line-height:1.5}.book-body button{margin-top:auto}.pill{display:inline-block;color:var(--gold);font-size:.67rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.panel{background:#141e24;border:1px solid var(--border);border-radius:14px;padding:22px;margin-top:18px}.panel h3{margin-bottom:15px}.panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.form-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.span2{grid-column:1/-1}
.admin-nav{display:flex;gap:10px;flex-wrap:wrap}.admin-nav button{border:1px solid var(--border)}.admin-nav .active{border-color:var(--gold);color:var(--gold-bright)}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:.82rem;min-width:600px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--border);vertical-align:middle}th{color:var(--gold);font-size:.7rem;text-transform:uppercase;letter-spacing:.05em}td small{display:block;margin-top:3px}td select{min-width:110px;height:37px;min-height:37px;padding:5px}td button{white-space:nowrap}
.checkline{display:inline-flex;gap:7px;align-items:center;margin:8px 17px 8px 0;color:var(--text);font-size:.85rem}.checkline input{width:17px;height:17px;min-height:0;margin:0;accent-color:var(--gold)}
.empty{border:1px dashed #465158;background:#131c22;border-radius:12px;padding:35px 20px;text-align:center;color:var(--muted)}.empty strong{display:block;color:var(--text);margin-bottom:7px}
.notice{padding:13px 16px;border:1px solid #6b5b3d;background:#3c33241c;border-radius:9px;color:var(--gold-bright);font-size:.85rem;margin:15px 0}.error{color:var(--danger);border-color:#813e3e;background:#3c2222aa}.success{color:var(--ok);border-color:#416950;background:#203329}
.toast{position:fixed;right:20px;bottom:18px;max-width:min(450px,90vw);background:#27352d;border:1px solid #547459;padding:15px 20px;border-radius:12px;color:#e4f4e6;box-shadow:0 10px 40px #0009;z-index:50}.toast.error{background:#3d2224;border-color:#a55a5a;color:#ffd9d9}
.modal-shade{position:fixed;inset:0;background:#000b;display:flex;align-items:center;justify-content:center;z-index:20;padding:20px}.modal{max-width:600px;width:100%;background:#172028;border:1px solid #6c5a40;border-radius:17px;padding:25px;box-shadow:0 30px 80px #000c}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.modal .meta{color:var(--gold);font-size:.75rem;letter-spacing:.07em;text-transform:uppercase}.modal p{margin:15px 0;color:#d6d7d1}
.top-mobile{display:none}.small-stack{display:flex;flex-direction:column;gap:10px}.grid-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:950px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:static;display:block;padding:14px 18px}.sidebar-bottom{display:none}.sidebar .nav{flex-direction:row;margin-top:14px;gap:5px;overflow-x:auto}.sidebar .nav button{width:auto;white-space:nowrap;flex-shrink:0}.sidebar .brand{justify-content:space-between}.main{padding:25px 18px 80px}.topbar{margin-bottom:20px}.auth-page{grid-template-columns:1fr}.auth-art{min-height:230px;padding:25px}.auth-art h1{font-size:2rem}.auth-side{min-height:500px;border-left:0;border-top:1px solid var(--border)}}
@media(max-width:560px){.hero{padding:28px 18px}.hero:after{font-size:110px}.hero h1{font-size:2rem}.search-box{flex-direction:column}.search-box button{width:100%}.filters,.panel-grid,.form-split,.grid-info{grid-template-columns:1fr}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.book-cover{height:110px}.book-body{padding:11px}.book-body h3{font-size:1rem}.book-body button{font-size:.74rem;padding:8px}.panel{padding:15px}.topbar{align-items:flex-start}.grade-badge{font-size:.66rem}.section-head{align-items:start}.auth-side{padding:28px 21px}.auth-art{min-height:205px}.modal{padding:18px}}
@media(max-width:360px){.book-grid{grid-template-columns:1fr}.topbar{flex-wrap:wrap}}

@media(max-width:950px){.top-mobile{display:block}}


/* Navegação administrativa compacta e acessível */
.nav-submenu{display:flex;flex-direction:column;gap:8px;margin:12px 0 10px 14px;padding:4px 0 4px 16px;border-left:1px solid #7e6844}
.nav-submenu button{font-size:.79rem;padding:11px 12px!important;color:#b4bab8!important;text-align:left;min-height:42px}
.nav-submenu button.active{color:var(--gold-bright)!important;background:#31332c!important;border-color:#92784e!important}
.config-row{display:flex;align-items:center;gap:12px;margin-top:16px}
.config-row input{min-width:0;flex:1}
.config-row button{font-size:.76rem;padding:12px 14px;white-space:nowrap}
.config-create-form{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:23px 0 27px}
.config-create-form label{margin:0}
.config-create-form input{width:100%}
.config-create-form button{display:block;margin:3px 0 0;min-height:44px}
.panel-grid>.panel{margin-top:18px}
.activation .auth-art{background:radial-gradient(circle at 65% 47%,#a9854638,transparent 42%),repeating-linear-gradient(90deg,#0e141a 0,#16222a 56px,#26333a 59px,#0a1016 69px)}
.activation .auth-art:after{content:"✧";color:#c3a46a1b}
.activation .auth-side{background:#101b21;border-left:1px solid #786345}
.activation .auth-side h2{color:#f6eedb}
.activation .form-field input[name="cpf"]{font-variant-numeric:tabular-nums;letter-spacing:.02em}
.activation .notice{margin:20px 0 9px}
@media(max-width:950px){.sidebar .nav{flex-wrap:wrap}.nav-submenu{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;margin:10px 0 4px;border-left:0;padding:4px 0;width:100%}.nav-submenu button{width:auto!important;flex-shrink:0}.activation .auth-art{min-height:250px}}
@media(max-width:560px){.config-row{flex-wrap:wrap}.config-row input{flex-basis:100%}.nav-submenu{overflow-x:auto;flex-wrap:nowrap}}


/* Gestão compacta de categorias, Graus e tipos */
.catalog-manager{padding:24px 26px}
.catalog-tabs{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--border);padding-bottom:12px;margin-bottom:14px}
.catalog-tabs button{background:transparent;border:1px solid transparent;color:var(--muted);padding:10px 14px;border-radius:9px;font-weight:650;white-space:nowrap}
.catalog-tabs button.active{background:#27313a;border-color:#806b49;color:var(--gold-bright)}
.catalog-tab-count{display:inline-flex;align-items:center;justify-content:center;margin-left:7px;padding:2px 7px;border-radius:99px;background:#ffffff12;color:inherit;font-size:.7rem;font-weight:650}
.catalog-hint{color:var(--muted);font-size:.85rem;margin:0 0 21px;max-width:760px}
.catalog-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.catalog-search-wrap{min-width:0;width:100%;max-width:580px}
.catalog-search-wrap label{margin-bottom:7px}
.catalog-search-wrap input{min-height:46px}
.catalog-add{flex-shrink:0;min-height:46px;white-space:nowrap}
.catalog-result-line{display:flex;justify-content:space-between;gap:12px;font-size:.75rem;color:var(--muted);padding:0 2px 11px}
.catalog-list{max-height:610px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--border);border-radius:12px;background:#0f171d}
.catalog-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;min-height:72px;border-bottom:1px solid var(--border)}
.catalog-item:last-child{border-bottom:0}
.catalog-item:hover{background:#19252b}
.catalog-item[hidden],.catalog-empty-search[hidden]{display:none!important}
.catalog-item-details{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.catalog-item-details strong{font-family:inherit;font-size:.92rem;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.catalog-item-details span{color:var(--muted);font-size:.75rem;line-height:1.4;overflow-wrap:anywhere}
.catalog-item-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.catalog-item-actions button{min-height:36px;padding:7px 12px;font-size:.79rem}
.catalog-remove{color:#e2aaa4!important}
.catalog-empty-search{padding:28px;text-align:center;color:var(--muted);font-size:.85rem}
.catalog-modal{max-width:500px}
.catalog-modal .form-field{margin:15px 0}
.catalog-modal textarea{min-height:90px}
.catalog-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.catalog-dialog-actions button{min-height:42px}
@media(max-width:760px){
  .catalog-manager{padding:18px}
  .catalog-toolbar{align-items:stretch;flex-direction:column;gap:11px}
  .catalog-search-wrap{max-width:none}
  .catalog-add{width:100%}
  .catalog-result-line span:last-child{display:none}
  .catalog-list{max-height:560px}
  .catalog-item{gap:8px;padding:12px}
  .catalog-item-actions{gap:4px}
  .catalog-item-actions button{padding:8px;font-size:.75rem}
}
@media(max-width:430px){
  .catalog-tabs button{padding:9px}
  .catalog-tab-count{margin-left:3px}
  .catalog-item{flex-wrap:wrap}
  .catalog-item-details{flex-basis:100%}
  .catalog-item-actions{margin-left:auto}
  .catalog-dialog-actions{flex-direction:column-reverse}
  .catalog-dialog-actions button{width:100%}
}


/* Exclusão assistida de classificações com vínculos preservados */
.catalog-delete-usage{font-size:.92rem;color:var(--text);background:#26313a;border:1px solid var(--border);border-radius:10px;padding:12px 14px;margin:17px 0}
.catalog-modal .catalog-confirm{align-items:flex-start;line-height:1.5;margin:14px 0}
.catalog-modal .catalog-confirm input{flex-shrink:0;margin-top:3px}
.danger-action{background:#803c3d;border:1px solid #a55758;color:#fff;min-height:42px;font-weight:650}
.danger-action:hover{background:#974548}
.danger-action:disabled{opacity:.45;cursor:not-allowed}


/* Envio de trabalhos e análise do Bibliotecário */
.contribution-list,.review-list{display:flex;flex-direction:column;gap:14px}
.contribution-item{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--border)}
.contribution-item:last-child{border-bottom:0}
.contribution-item>div{min-width:0;display:flex;flex-direction:column;gap:6px}
.contribution-item strong{overflow-wrap:anywhere}
.contribution-item p{margin:6px 0}
.contribution-status{font-size:.8rem;font-weight:650}
.contribution-status.status-pending{color:#d5ae70}
.contribution-status.status-approved{color:#93c6a6}
.contribution-status.status-rejected{color:#e9a8a1}
.contribution-link{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;white-space:nowrap;border-radius:8px;text-decoration:none}
.review-header{display:flex;justify-content:space-between;align-items:center;gap:20px}
.review-header h3{margin-bottom:5px}
.review-header .outline{display:inline-flex;text-decoration:none;border-radius:9px;padding:11px 15px;white-space:nowrap}
.review-permissions{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;padding:19px;border-radius:10px;background:#0d161b;border:1px solid var(--border);margin:18px 0}
.review-permissions>strong{grid-column:1/-1}
.review-permissions .checkline{margin:0}
.review-actions{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(240px,1.3fr);gap:20px;align-items:start}
.review-actions>.primary{min-height:46px}
.review-reject{display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.review-reject textarea{width:100%;min-height:70px}
.review-reject>.outline{min-height:40px}
@media(max-width:760px){
 .review-header,.contribution-item{flex-direction:column;align-items:stretch}
 .review-header .outline,.contribution-link{width:100%}
 .review-actions{grid-template-columns:1fr}
 .review-reject>.outline{width:100%}
}


/* Hierarquia, elevações e revisão editorial */
.review-editor{margin:18px 0 16px}
.review-editor .form-field small{display:block;margin-top:7px;color:var(--muted);font-size:.78rem}
.review-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.review-buttons button{min-height:42px}
.promotion-item{display:grid;grid-template-columns:minmax(190px,1fr) minmax(220px,1fr);gap:18px;align-items:center;border-bottom:1px solid var(--border);padding:18px 0}
.promotion-item:last-child{border-bottom:0}
.promotion-item p{margin:7px 0}
.promotion-item .form-field{min-width:0}
.promotion-item .review-buttons{grid-column:1/-1;margin:0}
.grade-members-list{display:flex;flex-direction:column}
.grade-member-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 0;border-bottom:1px solid var(--border)}
.grade-member-row:last-child{border-bottom:0}
.grade-member-row>div{display:flex;align-items:center;gap:10px;flex:1;max-width:620px}
.grade-member-row strong{flex:1;min-width:150px;overflow-wrap:anywhere}
.grade-member-row select{flex:1;min-width:130px}
.grade-member-row button{white-space:nowrap}
@media(max-width:820px){
 .promotion-item{grid-template-columns:1fr}
 .promotion-item .review-buttons{grid-column:auto}
 .grade-member-row{flex-direction:column;align-items:stretch}
 .grade-member-row>div{max-width:none}
}
@media(max-width:480px){
 .grade-member-row>div{flex-direction:column;align-items:stretch}
 .grade-member-row button{width:100%}
 .review-buttons button{width:100%}
}


/* Exclusão de cadastros e documentos: ação destrutiva bem distinguida */
button.destructive,.outline.destructive{
  color:#edb6af;border-color:#8a4e4a;background:#321f21;
}
button.destructive:hover,.outline.destructive:hover{
  color:#fff;border-color:#d47d76;background:#5a2c2f;
}
.doc-manager-search{display:flex;align-items:flex-end;gap:12px;margin:18px 0 6px}
.doc-manager-search .form-field{flex:1;min-width:0;margin:0}
.doc-manager-search button{min-height:45px;white-space:nowrap}
.doc-manager-note{font-size:.77rem;margin:0 0 14px}
.manage-document-list{display:flex;flex-direction:column}
.manage-document-item{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--border);padding:17px 0}
.manage-document-item:last-child{border-bottom:0}
.manage-document-item>div{min-width:0}
.manage-document-item strong{font-size:.95rem;overflow-wrap:anywhere}
.manage-document-item p{font-size:.83rem;margin:5px 0;overflow-wrap:anywhere}
.member-summary{display:flex;flex-direction:column;gap:5px;flex:1;min-width:150px}
.member-summary .muted{font-size:.76rem}
.member-actions{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.member-actions select{min-width:120px;flex:1}
.member-actions button{white-space:nowrap}
@media(max-width:760px){
 .doc-manager-search{flex-direction:column;align-items:stretch}
 .doc-manager-search button{width:100%}
 .manage-document-item{flex-direction:column;align-items:stretch}
 .manage-document-item button{width:100%}
 .member-actions{flex-wrap:wrap}
 .member-actions button{flex:1}
}
@media(max-width:450px){
 .member-actions{flex-direction:column;align-items:stretch}
 .member-actions button{width:100%}
 .member-actions select{width:100%}
}


/* Identidade visual da A∴R∴L∴S∴ Integração e Ciência nº 4.462.
   Brasão oficial reutilizado do projeto Scorp-Lodge. */
.lodge-identity{display:flex;align-items:center;gap:12px;min-width:0}
.lodge-emblem{width:54px;height:54px;flex:0 0 54px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #c4a16699;border-radius:50%;background:#12263b;box-shadow:0 0 0 3px #c3a46a14}
.lodge-emblem img{display:block;width:100%;height:100%;object-fit:contain}
.lodge-name{display:flex;flex-direction:column;gap:2px;min-width:0}
.lodge-name .lodge-kicker{font-size:.59rem;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:var(--gold)}
.lodge-name strong{font-family:Georgia,"Times New Roman",serif;font-size:1.04rem;line-height:1.18;font-weight:650;color:var(--text);text-wrap:balance}
.lodge-name small{color:#b6bfca;font-size:.59rem;letter-spacing:.045em;line-height:1.35}
.sidebar .brand{margin:0;padding:0 3px 18px;border-bottom:1px solid #c3a46a36;align-items:center}
.sidebar .lodge-sidebar{width:100%}
.sidebar .lodge-name strong{font-size:1.02rem}
.auth-crest{width:112px;height:112px;padding:6px;border:1px solid #c3a46a6b;border-radius:50%;background:#0d2133;box-shadow:0 0 0 7px #c3a46a0f,0 12px 36px #0007;margin-bottom:36px}
.auth-crest img{width:100%;height:100%;object-fit:contain;border-radius:50%}
.auth-art{background:radial-gradient(circle at 72% 24%,#29486c90,transparent 49%),linear-gradient(135deg,#0c1e33,#0e1823 78%);border-right:1px solid #8b70423b}
.auth-art h1{max-width:710px}
.auth-art .eyebrow{color:#e0bf80}
.auth-side .lodge-auth{padding:0 0 20px;border-bottom:1px solid #c3a46a3d;margin-bottom:23px}
.auth-side .lodge-auth .lodge-emblem{width:62px;height:62px;flex-basis:62px}
.auth-side .lodge-auth .lodge-name strong{font-size:1.25rem}
.auth-side h2{margin:10px 0 12px}
@media(max-width:950px){
 .sidebar .brand{justify-content:flex-start}
 .sidebar .lodge-identity{max-width:400px}
 .auth-crest{width:77px;height:77px;margin-bottom:16px}
 .auth-art h1{font-size:clamp(1.6rem,5vw,2.3rem)}
}
@media(max-width:460px){
 .sidebar .lodge-emblem{width:46px;height:46px;flex-basis:46px}
 .sidebar .lodge-name strong{font-size:.95rem}
 .auth-side .lodge-auth .lodge-name strong{font-size:1.04rem}
 .auth-side .lodge-auth .lodge-emblem{width:51px;height:51px;flex-basis:51px}
}


/* Login: composição centralizada e altura compacta no celular. */
.auth-title-mobile{display:none}
.auth-page{grid-template-columns:minmax(0,1fr) minmax(390px,510px);min-height:100dvh}
.auth-art{
  isolation:isolate;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:30px;
  padding:clamp(30px,5vw,80px);
  text-align:center;
}
.auth-page:not(.activation) .auth-art{
  background:
    radial-gradient(ellipse at 50% 40%,#2b46668c,transparent 64%),
    linear-gradient(155deg,#0d1c30 0%,#142941 47%,#0b1420 100%);
}
.auth-art:before{inset:8% 9%;border-color:#c3a46a19}
.auth-art:after{
  top:50%;left:50%;transform:translate(-50%,-50%);
  color:#c3a46a0b;
  font-size:clamp(190px,28vw,380px);
}
.auth-art>div:first-child{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
  max-width:790px;
}
.auth-crest{
  width:152px;height:152px;
  padding:8px;
  margin:0 0 24px;
  flex-shrink:0;
  border-color:#c3a46a94;
  box-shadow:0 0 0 10px #c3a46a0d,0 16px 42px #02081266;
}
.auth-art .eyebrow{letter-spacing:.19em;line-height:1.5}
.auth-art h1{
  font-size:clamp(2.1rem,2.7vw,3rem);
  line-height:1.2;
  letter-spacing:-.018em;
  text-wrap:balance;
  max-width:760px;
  margin:22px auto 16px;
}
.auth-art p{
  max-width:540px;
  color:#cfdae1;
  font-size:clamp(.95rem,1.15vw,1.06rem);
  line-height:1.65;
  margin:0 auto;
  text-wrap:pretty;
}
.auth-art>.eyebrow{font-size:.67rem;letter-spacing:.24em;padding-top:12px}
@media(max-width:950px){
  .auth-page{grid-template-columns:1fr}
  .auth-art{
    min-height:0;
    gap:16px;
    padding:36px 28px 32px;
  }
  .auth-crest{width:124px;height:124px;margin:0 0 18px}
  .auth-art h1{font-size:clamp(1.9rem,3.8vw,2.55rem);margin:12px auto}
  .auth-art p{max-width:510px}
  .auth-art>.eyebrow{padding-top:5px}
  .auth-side{
    min-height:0;
    padding:36px clamp(22px,7vw,48px) 48px;
    justify-content:flex-start;
  }
  .auth-side>div{width:100%;max-width:540px;margin-inline:auto}
}
@media(max-width:560px){
  .auth-title-desktop{display:none}
  .auth-title-mobile{display:inline}
  .auth-art{
    min-height:0;
    gap:0;
    padding:25px 18px 24px;
  }
  .auth-art:before{inset:14px 17px}
  .auth-art:after{font-size:170px}
  .auth-crest{width:102px;height:102px;padding:6px;margin:0 0 15px;box-shadow:0 0 0 7px #c3a46a10,0 12px 30px #0006}
  .auth-art .eyebrow{font-size:.57rem;letter-spacing:.12em}
  .auth-art h1{
    max-width:360px;
    font-size:clamp(1.38rem,5.15vw,1.65rem);
    letter-spacing:-.008em;
    line-height:1.23;
    margin:11px auto 11px;
  }
  .auth-art p{
    font-size:.84rem;
    line-height:1.48;
    max-width:340px;
  }
  .auth-art>.eyebrow{display:none}
  .auth-side{
    min-height:0;
    padding:23px 22px 36px;
  }
  .auth-side .lodge-auth{display:none}
  .auth-side h2{font-size:1.6rem;margin:0 0 7px}
  .auth-side p{font-size:.87rem;line-height:1.5}
  .auth-side .form-field{margin:12px 0}
  .auth-side .auth-foot{margin-top:17px}
}


/* Controle de acesso do upload: modo geral OU seleção específica, nunca ambos. */
.permission-fieldset{min-width:0;margin:0;padding:0;border:0}
.permission-fieldset legend{display:block;width:100%;font-weight:700;font-size:.86rem;padding:0 0 9px;color:var(--text)}
.permission-choices{display:flex;flex-wrap:wrap;gap:10px}
.permission-choice{display:inline-flex;align-items:center;gap:9px;min-height:43px;padding:10px 14px;border:1px solid var(--border);background:#0d161b;border-radius:9px;font-size:.88rem;cursor:pointer}
.permission-choice:has(input:checked){border-color:var(--gold);color:var(--gold-bright);background:#c3a46a1b}
.permission-choice input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--gold)}
.permission-grades{margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:10px;background:#0e171c}
.permission-grades[hidden]{display:none!important}
.permission-grades p{font-size:.8rem;margin:0 0 10px}
.permission-grade-options{display:flex;flex-wrap:wrap;gap:6px 15px}
.permission-grade-options .checkline{margin:4px 0}
/* Ação de excluir isolada visualmente do estado do documento. */
.document-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:14px;flex-wrap:wrap;min-width:max-content}
.document-row-actions .document-action-status{font-size:.83rem;white-space:nowrap}
.document-row-actions .destructive{flex-shrink:0}
@media(max-width:650px){
  .permission-choices{flex-direction:column}
  .permission-choice{width:100%}
  .permission-grade-options{flex-direction:column}
}
