:root{--navy:#0a2540;--navy2:#0f3b5b;--teal:#14b8a6;--aqua:#22d3ee;--blue:#3b82f6;--bg:#f3f8fb;--card:#fff;--text:#122033;--muted:#6b7a8c;--line:#dce6ec;--green:#0f9f6e;--amber:#b7791f;--red:#dc3d3d;--shadow:0 10px 28px rgba(10,37,64,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit;text-decoration:none}.app{display:flex;min-height:100vh}.sidebar{width:265px;background:linear-gradient(180deg,var(--navy),#071c31);color:#fff;position:fixed;inset:0 auto 0 0;padding:22px 16px;overflow:auto;z-index:30}.brand{display:flex;gap:12px;align-items:center;margin-bottom:24px}.brand img{width:56px;height:56px;object-fit:contain;border-radius:14px}.brand b{font-size:20px}.brand small{display:block;color:#b9cad8}.nav a{display:flex;gap:12px;align-items:center;padding:11px 13px;border-radius:11px;margin:4px 0;color:#e9f3fa}.nav a.active,.nav a:hover{background:linear-gradient(90deg,#0e638b,var(--teal));color:#fff}.nav .badge{margin-left:auto;background:#ef4444;color:#fff;border-radius:20px;padding:2px 8px;font-size:12px}.side-bottom{margin-top:30px;border-top:1px solid #ffffff22;padding-top:16px}.side-bottom a{display:block;padding:11px;border:1px solid #ffffff33;border-radius:11px;text-align:center}.main{margin-left:265px;width:calc(100% - 265px)}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;position:sticky;top:0;z-index:20;gap:15px}.hamb{display:none}.search{flex:1;max-width:680px;background:#f7fafc;border:1px solid var(--line);padding:11px 14px;border-radius:11px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.circle{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#dff4fa;color:var(--navy);font-weight:800}.content{padding:26px;max-width:1500px;margin:auto}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}.page-title h1{margin:0;font-size:30px}.page-title p{margin:5px 0 0;color:var(--muted)}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:11px;padding:11px 16px;font-weight:750;cursor:pointer;background:var(--teal);color:#fff}.btn.blue{background:var(--blue)}.btn.navy{background:var(--navy)}.btn.light{background:#eaf2f7;color:var(--navy)}.btn.red{background:#dc3d3d}.btn.outline{background:#fff;color:var(--navy);border:1px solid var(--line)}.grid{display:grid;gap:16px}.kpis{grid-template-columns:repeat(4,1fr)}.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:19px;box-shadow:var(--shadow)}.kpi .label{color:var(--muted)}.kpi .num{font-size:30px;font-weight:800;margin:8px 0}.hero{background:linear-gradient(120deg,var(--navy),var(--navy2) 55%,#0f8e9f);color:#fff;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.hero h2{font-size:28px;margin:0 0 8px}.hero p{max-width:650px;color:#d9edf4}.two{grid-template-columns:1.4fr 1fr}.three{grid-template-columns:repeat(3,1fr)}.section-head{display:flex;align-items:center;justify-content:space-between;margin:26px 0 12px}.section-head h2{margin:0}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;text-transform:uppercase;color:var(--muted);letter-spacing:.04em}.tag{display:inline-block;padding:6px 10px;border-radius:999px;font-weight:750;font-size:12px}.tag.green{background:#dff7ee;color:#0c8a5d}.tag.amber{background:#fff3cf;color:#9a6908}.tag.red{background:#ffe2e2;color:#bd2626}.tag.blue{background:#e1efff;color:#1f63b5}.service{display:flex;flex-direction:column;min-height:220px}.service .icon{font-size:30px}.service .price{font-weight:800;font-size:20px;margin-top:auto}.service p{color:var(--muted)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field label{display:block;font-weight:700;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;padding:12px;border:1px solid #cddae2;border-radius:10px;background:#fff}.field textarea{min-height:110px}.flash{padding:13px 15px;border-radius:12px;margin-bottom:15px}.flash.success{background:#dff7ee;color:#0c6f50}.flash.error{background:#ffe2e2;color:#a82121}.company-card h3{margin:8px 0}.muted{color:var(--muted)}.split{display:flex;gap:16px}.split>.grow{flex:1}.activity{border-left:2px solid #b7d9ef;padding-left:18px}.activity-item{position:relative;padding:0 0 18px}.activity-item:before{content:'';position:absolute;left:-24px;top:6px;width:10px;height:10px;border-radius:50%;background:var(--blue)}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.tabs a{padding:9px 13px;border-radius:10px;background:#eaf2f7}.tabs a.active{background:var(--navy);color:#fff}.mobile-only{display:none}.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#071c31,#0f3b5b 55%,#0f8e9f);padding:20px}.login-card{width:min(460px,100%);background:#fff;border-radius:24px;padding:30px;box-shadow:0 30px 80px #0005}.login-card img{width:260px;max-width:85%;display:block;margin:0 auto 10px}.empty{text-align:center;color:var(--muted);padding:35px}.stat-line{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.api-card{display:flex;align-items:center;gap:15px}.api-dot{width:13px;height:13px;border-radius:50%;background:#9ca3af}.api-dot.connected{background:var(--green)}.api-dot.error{background:var(--red)}.footer{padding:20px 26px;color:var(--muted);font-size:13px}.nowrap{white-space:nowrap}
@media(max-width:1000px){.kpis{grid-template-columns:repeat(2,1fr)}.three{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{width:min(84vw,330px);transform:translateX(-102%);transition:.25s}.sidebar.open{transform:none}.main{margin-left:0;width:100%}.topbar{padding:0 14px;height:70px}.hamb{display:inline-grid;width:42px;height:42px;border:1px solid var(--line);border-radius:10px;place-items:center;font-size:23px;background:#fff}.search{display:none}.content{padding:18px 14px}.page-title{align-items:center}.page-title h1{font-size:25px}.kpis{grid-template-columns:1fr 1fr}.three,.form-grid{grid-template-columns:1fr}.hero{display:block}.table-card table,.table-card thead,.table-card tbody,.table-card th,.table-card td,.table-card tr{display:block}.table-card thead{display:none}.table-card tr{border:1px solid var(--line);border-radius:14px;padding:10px;margin-bottom:12px}.table-card td{border-bottom:1px solid var(--line);display:grid;grid-template-columns:115px 1fr;gap:12px;padding:9px 4px}.table-card td:last-child{border-bottom:0}.table-card td:before{content:attr(data-label);font-size:12px;font-weight:800;text-transform:uppercase;color:var(--muted)}.mobile-only{display:block}.top-actions .name{display:none}.card{border-radius:16px}.service{min-height:0}.service .btn{width:100%}.footer{text-align:center}.split{display:block}.split>*{margin-bottom:15px}}
@media(max-width:430px){.kpis{grid-template-columns:1fr 1fr}.kpi{padding:15px}.kpi .num{font-size:25px}.top-actions{gap:8px}.circle{width:38px;height:38px}.content{padding:15px 12px}.page-title .btn{padding:10px 12px}}

/* v1.0.1 mobile/polish fixes */
.ui-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 22px}
.brand img{width:52px;height:52px;background:#fff0;border-radius:12px}.brand b{display:block;line-height:1.15}.brand small{margin-top:3px}
.company-switcher{position:absolute;left:50%;transform:translateX(-50%);width:min(420px,42vw);display:flex;justify-content:center;pointer-events:auto}.company-switcher select,.company-single{width:100%;padding:10px 40px 10px 14px;border:1px solid var(--line);border-radius:11px;background:#f7fafc;color:var(--text);font:inherit;text-align:center;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.company-single{padding-right:14px}
.bell{display:flex;align-items:center;gap:4px;font-weight:800;color:var(--navy)}.bell .ui-icon{width:21px;height:21px}.circle{text-decoration:none}.profile-mini{display:flex!important;align-items:center;gap:10px!important;text-align:left!important;margin-bottom:10px}.profile-mini span{min-width:0}.profile-mini b,.profile-mini small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-mini small{color:#b9cad8;margin-top:2px}
.hero{min-height:245px;padding:28px 30px;gap:24px}.hero-copy{position:relative;z-index:2;max-width:720px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.hero .btn{margin:0}.hero-visual{margin-left:auto;min-width:230px;align-self:stretch;display:flex;align-items:center;justify-content:center;position:relative;background:radial-gradient(circle at 68% 38%,rgba(34,211,238,.32),transparent 34%),linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.01));border-radius:18px;overflow:hidden}.hero-visual img{width:150px;height:150px;object-fit:contain;opacity:.92;filter:drop-shadow(0 18px 28px rgba(0,0,0,.25))}.hero-bars{position:absolute;bottom:24px;right:25px;display:flex;align-items:flex-end;gap:7px;opacity:.7}.hero-bars span{display:block;width:13px;border-radius:4px 4px 0 0;background:#fff}.hero-bars span:nth-child(1){height:24px}.hero-bars span:nth-child(2){height:42px}.hero-bars span:nth-child(3){height:62px}
.service-icon{width:54px;height:54px;border-radius:14px;background:linear-gradient(135deg,#e5fbf8,#e7f1ff);display:grid;place-items:center;color:var(--navy);margin-bottom:12px}.service-icon .ui-icon{width:28px;height:28px}
.table-card td,.stat-line span,.muted{overflow-wrap:anywhere;word-break:break-word}.empty-row .empty{text-align:center!important;color:var(--muted)!important}.empty-row td:before{display:none!important}.empty-row td{display:block!important;width:100%!important;grid-template-columns:1fr!important;padding:28px 12px!important;border:0!important;text-align:center!important}
.api-config{margin-bottom:16px}.api-card h3{margin:0}.full{grid-column:1/-1}.smtp-card{margin-bottom:20px}.inline-form{display:inline-block;margin-top:12px}.button-row{margin-top:4px}.help-text{font-size:13px;margin-bottom:0}.profile-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}.profile-head h3,.profile-head p{margin:0}.profile-avatar{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--navy2),var(--teal));color:#fff;font-size:25px;font-weight:850}.password-card{max-width:850px}.menu-backdrop{display:none}

@media(max-width:760px){
  .topbar{position:sticky;display:grid;grid-template-columns:48px minmax(0,1fr) 92px;align-items:center;gap:8px;padding:0 12px}.hamb{grid-column:1}.company-switcher{grid-column:2;position:static;transform:none;width:100%;min-width:0}.company-switcher select,.company-single{font-size:15px;padding:10px 30px 10px 10px;max-width:100%}.top-actions{grid-column:3;margin:0;justify-self:end}.top-actions .name{display:none}.bell{display:none}.circle{width:42px;height:42px}.sidebar{width:min(84vw,340px);padding:20px 16px}.sidebar.open+.main{} .menu-backdrop{position:fixed;inset:0;background:rgba(4,19,33,.38);z-index:25}.menu-backdrop.show{display:block}.brand{padding-right:4px}.brand img{width:48px;height:48px}.brand b{font-size:19px}.nav a{gap:11px}.profile-mini{padding:10px!important}
  .page-title{align-items:flex-start}.page-title>div{min-width:0;flex:1}.page-title .btn{flex:0 0 auto}.page-title h1{line-height:1.15}.hero{min-height:0;padding:24px 20px;display:grid;grid-template-columns:1fr}.hero h2{font-size:30px;line-height:1.1}.hero p{font-size:16px;line-height:1.4}.hero-actions{display:grid;grid-template-columns:1fr;gap:10px}.hero-actions .btn{width:100%;min-height:50px}.hero-visual{min-width:0;width:100%;height:155px;margin:0}.hero-visual img{width:105px;height:105px}.hero-bars{bottom:18px;right:22px}
  .table-card td{overflow-wrap:anywhere}.table-card tr.empty-row{padding:0}.empty-row td{min-height:110px;display:flex!important;align-items:center;justify-content:center!important}.empty{padding:28px 12px;text-align:center!important}
  .api-card{align-items:flex-start}.api-card .grow{min-width:0}.smtp-card .form-grid{grid-template-columns:1fr}.inline-form{display:block}.inline-form .btn{width:100%}.button-row .btn{width:100%}
  .profile-grid{grid-template-columns:1fr}.profile-head{align-items:center}.stat-line{align-items:flex-start}.stat-line span{text-align:right;max-width:62%}
}
@media(max-width:480px){
  .topbar{grid-template-columns:46px minmax(0,1fr) 48px}.company-switcher select,.company-single{font-size:14px}.page-title{flex-wrap:wrap}.page-title .btn{margin-left:auto}.page-title h1{font-size:26px}.hero h2{font-size:28px}.content{overflow-x:hidden}.form-grid{gap:12px}.field input,.field select,.field textarea{font-size:16px}.service{padding:20px}.service h3{font-size:21px}.footer{font-size:12px;line-height:1.45}
}

/* v1.0.2 cache-safe mobile repair */
.cell-value{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.nav .ui-icon,.service-icon .ui-icon,.bell .ui-icon,.profile-mini .ui-icon{display:block!important;max-width:28px!important;max-height:28px!important;min-width:0!important;min-height:0!important;overflow:visible!important;fill:none!important;stroke:currentColor!important}
.nav .ui-icon{width:22px!important;height:22px!important;flex:0 0 22px!important}
.service-icon .ui-icon{width:28px!important;height:28px!important}
.bell .ui-icon{width:20px!important;height:20px!important}
.profile-mini .ui-icon{width:22px!important;height:22px!important}
.brand-copy{min-width:0}.brand-copy b{color:#fff!important}.brand-copy small{color:#b9cad8!important}
.topbar{isolation:isolate}.company-switcher{z-index:1}.top-actions{z-index:2}
.empty-row .cell-value{width:100%;display:flex;align-items:center;justify-content:center;text-align:center}
.service{overflow:hidden}.service-icon{flex:0 0 54px}

@media(max-width:760px){
  .topbar{display:flex!important;position:sticky!important;padding:0 14px!important;gap:10px!important}
  .hamb{flex:0 0 44px!important}
  .company-switcher{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:clamp(190px,56vw,460px)!important;max-width:calc(100vw - 185px)!important;display:block!important}
  .company-switcher select,.company-single{width:100%!important;max-width:100%!important;text-align:center!important;text-align-last:center!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;padding:10px 32px 10px 12px!important;border-radius:12px!important}
  .top-actions{margin-left:auto!important;display:flex!important;align-items:center!important;gap:8px!important;min-width:82px!important;justify-content:flex-end!important}
  .bell{display:flex!important;position:relative!important;width:30px!important;height:40px!important;align-items:center!important;justify-content:center!important;font-size:0!important}
  .bell>span{position:absolute!important;top:2px!important;right:-2px!important;min-width:18px!important;height:18px!important;padding:0 4px!important;border-radius:10px!important;background:#ef4444!important;color:#fff!important;font-size:10px!important;line-height:18px!important;text-align:center!important}
  .bell>span:empty{display:none!important}
  .circle{flex:0 0 42px!important}
  .table-card td{min-width:0!important;grid-template-columns:105px minmax(0,1fr)!important}
  .table-card .cell-value{min-width:0!important;width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  .empty-row td{display:flex!important;min-height:100px!important;padding:20px!important}
  .empty-row .cell-value{justify-content:center!important;text-align:center!important;color:var(--muted)!important}
  .hero{padding:22px!important;gap:18px!important}
  .hero-actions{gap:12px!important;margin-top:18px!important}
  .hero-actions .btn{width:100%!important;min-height:48px!important;margin:0!important}
  .hero-visual{height:150px!important;min-height:150px!important;max-height:150px!important;margin-top:2px!important;background:radial-gradient(circle at 65% 45%,rgba(34,211,238,.28),transparent 36%),linear-gradient(145deg,rgba(255,255,255,.06),rgba(255,255,255,.01))!important}
  .hero-visual img{width:118px!important;height:118px!important;max-width:118px!important;max-height:118px!important;object-fit:contain!important}
  .service-icon{width:52px!important;height:52px!important;margin-bottom:14px!important}
  .service{padding:20px!important}
  .service h3{margin-top:6px!important}
}

@media(max-width:430px){
  .company-switcher{width:clamp(185px,55vw,235px)!important;max-width:calc(100vw - 170px)!important}
  .company-switcher select,.company-single{font-size:13px!important}
  .top-actions{min-width:76px!important;gap:5px!important}
  .bell{width:28px!important}
  .table-card td{grid-template-columns:92px minmax(0,1fr)!important}
}
