:root{--navy:#111111;--cyan:#40B8B8;--bg:#F7F9F9;--white:#fff;--muted:#5C5C5C;--line:#DDE7E7;--success:#087A57;--danger:#A92C24;--vvh:100dvh}*{box-sizing:border-box}html,body{margin:0;width:100%;max-width:100%;overflow-x:hidden;background:var(--bg);color:var(--navy);font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-text-size-adjust:100%}body{min-height:var(--vvh)}button,input,select,textarea{font:inherit;font-size:16px}.app-shell{width:100%;max-width:560px;margin:0 auto;min-height:var(--vvh);padding:12px 16px calc(96px + env(safe-area-inset-bottom));overflow-x:hidden}.topbar{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 18px}.brand{font-weight:900;font-size:18px}.brand span{color:var(--cyan)}.badge{padding:7px 11px;border-radius:999px;background:var(--navy);color:#fff;font-size:12px;font-weight:800}.card{background:#fff;border:1px solid rgba(8,20,35,.06);border-radius:24px;box-shadow:0 8px 28px rgba(8,20,35,.06)}.welcome{padding:24px}.mark{display:inline-flex;padding:6px 9px;border-radius:9px;background:var(--cyan);font-weight:950;letter-spacing:.06em}.welcome h1{font-size:30px;line-height:1.08;margin:20px 0 10px}.welcome p{font-size:16px;line-height:1.5;color:var(--muted);margin:0 0 22px}.primary,.secondary,.ghost{min-height:52px;border:0;border-radius:16px;font-weight:850;cursor:pointer}.primary{width:100%;background:var(--cyan);color:var(--navy)}.secondary{width:100%;background:var(--navy);color:#fff}.ghost{background:#fff;border:1px solid var(--line);padding:0 14px}.hidden{display:none!important}.notice{margin:0 0 14px;padding:14px 16px;border-radius:16px;background:#EAF7F7;border:1px solid #CBE8E8;font-size:14px;line-height:1.4}.notice.success{background:#ECFBF5;border-color:#C3E8DA;color:#075D43}.notice.error{background:#FFF1EF;border-color:#F1CBC7;color:#7A2019}.form-card{padding:22px 20px}.form-head{margin-bottom:18px}.eyebrow{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--muted);font-weight:900}.form-head h2,.status-card h2{font-size:25px;margin:6px 0 7px}.muted{color:var(--muted);font-size:14px;line-height:1.45}.progress{display:flex;gap:6px;margin:18px 0 22px}.progress i{height:5px;flex:1;border-radius:99px;background:#DDE7E7}.progress i.active{background:var(--cyan)}.step-title{font-size:18px;font-weight:900;margin-bottom:2px}.step{display:none}.step.active{display:block}label{display:block;margin-top:16px;font-size:14px;font-weight:800}input,select,textarea{display:block;width:100%;max-width:100%;margin-top:7px;border:1px solid var(--line);background:#FFFFFF;color:var(--navy);border-radius:15px;padding:14px;outline:none;min-height:52px}textarea{min-height:110px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--cyan);box-shadow:0 0 0 3px rgba(64,184,184,.14)}small{display:block;margin-top:7px;color:var(--muted);font-size:12px;line-height:1.4}.domain-input{display:flex;width:100%;max-width:100%;align-items:center;margin-top:7px;border:1px solid var(--line);border-radius:15px;background:#FFFFFF;overflow:hidden}.domain-input:focus-within{border-color:var(--cyan);box-shadow:0 0 0 3px rgba(64,184,184,.14)}.domain-input input{min-width:0;flex:1;margin:0;border:0;box-shadow:none!important;background:transparent}.domain-input span{flex:none;padding-right:12px;color:var(--muted);font-size:13px;white-space:nowrap}.form-actions{display:flex;gap:10px;margin-top:24px}.form-actions button{flex:1}.status-card{padding:24px}.status-pill{display:inline-flex;padding:6px 10px;border-radius:999px;background:#EAF7F7;font-size:12px;font-weight:850}.domain{font-size:20px;font-weight:900;overflow-wrap:anywhere;margin:18px 0}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:8px 2px 14px}.section-title{font-size:22px;font-weight:900}.stack{display:grid;gap:10px}.application-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}.application-top{display:flex;justify-content:space-between;gap:10px}.application-card h3{margin:0 0 4px}.meta{display:grid;gap:6px;margin-top:12px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}.status{font-size:11px;padding:5px 8px;border-radius:999px;background:#EAF7F7;font-weight:800;white-space:nowrap}.edit{width:100%;margin-top:13px;padding:12px;border:0;border-radius:13px;background:var(--navy);color:#fff;font-weight:800}.empty{padding:28px;text-align:center;color:var(--muted);background:#fff;border-radius:18px}dialog{border:0;border-radius:22px;padding:0;width:min(540px,calc(100% - 20px));max-width:100%;overflow:hidden}dialog::backdrop{background:rgba(8,20,35,.55)}.dialog-card{padding:20px;max-height:82dvh;overflow-y:auto;overflow-x:hidden}.dialog-head{display:flex;justify-content:space-between}.icon-btn{width:36px;height:36px;border:0;border-radius:50%}.dialog-actions{display:grid;gap:10px;margin-top:18px}.keyboard-open .app-shell{padding-bottom:24px}.keyboard-open .topbar{display:none}@media(max-width:380px){.app-shell{padding-left:12px;padding-right:12px}.welcome,.form-card,.status-card{padding:19px 16px}.welcome h1{font-size:27px}.domain-input span{font-size:12px}}
:root{--isic:#40B8B8;--isic-dark:#2E8585;--ink:#111111;--mint:#EAF7F7;--soft:#F7F9F9}
body{background:linear-gradient(180deg,#fff 0,#F2FAFA 46%,#fff 100%);color:var(--ink)}
.app-shell{max-width:620px;padding:10px 18px calc(102px + env(safe-area-inset-bottom))}
.topbar{position:sticky;top:0;z-index:20;margin:0 -18px 10px;padding:12px 18px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid rgba(64,184,184,.12)}
.brand-lockup{display:flex;align-items:center;gap:10px;min-width:0}.isic-disc{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--isic);color:#fff;font-weight:950;font-size:15px;letter-spacing:-.03em}.brand-copy{display:flex;flex-direction:column;min-width:0}.brand-copy strong{font-size:16px;letter-spacing:-.02em}.brand-copy span{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#5C5C5C;white-space:nowrap}
.mode-switch{border:1px solid rgba(64,184,184,.22);background:var(--mint);color:var(--isic-dark);border-radius:12px;padding:9px 10px;font-size:11px;font-weight:900;white-space:nowrap}
.admin-hero{position:relative;overflow:hidden;margin:4px 0 18px;padding:24px 22px 26px;border-radius:26px;background:linear-gradient(135deg,#2E8585,#40B8B8);color:#fff;box-shadow:0 16px 38px rgba(0,109,117,.16)}
.admin-hero:after{content:"";position:absolute;width:170px;height:170px;border:28px solid rgba(255,255,255,.10);border-radius:50%;right:-75px;top:-70px}.admin-hero .eyebrow{color:rgba(255,255,255,.72)}.admin-hero h1{position:relative;z-index:1;margin:7px 0 6px;font-size:29px;line-height:1.05;letter-spacing:-.035em}.admin-hero p{position:relative;z-index:1;margin:0;max-width:330px;color:rgba(255,255,255,.83);font-size:13px;line-height:1.45}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 18px}.stat-card{min-height:116px;padding:16px;border:1px solid rgba(64,184,184,.13);border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(17,17,17,.045)}.stat-card .muted{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#5C5C5C;font-weight:800}.stat-card b{display:block;margin-top:14px;font-size:26px;letter-spacing:-.04em;color:var(--ink);overflow-wrap:anywhere}
.section-heading{margin:18px 2px 12px}.section-title{font-size:23px;letter-spacing:-.035em}.section-heading .ghost{min-height:40px;border-color:rgba(64,184,184,.2);color:var(--isic-dark)}
.agent-card,.integration-card,.application-card{position:relative;padding:17px 18px;border:1px solid rgba(64,184,184,.14);border-radius:20px;background:#fff;box-shadow:0 7px 22px rgba(17,17,17,.035)}.agent-card:before,.integration-card:before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 4px 4px 0;background:var(--isic)}.agent-card h3,.integration-card h3,.application-card h3{font-size:17px;letter-spacing:-.02em;color:var(--ink)}.meta{font-size:12px;line-height:1.5}.status{background:var(--mint);color:var(--isic-dark)}.edit{background:var(--isic);color:#fff;border-radius:12px}.ok-dot{background:#269b74}.off-dot{background:#a8b9bc}
.bottom-nav{position:fixed;z-index:30;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,1fr);width:min(540px,calc(100% - 24px));padding:7px;border:1px solid rgba(64,184,184,.16);border-radius:22px;background:rgba(255,255,255,.96);box-shadow:0 14px 40px rgba(17,17,17,.15);backdrop-filter:blur(18px)}.bottom-nav button{border:0;background:transparent;color:#5C5C5C;min-width:0;padding:7px 3px 5px;border-radius:15px;font-size:10px;font-weight:800}.bottom-nav button span{display:block}.bottom-nav .nav-icon{font-size:20px;line-height:20px;margin-bottom:4px}.bottom-nav button.active{background:var(--mint);color:var(--isic-dark)}
.notice{border-radius:14px}.notice.error{font-size:13px}.card{border-color:rgba(64,184,184,.13)}
@media(max-width:380px){.app-shell{padding-left:14px;padding-right:14px}.topbar{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}.brand-copy span{display:none}.admin-hero{padding:21px 18px}.admin-hero h1{font-size:26px}.bottom-nav{width:calc(100% - 18px)}}
.agent-open{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}.agent-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(64,184,184,.12)}.agent-metrics span{font-size:10px;color:#5C5C5C;text-transform:uppercase;letter-spacing:.04em}.agent-metrics strong{display:block;margin-top:5px;font-size:14px;color:var(--ink);letter-spacing:0;text-transform:none}.back-link{border:0;background:transparent;color:var(--isic-dark);padding:5px 0 10px;font-weight:850}
/* ISIC digital UI alignment */
.nav-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center}.nav-icon svg{width:22px;height:22px;display:block}.bottom-nav button{color:var(--muted)}.bottom-nav button.active{color:var(--cyan)}.admin-hero{background:linear-gradient(135deg,#40B8B8 0%,#2E8585 100%);color:#fff}.admin-hero .eyebrow,.admin-hero p{color:rgba(255,255,255,.82)}.period-tabs button.active{background:var(--cyan);color:#fff;border-color:var(--cyan)}

/* ISIC project-wide brand normalization */
:root{--isic:#40B8B8;--isic-dark:#2E8585;--ink:#111111;--mint:#EAF7F7;--soft:#F7F9F9}
body{font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(180deg,#fff 0,#F2FAFA 46%,#fff 100%);color:var(--ink)}
.isic-disc,.mark{background:var(--isic);color:#fff}.mode-switch{border-color:rgba(64,184,184,.24);background:var(--mint);color:var(--isic-dark)}
.admin-hero{background:linear-gradient(135deg,#40B8B8 0%,#2E8585 100%);box-shadow:0 16px 38px rgba(46,133,133,.16)}
.card,.stat-card,.agent-card,.integration-card,.application-card{border-color:rgba(64,184,184,.16)}
.agent-card:before,.integration-card:before{background:var(--isic)}
.primary,.edit{background:var(--isic);color:#fff}.primary:hover,.edit:hover{background:var(--isic-dark)}
.secondary{background:var(--ink);color:#fff}.status,.status-pill{background:var(--mint);color:var(--isic-dark)}
input:focus,select:focus,textarea:focus,.domain-input:focus-within{border-color:var(--isic);box-shadow:0 0 0 3px rgba(64,184,184,.14)}
.progress i.active{background:var(--isic)}.back-link{color:var(--isic-dark)}
.bottom-nav{border-color:rgba(64,184,184,.18)}.bottom-nav button.active{background:var(--mint);color:var(--isic-dark)}
.period-tabs button.active{background:var(--isic);color:#fff;border-color:var(--isic)}

/* Unified ISIC component language */
.topbar{border-bottom-color:rgba(64,184,184,.14)}
.brand-copy strong{color:#111}.brand-copy span{color:#5C5C5C}
.welcome,.form-card,.status-card,.dialog-card{border-radius:20px}
.welcome h1,.form-head h2,.status-card h2,.section-title,.agent-card h3,.application-card h3,.integration-card h3{color:#111}
.eyebrow{color:#5C5C5C;letter-spacing:.12em}
.primary,.secondary,.ghost,.edit,.mode-switch{transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}
.primary:active,.secondary:active,.ghost:active,.edit:active,.mode-switch:active{transform:scale(.985)}
input,select,textarea,.domain-input{background:#fff;border-color:#DDE7E7;border-radius:12px}
.stat-card{border-radius:16px;min-height:108px}.agent-card,.integration-card,.application-card{border-radius:16px}
.bottom-nav{border-radius:18px}.bottom-nav button{border-radius:12px}.bottom-nav .nav-icon{margin:0 auto 4px}
.dialog-card{background:#fff}.icon-btn{background:var(--mint);color:var(--isic-dark)}

/* Agent mobile navigation: five ISIC sections */
#agentView .bottom-nav{grid-template-columns:repeat(5,1fr);width:min(580px,calc(100% - 18px));padding:6px}
#agentView .bottom-nav button{font-size:9px;padding:7px 1px 5px}
#agentView .bottom-nav .nav-icon,#agentView .bottom-nav .nav-icon svg{width:20px;height:20px}
.period-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:0 0 16px;padding:4px;border-radius:14px;background:var(--mint)}
.period-tabs button{min-width:0;border:0;border-radius:10px;background:transparent;color:var(--muted);padding:9px 3px;font-size:11px;font-weight:800;white-space:nowrap}
.small-value{font-size:15px!important;line-height:1.25;word-break:break-word}
.agent-order{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;margin-bottom:10px}
@media(max-width:380px){#agentView .bottom-nav{width:calc(100% - 12px)}#agentView .bottom-nav button{font-size:8px}.period-tabs button{font-size:10px}}

/* ISIC detail screens */
.agent-client{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;margin-bottom:10px}
.agent-card+.agent-card{margin-top:10px}
.profile-photo{display:block;width:100%;max-height:320px;object-fit:contain;border-radius:12px;background:var(--soft)}
.detail-list{display:grid;gap:10px}.detail-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line)}.detail-row:last-child{border-bottom:0}.detail-row span{font-size:12px;color:var(--muted)}.detail-row strong{max-width:65%;text-align:right;font-size:13px;color:var(--ink);overflow-wrap:anywhere}
.agent-card h3{margin:0 0 10px}.agent-card .meta{margin-top:0}.agent-card .meta>div{padding:4px 0}
.back-link{display:inline-flex;align-items:center;min-height:40px;margin-bottom:4px;font-size:13px}

/* ISIC Super Admin consistency */
#ownerView .bottom-nav{grid-template-columns:repeat(4,1fr)}
.integration-card .muted{display:flex;align-items:center;gap:8px}.ok-dot,.off-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:0 0 8px}.ok-dot{background:var(--success)}.off-dot{background:#A8B9BC}
.application-top{align-items:flex-start}.application-card .actions{margin-top:14px}.application-card .edit{min-height:46px;margin-top:0}
#ownerView .stats-grid .stat-card b{font-variant-numeric:tabular-nums}
#editDialog label:first-of-type{margin-top:10px}
#editDialog .dialog-head h3{margin:5px 0 0;font-size:21px}
#editDialog .dialog-actions .primary,#editDialog .dialog-actions .secondary{min-height:50px}

/* ISIC agent application flow */
#applicantView .welcome{position:relative;overflow:hidden;padding:26px 22px 24px;border-color:rgba(64,184,184,.16)}
#applicantView .welcome:after{content:"";position:absolute;width:150px;height:150px;border:24px solid rgba(64,184,184,.08);border-radius:50%;right:-72px;top:-74px;pointer-events:none}
#applicantView .mark{position:relative;z-index:1;border-radius:999px;padding:7px 11px;font-size:12px;color:#fff}
#applicantView .welcome h1{position:relative;z-index:1;font-size:29px;letter-spacing:-.035em}
#applicantView .welcome p,#applicantView .welcome .primary{position:relative;z-index:1}
#applicationForm .form-head{padding-bottom:2px}#applicationForm .form-head h2{letter-spacing:-.025em}
#applicationForm .progress{margin:16px 0 24px}#applicationForm .progress i{height:4px;background:var(--line)}
#applicationForm label{color:#111}#applicationForm small{color:var(--muted)}
#applicationForm .form-actions{position:sticky;bottom:calc(8px + env(safe-area-inset-bottom));z-index:10;padding:8px;margin-left:-8px;margin-right:-8px;border-radius:16px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}
.application-status{padding:22px}.application-status h3{margin:8px 0 4px;font-size:22px;letter-spacing:-.025em}.application-status .domain{color:var(--isic-dark)}
@media(max-width:380px){#applicantView .welcome{padding:22px 18px}#applicantView .welcome h1{font-size:27px}#applicationForm .form-actions{gap:7px}}

/* Telegram iOS viewport: keep admin content visible below the native Mini App header */
html,body{min-height:100%;height:auto;overflow-y:auto!important}
body{min-height:100dvh}
.app-shell{min-height:100dvh;height:auto!important;overflow:visible!important}
#app,#ownerView,#agentView,#applicantView{min-height:0;height:auto;overflow:visible}
@supports (padding-top: env(safe-area-inset-top)){.topbar{top:0}}

.role-menu{position:absolute;right:18px;top:76px;z-index:40;display:grid;min-width:180px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 50px rgba(17,17,17,.14)}
.role-menu.hidden{display:none}
.role-menu button{appearance:none;border:0;background:transparent;text-align:left;padding:13px 14px;border-radius:12px;font:inherit;font-weight:700;color:var(--ink);cursor:pointer}
.role-menu button:active{background:var(--mint)}

#ownerView .bottom-nav{grid-template-columns:repeat(5,1fr)}
.stat-open{appearance:none;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}

/* Partner logo upload */
.logo-upload{display:grid;gap:10px;margin-top:8px}
.logo-upload>input[type=file]{padding:12px;background:#fff;border:1px dashed rgba(64,184,184,.42);border-radius:12px;color:var(--muted)}
.logo-preview{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}
.logo-preview.hidden{display:none}
.logo-preview img{display:block;max-width:180px;max-height:72px;object-fit:contain;background:#fff;border-radius:8px}
.logo-preview .ghost{width:auto;min-height:40px;padding:8px 12px;margin-left:auto}

/* Agent web authentication */
#webAuthView{max-width:520px;margin:7vh auto 0}
.web-auth-card{padding:30px 28px}
.web-auth-card h1{margin:8px 0 10px;font-size:31px;letter-spacing:-.035em}
.web-auth-card form{display:grid;gap:12px;margin-top:22px}
.web-auth-card .primary,.web-auth-card .ghost{width:100%}
.web-auth-card .ghost{margin-top:2px}
.web-auth-note{margin:22px 0 0;padding-top:18px;border-top:1px solid var(--line)}
.web-logout{width:100%;margin-top:14px}
button:disabled{opacity:.5;cursor:not-allowed}
@media(min-width:760px){
  body:not(.keyboard-open) .app-shell{max-width:1180px}
  #agentView .admin-hero{padding:30px 32px}
  #agentView .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  #agentView .bottom-nav{width:min(760px,calc(100% - 40px))}
  #webAuthView{margin-top:10vh}
}

/* Agent branding moderation */
.branding-card{display:grid;gap:16px}
.section-heading.compact{margin:0}
.branding-block{display:grid;gap:8px;padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.55)}
.branding-preview{display:flex;align-items:center;justify-content:center;min-height:120px;padding:16px;border:1px dashed var(--line);border-radius:12px;background:#fff}
.branding-preview img{display:block;max-width:100%;max-height:150px;width:auto;height:auto;object-fit:contain}
.compact-empty{padding:12px 0}
.ghost.danger{border-color:rgba(180,45,45,.24);color:#a52a2a}

/* Commission payouts */
.status-pill{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;line-height:1}
.status-pill.warning{background:rgba(210,145,0,.12);color:#9a6500}
.status-pill.success{background:rgba(32,145,88,.12);color:#1f7b4b}
.status-pill.error{background:rgba(180,45,45,.1);color:#a52a2a}
.payout-card,.payout-history-card{gap:12px}
.payout-card{text-align:left;width:100%}
.payout-card .status-pill,.payout-history-card .status-pill{margin-bottom:8px}
.payout-details{margin-top:14px}
.payout-admin-actions{display:grid;grid-template-columns:1fr;gap:10px}
.success-action{border-color:rgba(32,145,88,.24);color:#1f7b4b}
.payout-profile-card{margin-top:16px}
.payout-balance-grid .stat-card.emphasis,.payout-admin-summary .stat-card.emphasis{border-width:2px}
.inline-note{display:block;margin:14px 0;padding:12px 14px}
.payout-admin-summary{display:grid;gap:14px}
@media(min-width:760px){
  .payout-admin-actions{grid-template-columns:1fr 1fr 1fr}
}

/* Agent dashboard 2.0 */
.agent-context{display:flex;justify-content:flex-end;margin:-4px 0 10px}
.role-pill{text-transform:capitalize}
.agent-switcher{margin:0 0 14px}
.agent-switcher label{display:grid;gap:6px;font-size:12px;font-weight:800;color:var(--muted)}
.agent-switcher select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 12px;font:inherit;color:var(--text)}
.web-analytics{margin-top:20px}
.analytics-grid{display:grid;gap:12px}
.analytics-grid .agent-card{margin:0}
.analytics-wide{grid-column:1/-1}
.mini-chart{display:flex;align-items:flex-end;gap:4px;height:180px;padding:18px 4px 0;overflow-x:auto}
.mini-chart__col{display:flex;flex:1 0 18px;min-width:18px;height:100%;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}
.mini-chart__col i{display:block;width:100%;max-width:24px;border-radius:6px 6px 2px 2px;background:currentColor;opacity:.28;min-height:4px}
.mini-chart__col span{font-size:9px;color:var(--muted);transform:rotate(-45deg);transform-origin:center;white-space:nowrap;margin-bottom:8px}
.breakdown-row{display:grid;grid-template-columns:minmax(90px,1fr) auto auto;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
.breakdown-row:last-child{border-bottom:0}
.breakdown-row span:last-child{text-align:right;color:var(--muted)}
.notification-card{margin-top:14px}
.notification-row{padding:10px 0;border-bottom:1px solid var(--line)}
.notification-row:last-child{border-bottom:0}
.filter-bar{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(110px,.7fr)) auto;gap:8px;margin:0 0 14px}
.filter-bar input,.filter-bar select,.inline-form input,.sales-link-row input,.team-add-form input,.team-add-form select,.team-actions select{min-height:42px;border:1px solid var(--line);border-radius:10px;padding:0 11px;background:#fff;color:var(--text);font:inherit}
.compact-filter{grid-template-columns:minmax(220px,1fr) auto auto}
.inline-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin-bottom:14px}
.campaign-stack{display:grid;gap:12px}
.campaign-card h3{margin:0}
.sales-link-row{display:grid;grid-template-columns:78px minmax(0,1fr) auto;gap:8px;align-items:center;margin-top:10px}
.sales-link-row>span{font-size:12px;font-weight:800}
.campaign-metrics{display:grid;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.team-card{margin-top:16px}
.team-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.team-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.team-actions select{min-width:150px}
.team-add-form{display:grid;grid-template-columns:1fr 1fr 1fr minmax(130px,.7fr) auto;gap:8px;align-items:end;padding-top:16px;border-top:1px solid var(--line)}
.team-add-form label{display:grid;gap:5px}
.bottom-nav{overflow-x:auto;justify-content:flex-start}
.bottom-nav button{flex:1 0 92px}
@media(min-width:900px){
  .analytics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .analytics-wide{grid-column:1/-1}
  .agent-switcher{max-width:420px}
}
@media(max-width:760px){
  .filter-bar,.compact-filter,.inline-form,.team-add-form{grid-template-columns:1fr}
  .sales-link-row{grid-template-columns:64px minmax(0,1fr)}
  .sales-link-row button{grid-column:2}
  .team-row{align-items:flex-start;flex-direction:column}
  .team-actions{justify-content:flex-start;width:100%}
}

/* Web auth and onboarding */
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;margin:18px 0;border-radius:12px;background:rgba(100,116,139,.08)}
.auth-tabs button{min-height:40px;border:0;border-radius:9px;background:transparent;font:inherit;font-weight:800;color:var(--muted);cursor:pointer}
.auth-tabs button.active{background:#fff;color:var(--text);box-shadow:0 2px 10px rgba(15,23,42,.08)}
#webRegisterPane form{display:grid;gap:12px;margin-top:18px}
#webOnboardingDone{margin-top:18px}
.web-auth-card textarea{resize:vertical}
@media(min-width:980px){
  #webAuthView{max-width:600px}
}

.form-subsection{padding:6px 0 2px}
.form-subsection h3{margin:3px 0 0}
.export-actions{display:flex;gap:7px;flex-wrap:wrap}

/* Agent dashboard export + notifications */
.dashboard-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px}
.dashboard-toolbar .period-tabs{margin:0}
.notification-card{display:grid;gap:8px}
.notification-row{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line)}
.notification-row:first-of-type{border-top:0}
.notification-row strong{display:block;margin-bottom:3px}
.notification-row time{flex:0 0 auto;font-size:11px;color:var(--muted);white-space:nowrap}
.notification-row.unread{padding-left:10px;border-left:3px solid currentColor}
.notification-row.live{display:block;font-weight:700}
@media(max-width:640px){
  .dashboard-toolbar{align-items:stretch}
  .dashboard-toolbar>button{width:100%}
  .notification-row{display:block}
  .notification-row time{display:block;margin-top:5px}
}

/* Final mobile navigation hardening */
.bottom-nav{
  display:grid;
  grid-template-columns:none;
  grid-auto-flow:column;
  grid-auto-columns:minmax(76px,1fr);
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.bottom-nav::-webkit-scrollbar{display:none}
.bottom-nav button{min-width:76px}
@media(min-width:760px){
  .bottom-nav{grid-auto-columns:minmax(92px,1fr);width:min(680px,calc(100% - 40px))}
}
@media(min-width:900px){
  .filter-bar{grid-template-columns:minmax(180px,1.4fr) repeat(5,minmax(105px,.7fr)) auto}
}


/* 2026 ISIC brand audit: official logo lockup */
.isic-brand-logo{
  display:block;
  width:104px;
  max-width:32vw;
  height:auto;
  object-fit:contain;
  object-position:left center;
}
@media(max-width:380px){
  .isic-brand-logo{width:92px}
  .brand-copy strong{font-size:14px}
}


/* admin.isic.com.ua — dedicated web admin surface */
.admin-web-auth-card{
  position:relative;
  overflow:hidden;
  max-width:520px;
  margin:8vh auto 0;
}
.admin-web-auth-card:after{
  content:"";
  position:absolute;
  width:190px;
  height:190px;
  right:-92px;
  top:-92px;
  border:30px solid rgba(64,184,184,.08);
  border-radius:50%;
  pointer-events:none;
}
.admin-web-auth-card>*{position:relative;z-index:1}
.admin-web-auth-card h1{margin:8px 0 10px;font-size:32px;line-height:1.05;letter-spacing:-.04em;color:#111}
.admin-auth-pane{display:grid;gap:16px;margin-top:22px}
.admin-auth-note{display:grid;gap:4px;padding:15px 16px;border:1px solid rgba(64,184,184,.18);border-radius:14px;background:#EAF7F7}
.admin-auth-note strong{font-size:14px;color:#006666}
.admin-auth-note span{font-size:12px;line-height:1.45;color:#5C5C5C}
#adminWebOtpForm{display:grid;gap:12px;margin-top:22px}

@media(min-width:900px){
  .admin-web-host{background:#F7F9F9}
  .admin-web-host .app-shell{max-width:1240px;padding-left:28px;padding-right:28px}
  .admin-web-host .topbar{margin-left:-28px;margin-right:-28px;padding-left:28px;padding-right:28px}
  .admin-web-host #ownerView .admin-hero{padding:34px 36px;border-radius:20px}
  .admin-web-host #ownerView .admin-hero h1{font-size:38px}
  .admin-web-host #ownerView .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .admin-web-host #ownerView .bottom-nav{
    width:min(820px,calc(100% - 48px));
    grid-auto-columns:minmax(120px,1fr);
  }
  .admin-web-host #ownerView .agent-card,
  .admin-web-host #ownerView .integration-card,
  .admin-web-host #ownerView .application-card,
  .admin-web-host #ownerView .stat-card{box-shadow:0 8px 24px rgba(17,17,17,.035)}
}

/* Super Admin branding upload */
.branding-upload-admin{display:grid;gap:10px;padding-top:14px;border-top:1px solid var(--line)}
.branding-upload-admin label{display:grid;gap:8px;font-weight:700}
.branding-upload-admin input[type=file]{width:100%;font:inherit}
.branding-upload-admin small{color:var(--muted);line-height:1.45}


/* Super Admin mobile UX refresh — 2026-10-02 */
#ownerView .admin-hero--compact{
  margin:2px 0 14px;
  padding:18px 20px 19px;
  border-radius:20px;
  box-shadow:0 10px 26px rgba(46,133,133,.13);
}
#ownerView .admin-hero--compact:after{
  width:128px;
  height:128px;
  right:-58px;
  top:-60px;
  border-width:22px;
}
#ownerView .admin-hero--compact h1{
  margin:5px 0 5px;
  font-size:26px;
  line-height:1.04;
}
#ownerView .admin-hero--compact p{
  max-width:none;
  font-size:12.5px;
  line-height:1.35;
}
#ownerView .agents-heading{
  margin:14px 2px 10px;
}
#ownerView .agents-heading .section-title{
  font-size:24px;
  line-height:1.05;
}
#ownerView .create-agent-compact{
  width:auto;
  min-height:42px;
  padding:0 15px;
  border-radius:12px;
  font-size:13px;
  white-space:nowrap;
}
#ownerView .agent-list{
  display:grid;
  gap:9px;
}
#ownerView .agent-list .agent-card+.agent-card{
  margin-top:0;
}
#ownerView .agent-list-card{
  padding:14px 16px 13px;
  border-radius:16px;
  box-shadow:0 5px 16px rgba(17,17,17,.035);
}
#ownerView .agent-list-card:before{
  top:14px;
  bottom:14px;
}
#ownerView .agent-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#ownerView .agent-list-identity{
  min-width:0;
  flex:1;
}
#ownerView .agent-list-card h3{
  margin:0 0 4px;
  font-size:16px;
  line-height:1.24;
  letter-spacing:-.018em;
}
#ownerView .agent-list-card .muted{
  font-size:12px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#ownerView .agent-chevron{
  flex:0 0 28px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--mint);
  color:var(--isic-dark);
}
#ownerView .agent-chevron svg{
  width:16px;
  height:16px;
}
#ownerView .agent-list-metrics{
  margin-top:10px;
  padding-top:9px;
  gap:8px;
}
#ownerView .agent-list-metrics span{
  font-size:9px;
  letter-spacing:.045em;
}
#ownerView .agent-list-metrics strong{
  margin-top:3px;
  font-size:15px;
  line-height:1.12;
  font-variant-numeric:tabular-nums;
}
#ownerView .owner-bottom-nav{
  grid-template-columns:repeat(5,minmax(0,1fr));
  grid-auto-flow:initial;
  grid-auto-columns:auto;
  overflow-x:hidden;
  width:min(580px,calc(100% - 20px));
  padding:6px;
}
#ownerView .owner-bottom-nav button{
  min-width:0;
  padding:7px 2px 5px;
  font-size:9px;
}
#ownerView .owner-bottom-nav .nav-icon,
#ownerView .owner-bottom-nav .nav-icon svg{
  width:20px;
  height:20px;
}
#ownerView .owner-bottom-nav .nav-icon{
  margin:0 auto 4px;
}
#ownerView .owner-bottom-nav button.active{
  background:var(--mint);
  color:var(--isic-dark);
}

@media(max-width:640px){
  .topbar{
    margin-bottom:8px;
    padding-top:9px;
    padding-bottom:10px;
  }
  .isic-brand-logo{
    width:88px;
    max-width:28vw;
  }
  .brand-lockup{
    gap:8px;
  }
  .brand-copy strong{
    font-size:15px;
  }
  .brand-copy span{
    display:none;
  }
  .mode-switch{
    padding:8px 10px;
    border-radius:11px;
    font-size:10px;
  }
  #ownerView .admin-hero--compact{
    padding:15px 17px 16px;
    border-radius:18px;
  }
  #ownerView .admin-hero--compact .eyebrow{
    font-size:9px;
    letter-spacing:.14em;
  }
  #ownerView .admin-hero--compact h1{
    font-size:23px;
  }
  #ownerView .admin-hero--compact p{
    font-size:11.5px;
  }
  #ownerView .agents-heading{
    align-items:center;
  }
  #ownerView .create-agent-compact{
    min-height:40px;
    padding:0 13px;
  }
  #ownerView .agent-list-card{
    padding:13px 15px 12px;
  }
  #ownerView .agent-list-card h3{
    font-size:15.5px;
  }
  #ownerView .agent-list-metrics strong{
    font-size:14.5px;
  }
}
