/* Shared page geometry: future pages use tarlabase_layout_v8.render_page. */
:root{--tb-banner-height:184px;--tb-header-height:88px;--tb-banner-padding:28px;--tb-page-gap:24px}
.tb-account-menu::before{content:"";position:absolute;left:0;right:0;top:-10px;height:10px}
.tb-app #resultArea>.tabs{display:flex;flex-wrap:wrap;height:auto;max-width:100%;width:fit-content;overflow:visible}
.detail-table{width:100%;table-layout:fixed}.detail-table th,.detail-table td{white-space:normal;overflow-wrap:anywhere;word-break:normal;padding:9px 7px;vertical-align:top;font-size:11px;line-height:1.45}.detail-table th{font-size:10px}.detail-wrap{max-height:650px}
@media(max-width:700px){.detail-table{min-width:850px}}
.form>div:has(>#btn){padding-top:24px!important}.tb-profile-card[data-loading] #profileRetry{visibility:visible}
.tb-nav{min-width:0;max-width:100%}.tb-account{min-width:0;flex:0 1 auto}.tb-account .tb-nav-item{max-width:280px}.tb-username{min-width:0;max-width:160px;overflow:hidden;text-overflow:ellipsis}.tb-role{flex-shrink:0}
*,*::before,*::after{box-sizing:border-box}
html{scrollbar-gutter:stable}
body.tb-app{margin:0;color:#182d23;display:flex;flex-direction:column;min-height:100vh}
.tb-shell{width:100%;max-width:var(--tb-width,1240px);padding:0 22px;margin:0 auto}
.tb-header{height:var(--tb-header-height);display:flex;align-items:center;justify-content:space-between;gap:20px}
.tb-brand{display:inline-flex;align-items:center;flex:none}.tb-brand img{width:190px;height:44px;object-fit:contain;object-position:left center;filter:none}
.tb-nav{display:flex;align-items:center;gap:8px}.tb-nav .tb-nav-item{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;height:40px;width:auto;max-width:100%;margin:0;padding:0 13px;background:#fff;color:#425249;border:1px solid #dfe7e2;border-radius:10px;text-decoration:none;font-family:inherit;font-size:13px;font-weight:650;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none}
.tb-theme-toggle{min-width:82px}.tb-theme-icon{font-size:16px;line-height:1}.tb-theme-label{font-size:12px}
.unit-tabs{display:inline-flex;gap:4px;padding:4px;border:1px solid #d6e0da;border-radius:10px;background:#f1f6f3}.unit-btn{height:30px;width:auto;padding:0 12px;border:0;border-radius:7px;background:transparent;color:#53665a;font:inherit;font-size:12px;font-weight:750;cursor:pointer}.unit-btn.active{background:#176b45;color:#fff}.sortable-th{border:0;background:transparent;color:inherit;font:inherit;font-weight:800;text-transform:inherit;letter-spacing:inherit;padding:0;cursor:pointer;white-space:nowrap}.sort-mark{display:inline-block;min-width:12px;margin-left:3px}
.tb-nav .tb-nav-item:hover{background:#edf5f0;border-color:#b5cfbf}.tb-account{position:relative}.tb-account summary{list-style:none}.tb-account summary::-webkit-details-marker{display:none}.tb-account-menu{position:absolute;right:0;top:calc(100% + 8px);width:200px;padding:6px;background:white;border:1px solid #dfe7e2;border-radius:12px;box-shadow:0 12px 32px #183d2d18;z-index:100}.tb-account-menu a{display:flex;align-items:center;min-height:44px;padding:10px 12px;border-radius:8px;font-size:14px;text-decoration:none;color:#244735}.tb-account-menu a:hover{background:#edf5f0}
.tb-banner{height:var(--tb-banner-height);min-height:var(--tb-banner-height);max-height:var(--tb-banner-height);padding:var(--tb-banner-padding);border-radius:var(--tb-radius,16px);position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(130deg,color-mix(in srgb,var(--g),#000 30%),var(--g2));color:white;display:flex;align-items:center;margin:0;box-shadow:0 12px 32px #183d2d12}
.tb-banner::before{content:"";position:absolute;inset:0;background:var(--tb-banner) center/cover no-repeat;opacity:.42;z-index:-1;pointer-events:none}
.tb-banner-copy{width:100%;min-width:0;max-height:100%;overflow:auto;scrollbar-width:thin}.tb-eyebrow{font-size:11px;font-weight:750;letter-spacing:1.1px;line-height:16px;margin-bottom:8px;color:#c6ead6}.tb-banner h1{font-size:30px;line-height:1.2;font-weight:750;letter-spacing:-.5px;margin:0 0 10px;color:white;overflow-wrap:anywhere}.tb-banner p{font-size:14px;line-height:1.55;color:#e0eee6;margin:0;max-width:100%;overflow-wrap:anywhere}
.tb-app>.wrap{width:100%;max-width:var(--tb-width)!important;margin:var(--tb-page-gap) auto 0!important;padding:0 22px 32px!important}.tb-app>.wrap>.section{margin-top:0}.tb-app>.wrap>.card{padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
.tb-source{font-size:12px;color:#64756b;margin:0 0 10px;text-align:right}.form>button{align-self:start!important;margin-top:24px!important;transform:none!important}.tb-app>.layout{width:calc(100% - 44px);max-width:calc(var(--tb-width) - 44px);margin:24px auto 0;grid-template-columns:220px minmax(0,1fr);gap:24px;min-height:0}.tb-app .side{position:static;height:auto;border-radius:var(--tb-radius);padding:18px 12px;align-self:start}.tb-app .side-title{margin:8px 12px 14px}.tb-app .content{min-width:0;padding:0!important}.tb-admin-title{margin:0 0 18px;font-size:21px}.tb-app>.tb-footer{margin-top:auto;padding-top:24px}.tb-app>main,.tb-app>.layout,.tb-app>.wrap{margin-bottom:48px!important}
.tb-profile-content{width:100%;max-width:var(--tb-width);padding:0 22px;margin:24px auto 0}.tb-profile-card{max-width:820px;background:#fff;border:1px solid #dfe7e2;border-radius:var(--tb-radius);padding:26px;margin:0 auto}.tb-profile-card h2{margin:0;font-size:20px}.tb-profile-intro{color:#697b70;font-size:13px;margin:8px 0 24px}.tb-profile-row{display:grid;grid-template-columns:145px minmax(0,1fr) auto;align-items:center;gap:18px;padding:20px 0;border-bottom:1px solid #e8eeea;font-size:14px}.tb-profile-row:last-of-type{border-bottom:0}.tb-profile-value{overflow-wrap:anywhere}.tb-profile-value.empty{font-style:italic;color:#77847d;padding:0;border:0}.tb-profile-row>span:first-child{font-weight:600}.tb-edit-button,.tb-profile-button{min-height:40px;width:auto;padding:10px 14px;border:1px solid #d5e2d9;background:#f7faf8;color:var(--g);border-radius:8px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}.tb-profile-button.primary{background:var(--g);color:white;border-color:var(--g)}.tb-profile-form{background:#f6f9f7;border-radius:12px;padding:20px;margin-top:16px}.tb-profile-form[hidden]{display:none}.tb-profile-form label{display:block;font-size:13px;font-weight:600;margin:0 0 7px}.tb-profile-form input{display:block;width:100%;height:44px;min-height:44px;border:1px solid #ccdad1;background:white;border-radius:8px;padding:10px 12px;margin:0 0 16px;font:inherit;font-size:14px}.tb-profile-form input:focus-visible{outline:2px solid #6aaa87}.tb-profile-actions{display:flex;gap:8px}.tb-profile-message{font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}.tb-profile-message.error{color:#a33333}.tb-profile-message.success{color:#176b45}.tb-profile-message:empty{display:none}.tb-profile-card[data-loading] .tb-edit-button{visibility:hidden}.tb-profile-note{font-size:12px;color:#6a7c70;margin-top:20px}
@media(max-width:900px){.tb-app>.layout{grid-template-columns:1fr;gap:18px}.tb-app .menu{margin:0;flex-wrap:wrap}.tb-app .side-title{display:none}.tb-app .content{padding:0!important}.tb-banner h1{font-size:28px}}
@media(max-width:540px){.form>div:has(>#btn){padding-top:0!important}}
@media(max-width:600px){:root{--tb-banner-height:216px;--tb-header-height:124px;--tb-banner-padding:22px}.tb-shell{padding:0 16px}.tb-header{flex-direction:column;justify-content:center;align-items:flex-start;gap:12px}.tb-brand img{width:160px;height:37px}.tb-nav{width:100%;gap:6px;justify-content:flex-end}.tb-nav .tb-nav-item{font-size:12px;padding:0 10px}.tb-role{display:none}.tb-banner h1{font-size:26px}.tb-banner p{font-size:13px}.tb-app>.wrap{padding:0 16px 24px!important}.tb-profile-content{padding:0 16px}.tb-profile-card{padding:20px}.tb-profile-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.tb-profile-row>span:first-child{grid-column:1/-1}.tb-profile-row .tb-edit-button{grid-column:2;grid-row:2}.tb-app>.layout{width:calc(100% - 32px)}.tb-profile-form{padding:16px}.tb-profile-actions{flex-wrap:wrap}.tb-source{text-align:left}.form>button{margin-top:0!important}}

html[data-theme="dark"]{color-scheme:dark;--tb-dark-bg:#0d1712;--tb-dark-surface:#14231b;--tb-dark-soft:#1a2d22;--tb-dark-line:#30483a;--tb-dark-text:#e8f2ec;--tb-dark-muted:#a8b9af}
html[data-theme="dark"] body.tb-app{background:var(--tb-dark-bg)!important;color:var(--tb-dark-text)!important}
html[data-theme="dark"] .tb-brand img{filter:none;opacity:1}
html[data-theme="dark"] .tb-nav .tb-nav-item{background:var(--tb-dark-surface);color:var(--tb-dark-text);border-color:var(--tb-dark-line)}
html[data-theme="dark"] .tb-nav .tb-nav-item:hover{background:#20372a;border-color:#4b6e59}
html[data-theme="dark"] .tb-account-menu{background:var(--tb-dark-surface);border-color:var(--tb-dark-line);box-shadow:0 14px 34px #0007}
html[data-theme="dark"] .tb-account-menu a{color:var(--tb-dark-text)}
html[data-theme="dark"] .tb-account-menu a:hover{background:var(--tb-dark-soft)}
html[data-theme="dark"] :is(.card,.kpi,.module,.query-shell,.analysis-card,.country-kpi,.period-kpi,.metric,.tb-profile-card,.report,.pending,.panel-card,.period-svg-wrap){background:var(--tb-dark-surface)!important;color:var(--tb-dark-text)!important;border-color:var(--tb-dark-line)!important;box-shadow:none!important}
html[data-theme="dark"] :is(.muted,.hint,.tb-source,.tb-profile-intro,.tb-profile-note,.period-note,.country-toolbar label,.period-toolbar label,.metric small,.country-kpi small,.period-kpi small){color:var(--tb-dark-muted)!important}
html[data-theme="dark"] :is(input,select,textarea,.ms-trigger,.ms-panel,.field input,.field select,.field textarea,.role-select,.country-toolbar input,.country-toolbar select,.period-toolbar select){background:var(--tb-dark-soft)!important;color:var(--tb-dark-text)!important;border-color:var(--tb-dark-line)!important}
html[data-theme="dark"] :is(.checklist,.tabs,.tab-btn,.tb-profile-form,.empty){background:var(--tb-dark-soft)!important;color:var(--tb-dark-text)!important;border-color:var(--tb-dark-line)!important}
html[data-theme="dark"] .tab-btn.active{background:#2a4b39!important;color:#fff!important}
html[data-theme="dark"] :is(table,thead,tbody,tr,th,td){border-color:var(--tb-dark-line)!important}
html[data-theme="dark"] :is(th,.detail-table th){background:#1c3024!important;color:#c9d8cf!important}
html[data-theme="dark"] :is(td,.detail-table td){background:var(--tb-dark-surface)!important;color:var(--tb-dark-text)!important}
html[data-theme="dark"] :is(.tb-profile-row,.tb-footer){border-color:var(--tb-dark-line)!important}
html[data-theme="dark"] :is(.rank-track,.country-bar-track){background:#2a3d32!important}
html[data-theme="dark"] .tb-app .side{background:#0b3928!important}
html[data-theme="dark"] .status.ok{background:#173a29!important;color:#a8e2c1!important}
html[data-theme="dark"] .status.err{background:#432020!important;color:#ffc5c5!important}
html[data-theme="dark"] .tb-profile-value.empty{color:var(--tb-dark-muted)!important}
@media(max-width:600px){.tb-theme-toggle{min-width:42px}.tb-theme-label{display:none}}
