/* Shared form rhythm, restrained flat surfaces, keyboard-visible controls. */
#admin-shell .search-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#admin-shell .search-row>input,#admin-shell .search-row>select,#admin-shell .search-row>label,#admin-shell .search-row>button{margin:0}
#admin-shell input:not([type=checkbox]):not([type=radio]),#admin-shell select,#admin-shell button:not(.icon):not(.quiet):not(.user-link){min-height:44px;box-sizing:border-box}
#admin-shell .search-row button,#admin-shell .import-row button{height:44px;flex:none;white-space:nowrap}
#admin-shell .setting-row{align-items:center;gap:24px;min-height:76px}
#admin-shell .setting-row>label,#admin-shell .setting-row>div>label{margin:0}
#admin-shell .setting-row>input,#admin-shell .setting-row>select{margin:0;width:240px;max-width:100%;flex:none}
#admin-shell .setting-row p{margin:5px 0 0;max-width:60ch}
#admin-shell .dialog-actions{align-items:center;gap:12px}
#admin-shell input[type=file]{padding:0 12px 0 0;line-height:42px;background:var(--admin-field, #0b1926);border:1px solid var(--admin-control-line, #284459);border-radius:6px;min-width:0}
#admin-shell input[type=file]::file-selector-button{font:inherit;color:var(--admin-accent-ink, #bcefff);background:var(--admin-field, #133548);border:0;border-right:1px solid var(--admin-control-line, #284459);border-radius:5px 0 0 5px;padding:0 16px;margin-right:12px;line-height:42px;cursor:pointer}
#admin-shell input[type=file]::file-selector-button:hover{background:var(--admin-hover, #1a4a62)}
.import-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.import-row input{flex:1;min-width:240px}.import-row input,.import-row button{margin:0}
#admin-shell .host-resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin:26px 0;padding:24px 0;border-block:1px solid var(--admin-line, #263747)}
.resource-measure{min-width:0;padding:0 20px 0 0;border-right:1px solid var(--admin-line, #263747);display:flex;flex-direction:column;gap:8px}.resource-measure:nth-child(4){border:0}.resource-measure strong{font-size:calc(27px + var(--admin-font-increment,0px));font-weight:600;line-height:1.2;white-space:nowrap}.resource-measure small{font-size:var(--admin-text-detail,12px);color:var(--admin-muted-ink, #8da7bb);min-height:2.8em}.resource-measure>span{font-size:var(--admin-text-detail,13px);color:var(--admin-accent-ink, #bce5fa)}.resource-caption{grid-column:1/-1;color:var(--admin-muted-ink, #8da7bb);font-size:var(--admin-text-detail,12px);margin:0}
.form-note{color:var(--admin-muted-ink, #91abc1);max-width:78ch;font-size:var(--admin-text-detail,13px);line-height:1.65}.status-note{padding:14px 0;color:var(--admin-accent, #a4dff4);border-bottom:1px solid var(--admin-line, #263747)}.number-input{max-width:150px}.profile-limits{width:100%;table-layout:fixed}.profile-limits th,.profile-limits td{padding:12px}.profile-limits input{width:100%;margin:0}.profile-limits caption{text-align:left;color:var(--admin-muted-ink, #a4bfd0);padding:12px 0}.issue-path{font-size:var(--admin-text-detail,12px);overflow-wrap:anywhere;color:var(--admin-muted-ink, #91abc1)}.issue-item{border-bottom:1px solid var(--admin-line, #263747);padding:20px 0}.issue-item h3{margin:0 0 8px}.issue-item p{margin:6px 0}.issue-item .actions{margin-top:12px}.lookup-result{display:block;text-align:left;width:100%;padding:16px;margin:8px 0;border:1px solid var(--admin-line, #263747);background:transparent;border-radius:4px}.lookup-result strong,.lookup-result small{display:block}.lookup-result small{color:var(--admin-muted-ink, #91abc1);margin-top:8px}.lookup-result:hover{border-color:var(--admin-accent, #44d9ed);background:var(--admin-hover, #102432)}
.processing-detail{font-size:var(--admin-text-detail,12px);color:var(--admin-accent, #81cddd)}.form-error{color:#ffbcab;min-height:1.2em;overflow-wrap:anywhere}.settings-index small{line-height:1.5}.benchmark-result{padding:18px 0;border-bottom:1px solid var(--admin-line, #263747)}.form-save{display:flex;justify-content:flex-end;margin-top:24px}.network-local{padding:14px 18px;border-left:2px solid var(--admin-accent, #44d9ed);background:var(--admin-panel, #102432)}
#admin-shell :focus-visible{outline:2px solid var(--admin-accent, #50e1f4);outline-offset:3px}
@media(max-width:1100px){#admin-shell .host-resources{grid-template-columns:repeat(2,minmax(0,1fr))}.resource-measure:nth-child(2){border:0}.resource-measure strong{font-size:calc(24px + var(--admin-font-increment,0px))}}
@media(max-width:620px){#admin-shell .setting-row{align-items:flex-start;flex-direction:column;gap:12px;padding:18px 0}#admin-shell .setting-row>input,#admin-shell .setting-row>select{width:100%}.import-row{align-items:stretch;flex-direction:column}.import-row input{min-width:0;width:100%}.profile-limits th,.profile-limits td{padding:8px 3px}.profile-limits{font-size:var(--admin-text-detail,12px)}.resource-measure{padding-right:8px}.resource-measure strong{font-size:calc(20px + var(--admin-font-increment,0px))}#admin-shell .host-resources{gap:20px 12px}.search-row>*{max-width:100%}.form-save button{width:100%}}

.credits-page{max-width:780px;margin:8vh auto;padding:24px}.tmdb-logo{width:100px;height:auto;display:block;margin:24px 0}.credits-page .brand img{width:48px;height:48px}.credits-page .actions{margin-top:40px}
/* Consistent hierarchy for library names, paths and counts. */
.text-stack{display:flex;flex-direction:column;gap:6px;min-width:0;line-height:1.5}
.text-stack>small{display:block;color:var(--muted);font-size:var(--admin-text-detail,12px);overflow-wrap:anywhere}
#libraries .library-panel{padding:26px 0 18px}
#libraries .section-title{margin:0 0 14px;gap:24px;align-items:center}
.library-panel .section-title .text-stack>strong{font-size:calc(22px + var(--admin-font-increment,0px));font-weight:600}
#libraries .folder-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 0;border-top:1px solid var(--line)}
#libraries .folder-row>.text-stack{flex:1}
#libraries .folder-row>button{flex:none;align-self:center}
.library-language-summary{font-size:var(--admin-text-detail,12px);color:var(--admin-muted-ink, #8ea9c3);margin:0 0 22px;line-height:1.7}
#libraries-list{margin-top:24px}
#libraries .page-heading{gap:24px;flex-wrap:wrap}
#libraries .page-heading .actions{margin-left:auto}
#library-preferences-dialog{width:700px;max-width:calc(100vw - 36px)}
#library-preferences-dialog h2{font-size:24px}
#library-dialog{width:700px;max-width:calc(100vw - 36px)}
#library-dialog .section-title{margin-top:25px}
#new-library-languages{margin:20px 0;border-block:1px solid var(--line);padding:4px 0 10px}
#admin-shell .dialog-actions>button{margin:0}
#admin-shell .search-row{align-items:center}
@media(max-width:900px){#libraries .section-title{flex-wrap:wrap}.library-panel .section-title .actions{flex-wrap:wrap;justify-content:flex-start}#libraries .page-heading .actions{margin-left:0}.resource-measure strong{white-space:normal;overflow-wrap:anywhere}}
@media(max-width:620px){#libraries .folder-row{gap:12px}.library-panel .section-title .text-stack>strong{font-size:calc(20px + var(--admin-font-increment,0px))}.library-language-summary{max-width:40ch}#libraries .page-heading .actions{gap:8px}.text-stack{gap:7px}}

/* Addresses remain readable and copyable in the flat administration layout. */
.server-addresses{margin-bottom:32px}.server-address-row{display:grid;grid-template-columns:minmax(190px,1fr) minmax(260px,1.4fr);gap:24px;align-items:center;padding:18px 0;border-bottom:1px solid var(--line)}
.server-address-tools{display:flex;gap:12px;align-items:center;min-width:0}.server-address-tools>input{min-width:0;flex:1;width:100%;margin:0;font-variant-numeric:tabular-nums}.server-address-tools>button{flex:none;margin:0}
.network-pending{border-left:2px solid var(--admin-accent, #44d9ed);padding:12px 16px;color:var(--admin-accent-ink, #bcefff);background:var(--admin-panel, #102432);font-size:var(--admin-text-detail,13px);line-height:1.6}
#local-network-form .setting-section{margin-top:0;padding-top:24px}.form-save.actions{gap:12px;flex-wrap:wrap;align-items:stretch}
#network-form input[type=file]+label{display:block;margin-top:20px}
#overview>.section-title>[data-go=network-settings]{white-space:nowrap}
@media(max-width:1000px){.server-address-row{grid-template-columns:1fr;gap:12px}}
@media(max-width:620px){.server-address-tools{gap:8px}.server-address-tools>input{font-size:var(--admin-text-detail,12px)}.form-save.actions>button{width:auto;flex:1}}

/* Flat journal rows: cause, episode and action are never hidden in disclosures. */
.journal-tabs{margin:20px 0 26px;flex-wrap:wrap}.journal-tabs button{margin:0}
.journal-counts{display:flex;flex-wrap:wrap;gap:8px 26px;border-block:1px solid var(--line);padding:4px 0}
#admin-shell .journal-count{display:flex;align-items:center;gap:10px;margin:0;padding:15px 0;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted)}
#admin-shell .journal-count.active{border-bottom-color:var(--cyan);color:var(--text)}
.journal-count-number{font-variant-numeric:tabular-nums;font-size:calc(18px + var(--admin-font-increment,0px));color:var(--text)}
#journal-total-note{font-size:var(--admin-text-detail,12px);margin:10px 0 24px;max-width:none}
#journal-tools{margin:0 0 18px;max-width:none;flex-wrap:wrap;gap:12px}#journal-tools select{width:auto;max-width:100%}
#journal-status{max-width:95ch;margin:18px 0 26px}#journal-export-result{padding:12px 16px;border-left:2px solid var(--cyan);background:var(--admin-panel, #102432);max-width:none;overflow-wrap:anywhere}
#admin-shell .journal-section-heading{font-size:calc(17px + var(--admin-font-increment,0px));margin:30px 0 0;padding-bottom:14px;border-bottom:1px solid var(--line);font-weight:500;color:var(--admin-muted-ink, #a4bfd0)}
.journal-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:36px;padding:24px 0;border-bottom:1px solid var(--line)}
.journal-main{min-width:0}.journal-item-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
#admin-shell .journal-item-heading h3{font-size:21px;font-weight:600;margin:0;overflow-wrap:anywhere}
.journal-episode{font-variant-numeric:tabular-nums;color:var(--cyan);font-size:var(--admin-text-body,14px);white-space:nowrap}
.journal-context{font-size:var(--admin-text-detail,12px);color:var(--muted);margin:7px 0 16px;line-height:1.6}
.journal-problem{margin:0 0 7px;line-height:1.6;font-size:var(--admin-text-lead,15px);color:var(--text)}
.journal-language{font-size:var(--admin-text-detail,12px);color:var(--muted);margin:0 0 12px}
.journal-explanation{max-width:85ch;font-size:var(--admin-text-detail,13px);line-height:1.7;color:var(--admin-muted-ink, #a4bfd0);margin:7px 0}
.journal-row-actions{display:flex;flex-direction:column;align-items:stretch;gap:9px;min-width:210px;max-width:245px}
#admin-shell .journal-row-actions button{margin:0;white-space:normal;line-height:1.5}
.journal-detail{margin-top:14px;font-size:var(--admin-text-detail,12px);color:var(--muted)}
.journal-detail>summary{cursor:pointer;display:list-item;padding:6px 0;color:var(--admin-accent, #92ccdf)}
.journal-file-detail{padding:10px 0;border-bottom:1px solid var(--line)}.journal-file-detail p{margin:6px 0}.journal-detail .form-note{font-size:var(--admin-text-detail,12px)}
#scan-note:empty{display:none}
@media(max-width:1000px){.journal-item{grid-template-columns:1fr;gap:18px}.journal-row-actions{flex-direction:row;flex-wrap:wrap;max-width:none;min-width:0;justify-content:flex-start}.journal-row-actions>button{min-height:44px}.journal-counts{gap:4px 20px}}
@media(max-width:620px){#journal-tools select{width:100%}#journal-tools{gap:10px}#journal-tools button{flex:1}#journal-export{flex-basis:100%}#admin-shell .journal-count{font-size:var(--admin-text-detail,12px);padding:12px 0}.journal-counts{gap:0 18px}#admin-shell .journal-item-heading h3{font-size:19px}.journal-row-actions{flex-direction:column;align-items:stretch}.journal-item{padding:22px 0}}

.journal-check{margin:24px 0 30px;padding:22px 0;border-block:1px solid var(--line)}
.journal-check-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}
.journal-check-heading h2{margin:0;font-size:21px}.journal-check-heading button{margin:0}
.journal-check p{line-height:1.65;overflow-wrap:anywhere}.journal-check .issue-path{display:block;overflow-wrap:anywhere}
#journal-check-target{margin:8px 0 16px}
#journal-check-progress:indeterminate::-webkit-progress-bar{background:transparent}
#journal-check-progress:indeterminate::-moz-progress-bar{background:transparent}
.journal-check[data-outcome=success] h2{color:#70dc8d}.journal-check[data-outcome=partial] h2,.journal-check[data-outcome=failed] h2{color:#edbc8c}
.journal-check-detail{padding:12px 0;border-top:1px solid var(--line)}.journal-check-detail p{margin:6px 0}
@media(prefers-reduced-motion:reduce){#journal-check-progress{animation:none}}

.settings-fields{border:0;padding:0;margin:0;min-width:0}
