/* Adsrek Pay v15.3 — separate Shops and API pages */
.merchant-split{
  --mer-surface:rgba(12,27,45,.88);
  --mer-surface-2:rgba(15,34,55,.78);
  --mer-line:rgba(142,205,239,.13);
  --mer-line-soft:rgba(142,205,239,.08);
  --mer-text:#edf8ff;
  --mer-muted:#87a0b4;
  --mer-accent:#4f8cff;
  --mer-cyan:#31c9e2;
  --mer-green:#5be0bd;
  --mer-danger:#ff8ca0;
  display:grid;
  gap:18px;
  width:100%;
  color:var(--mer-text);
}
html[data-theme="light"] .merchant-split{
  --mer-surface:#fff;
  --mer-surface-2:#f7faff;
  --mer-line:rgba(29,91,164,.13);
  --mer-line-soft:rgba(29,91,164,.08);
  --mer-text:#102743;
  --mer-muted:#687f98;
  --mer-accent:#287bed;
  --mer-cyan:#20b9da;
  --mer-green:#168066;
  --mer-danger:#b83e59;
}
.merchant-split *{box-sizing:border-box}
.merchant-hero,
.merchant-split .mer-card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--mer-line)!important;
  border-radius:21px!important;
  background:var(--mer-surface)!important;
  color:var(--mer-text)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.12)!important;
}
.merchant-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:18px!important;
  min-height:0!important;
  padding:24px!important;
  background:
    radial-gradient(circle at 92% 0,rgba(44,155,224,.16),transparent 34%),
    linear-gradient(145deg,rgba(19,43,69,.96),rgba(9,22,37,.97))!important;
}
html[data-theme="light"] .merchant-hero{
  background:
    radial-gradient(circle at 94% 0,rgba(53,151,231,.13),transparent 34%),
    linear-gradient(145deg,#fff,#f5f9fe)!important;
}
.merchant-hero:after{
  content:"";
  position:absolute;
  right:-65px;
  top:-105px;
  width:190px;
  height:190px;
  border:1px solid rgba(89,207,238,.12);
  border-radius:50%;
  box-shadow:0 0 0 30px rgba(77,151,225,.035),0 0 0 62px rgba(44,198,220,.018);
  pointer-events:none;
}
.merchant-hero>div:first-child{position:relative;z-index:1;max-width:780px}
.merchant-hero h2{margin:7px 0 8px!important;font-size:31px!important;line-height:1.08!important;letter-spacing:-.045em!important;color:var(--mer-text)!important}
.merchant-hero p{margin:0!important;color:var(--mer-muted)!important;max-width:760px;line-height:1.65}
.merchant-eyebrow{display:inline-flex;align-items:center;gap:7px;color:#57dbe9;font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase}
html[data-theme="light"] .merchant-eyebrow{color:#167bc2}
.merchant-eyebrow:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--mer-green);box-shadow:0 0 12px rgba(47,208,178,.5)}

.mer-stats{
  position:relative;
  z-index:1;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
  margin:0!important;
}
.mer-stat{
  display:grid!important;
  align-content:center;
  gap:4px;
  min-height:84px;
  padding:15px 17px!important;
  border:1px solid var(--mer-line)!important;
  border-radius:16px!important;
  background:var(--mer-surface-2)!important;
  overflow:hidden;
}
.mer-stat:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:linear-gradient(180deg,var(--mer-accent),var(--mer-cyan))}
.mer-stat b{display:block!important;font-size:25px!important;line-height:1!important;letter-spacing:-.045em;color:var(--mer-text)!important}
.mer-stat span{display:block!important;color:var(--mer-muted)!important;font-size:10px!important;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.merchant-turnover{position:relative;z-index:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0!important}
.merchant-turnover>span{color:var(--mer-muted);font-size:11px;font-weight:800}
.merchant-turnover b{padding:7px 10px;border-radius:10px;background:rgba(48,132,219,.12);color:#86e5f1;font-size:11px}
html[data-theme="light"] .merchant-turnover b{color:#2368b3;background:#eaf3ff}

.merchant-split .mer-card{padding:20px!important}
.merchant-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:17px}
.merchant-card-head h3,.merchant-split .mer-card>h3{margin:3px 0 4px!important;font-size:19px!important;line-height:1.2;color:var(--mer-text)!important}
.merchant-card-head p{margin:0!important;color:var(--mer-muted)!important}
.merchant-step{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:23px;padding:0 7px;border-radius:8px;background:rgba(53,127,212,.14);color:#8ce5f2;font-size:10px;font-weight:950}
html[data-theme="light"] .merchant-step{background:#e7f2ff;color:#2773c9}

.mer-form,.merchant-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px!important}
.mer-form>div,.merchant-form>div{min-width:0}
.mer-form label,.merchant-form label{display:block;margin:0 0 7px;color:var(--mer-muted)!important;font-size:10px!important;font-weight:900!important;letter-spacing:.035em;text-transform:uppercase}
.mer-form input,.merchant-form input,.api-shop-picker select{
  width:100%;
  min-height:47px!important;
  border:1px solid var(--mer-line)!important;
  border-radius:13px!important;
  background:rgba(6,17,29,.62)!important;
  color:var(--mer-text)!important;
  padding:10px 13px!important;
}
html[data-theme="light"] .mer-form input,
html[data-theme="light"] .merchant-form input,
html[data-theme="light"] .api-shop-picker select{background:#f8fbff!important}
.mer-form input:focus,.merchant-form input:focus,.api-shop-picker select:focus{border-color:rgba(70,196,227,.55)!important;box-shadow:0 0 0 3px rgba(40,174,210,.1)!important;outline:0}
.merchant-submit{display:flex;align-items:flex-end}.merchant-submit .mer-btn{width:100%;min-height:47px}

.mer-btn{
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 14px!important;
  border:1px solid rgba(187,243,255,.15)!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#367be0,#1dc0db)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:900!important;
  cursor:pointer;
  text-decoration:none!important;
}
.mer-btn.gray{background:rgba(51,113,185,.13)!important;border-color:var(--mer-line)!important;color:#9eeaf5!important;box-shadow:none!important}
html[data-theme="light"] .mer-btn.gray{background:#edf5ff!important;color:#246ec1!important}
.mer-btn.red{background:linear-gradient(135deg,#b83e61,#d65270)!important}

.mer-alert{padding:13px 15px;border-radius:13px;border:1px solid;font-size:12px;font-weight:800;line-height:1.5}
.mer-alert.ok{background:rgba(32,145,119,.12);border-color:rgba(94,228,197,.18);color:#83efd8}
.mer-alert.err{background:rgba(164,40,65,.12);border-color:rgba(251,113,133,.18);color:#ff9daf}
html[data-theme="light"] .mer-alert.ok{background:#ebfaf5;color:#167c62;border-color:#cceee3}
html[data-theme="light"] .mer-alert.err{background:#fff1f3;color:#ae3954;border-color:#f2ced6}

.merchant-shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.merchant-shop-card{display:grid;gap:15px;padding:17px;border:1px solid var(--mer-line);border-radius:18px;background:var(--mer-surface-2)}
.merchant-shop-card__head{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px}
.merchant-shop-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#287bed,#23b8d8);color:#fff;font-size:17px;font-weight:900}
.merchant-shop-card__head>div:nth-child(2){display:grid;gap:3px;min-width:0}.merchant-shop-card__head b{font-size:14px;color:var(--mer-text)}
.merchant-shop-card__head span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mer-muted);font-size:10px}
.merchant-shop-card__head em,.merchant-status{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border-radius:999px;background:rgba(45,166,137,.13);color:#6ce1c6;font-size:9px;font-style:normal;font-weight:900;white-space:nowrap}
html[data-theme="light"] .merchant-shop-card__head em,html[data-theme="light"] .merchant-status{background:#eaf8f4;color:#168066}
.merchant-shop-card__head em.is-off,.merchant-status.is-off{background:rgba(190,58,85,.12);color:#ff9daf}
.merchant-shop-meta{display:grid;gap:8px;margin:0}.merchant-shop-meta>div{display:grid;grid-template-columns:74px minmax(0,1fr);gap:10px}.merchant-shop-meta dt{color:var(--mer-muted);font-size:10px}.merchant-shop-meta dd{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mer-text);font-size:10px}.merchant-shop-actions{display:flex;gap:8px;flex-wrap:wrap}.merchant-shop-actions form{margin:0}

.merchant-empty{display:grid;justify-items:center;gap:6px;padding:28px;border:1px dashed var(--mer-line);border-radius:17px;background:var(--mer-surface-2);text-align:center}.merchant-empty b{font-size:14px;color:var(--mer-text)}.merchant-empty span{color:var(--mer-muted);font-size:11px}.merchant-empty--large{padding:50px 20px}.merchant-empty--large .mer-btn{margin-top:10px}.merchant-empty-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:17px;background:linear-gradient(135deg,#287bed,#23b8d8);color:#fff;font-size:22px}

.merchant-table-wrap{overflow:auto;border:1px solid var(--mer-line-soft);border-radius:15px}.merchant-table{width:100%;min-width:780px;border-collapse:collapse!important;background:transparent!important;border:0!important}.merchant-table th,.merchant-table td{padding:12px 10px!important;border-bottom:1px solid var(--mer-line-soft)!important;text-align:left;vertical-align:middle;font-size:11px;color:var(--mer-text)}.merchant-table tr:last-child td{border-bottom:0!important}.merchant-table th{color:var(--mer-muted)!important;font-size:9px!important;letter-spacing:.07em;text-transform:uppercase;background:var(--mer-surface-2)!important}.merchant-table code{padding:4px 6px;border-radius:7px;background:rgba(48,132,219,.13);color:#9ce6f2}.merchant-status{background:rgba(45,166,137,.13)}

.api-shop-picker{display:flex;align-items:center;justify-content:space-between;gap:20px}.api-shop-picker h3{margin:3px 0!important}.api-shop-picker p{margin:0!important}.api-shop-picker form{min-width:300px}.api-credentials-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:14px}.api-key-field{display:grid;gap:7px;margin-bottom:12px}.api-key-field>span{color:var(--mer-muted);font-size:9px;font-weight:950;letter-spacing:.08em}.api-key-field>div{display:grid;grid-template-columns:minmax(0,1fr) auto;border:1px solid var(--mer-line);border-radius:13px;overflow:hidden;background:var(--mer-surface-2)}.api-key-field code{display:block;overflow:auto;padding:12px;color:#bceefa;white-space:nowrap}.api-key-field button{border:0;border-left:1px solid var(--mer-line);background:rgba(51,113,185,.16);color:#8de4f1;padding:0 13px;font-size:10px;font-weight:900;cursor:pointer}.api-warning{padding:12px 13px;border:1px solid rgba(251,191,117,.15);border-radius:13px;background:rgba(175,103,31,.09);color:#d8b682;font-size:10px;line-height:1.55;margin:13px 0}.api-quick-start{display:grid;align-content:start}.api-endpoint{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 9px;padding:12px 0;border-bottom:1px solid var(--mer-line-soft)}.api-endpoint>span{grid-row:1/3;align-self:center;padding:5px 7px;border-radius:7px;background:rgba(45,166,137,.13);color:#6ce1c6;font-size:8px;font-weight:950}.api-endpoint code{overflow:hidden;text-overflow:ellipsis;color:#87e3f0;font-size:10px;white-space:nowrap}.api-endpoint b{font-size:11px;color:var(--mer-text)}.api-docs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mer-code{display:block;overflow:auto;padding:10px 12px;border-radius:11px;background:#071523!important;color:#bceefa!important}.mer-pre{overflow:auto;min-height:215px;padding:14px;border-radius:13px;background:#050d17!important;color:#b9e9f7!important;border:1px solid var(--mer-line)!important;font-size:10px;line-height:1.6}.merchant-http{display:inline-flex;padding:4px 7px;border-radius:7px;background:rgba(78,111,139,.18);color:var(--mer-muted);font-weight:900}.merchant-http.is-ok{background:rgba(45,166,137,.13);color:#6ce1c6}.merchant-http.is-error{background:rgba(190,58,85,.12);color:#ff9daf}.api-log-response{display:block;max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mer-muted)}
html[data-theme="light"] .api-key-field code{color:#1c4164}html[data-theme="light"] .api-key-field button{background:#eaf4ff;color:#236ec0}html[data-theme="light"] .api-warning{background:#fff9ee;border-color:#f2d7a7;color:#8c641d}html[data-theme="light"] .api-endpoint code{color:#236bb5}html[data-theme="light"] .mer-code{background:#eef5fc!important;color:#1f5588!important}html[data-theme="light"] .mer-pre{background:#f7faff!important;color:#294b6b!important}

@media(max-width:1050px){.merchant-shop-grid,.api-credentials-grid,.api-docs{grid-template-columns:1fr}}
@media(max-width:760px){.merchant-hero{padding:19px!important}.merchant-hero h2{font-size:27px!important}.mer-stats{grid-template-columns:1fr}.mer-form,.merchant-form{grid-template-columns:1fr}.api-shop-picker{align-items:stretch;flex-direction:column}.api-shop-picker form{min-width:0;width:100%}.merchant-shop-card__head{grid-template-columns:42px minmax(0,1fr)}.merchant-shop-card__head em{grid-column:2;justify-self:start}.merchant-split .mer-card{padding:16px!important}}

/* Adsrek Pay v15.5 — Connection, API directory and Sites */
.sites-hero,.api-directory-hero{grid-template-columns:minmax(0,1fr) auto!important;align-items:center}
.sites-hero-actions{position:relative;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}

.connection-hero{grid-template-columns:minmax(0,1fr) minmax(310px,.65fr)!important;align-items:center}
.connection-summary{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.connection-summary>div{display:grid;gap:3px;min-height:78px;padding:14px;border:1px solid var(--mer-line);border-radius:15px;background:rgba(8,22,37,.38)}
html[data-theme="light"] .connection-summary>div{background:rgba(255,255,255,.72)}
.connection-summary b{font-size:23px;line-height:1;color:var(--mer-text)}
.connection-summary span{color:var(--mer-muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.055em}
.connection-methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.connection-method-card{display:grid!important;grid-template-rows:auto 1fr auto;gap:15px;min-height:330px}
.connection-method-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#2d7eea,#23bdd8);color:#fff;font-size:18px;font-weight:950;box-shadow:0 12px 26px rgba(20,123,207,.2)}
.connection-method-card h3{margin:9px 0 7px!important;font-size:19px!important;color:var(--mer-text)!important}
.connection-method-card p{line-height:1.6}
.connection-feature-list{display:grid;gap:8px;margin:15px 0 0;padding:0;list-style:none}
.connection-feature-list li{position:relative;padding-left:18px;color:var(--mer-muted);font-size:10px;line-height:1.45}
.connection-feature-list li:before{content:"✓";position:absolute;left:0;top:0;color:var(--mer-green);font-weight:950}
.connection-method-card>.mer-btn{width:100%}
.connection-help-card{display:grid!important;grid-template-columns:minmax(260px,.7fr) minmax(0,1.3fr);align-items:center;gap:24px}
.connection-help-card h3{margin:6px 0!important}.connection-help-card p{margin:0!important}
.connection-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.connection-steps span{display:flex;align-items:center;gap:8px;min-height:54px;padding:10px;border:1px solid var(--mer-line);border-radius:13px;background:var(--mer-surface-2);color:var(--mer-text);font-size:10px;font-weight:800}
.connection-steps b{width:25px;height:25px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:rgba(51,132,219,.16);color:#87e5f2}
html[data-theme="light"] .connection-steps b{color:#236fbd;background:#e8f3ff}

.sites-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.site-kpi{display:grid!important;gap:5px;min-height:120px;align-content:center}
.site-kpi>span{color:var(--mer-muted);font-size:9px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.site-kpi>b{font-size:29px;line-height:1;color:var(--mer-text)}
.site-kpi small{color:var(--mer-muted);font-size:9px}
.site-kpi--turnover>div{display:flex;gap:6px;flex-wrap:wrap}.site-kpi--turnover b{font-size:13px;padding:6px 8px;border-radius:9px;background:rgba(51,132,219,.12);color:#88e4f0}
html[data-theme="light"] .site-kpi--turnover b{color:#246ab6;background:#eaf3ff}
.merchant-shop-grid--sites{grid-template-columns:repeat(2,minmax(0,1fr))}
.site-entry-card{min-height:245px}
.site-entry-id{padding:8px 10px;border-radius:10px;background:rgba(51,132,219,.09);color:var(--mer-muted);font-size:10px}.site-entry-id b{color:var(--mer-text)}

.api-directory-card{display:grid!important;gap:15px}
.api-client-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.api-client-card{display:grid;grid-template-columns:44px minmax(0,1fr) 26px;gap:12px;align-items:center;padding:15px;border:1px solid var(--mer-line);border-radius:16px;background:var(--mer-surface-2);text-decoration:none!important;transition:.18s ease}
.api-client-card:hover,.api-client-card.is-selected{border-color:rgba(62,189,221,.4);transform:translateY(-1px);box-shadow:0 12px 28px rgba(0,0,0,.1)}
.api-client-card.is-selected{background:linear-gradient(135deg,rgba(42,111,190,.18),rgba(31,172,197,.08))}
.api-client-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#2d7eea,#23bdd8);color:#fff;font-size:17px;font-weight:950}
.api-client-main{display:grid;gap:3px;min-width:0}.api-client-main b{color:var(--mer-text);font-size:13px}.api-client-main span,.api-client-main small{color:var(--mer-muted);font-size:9px}.api-client-main em{justify-self:start;padding:4px 7px;border-radius:999px;background:rgba(45,166,137,.13);color:#6ce1c6;font-size:8px;font-style:normal;font-weight:900}.api-client-main em.is-off{background:rgba(190,58,85,.12);color:#ff9daf}.api-client-edit{color:#6dcfe1;font-size:24px;text-align:center}
html[data-theme="light"] .api-client-main em{background:#eaf8f4;color:#168066}html[data-theme="light"] .api-client-main em.is-off{background:#fff0f3;color:#b4425d}
.api-state-list{display:grid;gap:0;margin-bottom:15px;border:1px solid var(--mer-line);border-radius:14px;overflow:hidden}
.api-state-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:12px;border-bottom:1px solid var(--mer-line-soft);background:var(--mer-surface-2)}
.api-state-list>div:last-child{border-bottom:0}.api-state-list span{color:var(--mer-muted);font-size:10px}.api-state-list b{color:var(--mer-text);font-size:10px;text-align:right}
.api-endpoints-card{display:grid!important;gap:12px}.api-endpoint-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.api-endpoint-grid .api-endpoint{padding:13px;border:1px solid var(--mer-line);border-radius:14px;background:var(--mer-surface-2)}

@media(max-width:1120px){
  .connection-methods{grid-template-columns:1fr}
  .connection-method-card{min-height:0}
  .connection-help-card{grid-template-columns:1fr}
  .sites-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .api-endpoint-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  .sites-hero,.api-directory-hero,.connection-hero{grid-template-columns:1fr!important}
  .sites-hero-actions{justify-content:flex-start}
  .connection-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .api-client-grid,.merchant-shop-grid--sites{grid-template-columns:1fr}
  .connection-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .connection-summary,.sites-overview-grid,.connection-steps{grid-template-columns:1fr}
  .sites-hero-actions{display:grid;grid-template-columns:1fr;width:100%}
  .api-client-card{grid-template-columns:40px minmax(0,1fr) 20px;padding:12px}
}

/* ========================================================================== 
   Adsrek Pay — My sites colour polish, 2026-08-26
   Scoped to .sites-page. No template/logic changes are required.
   Selectors intentionally outrank older page-level overrides.
   ========================================================================== */

html body .sites-page .site-entry-card{
  background:linear-gradient(180deg,#102238 0%,#0c1b2d 100%)!important;
  border:1px solid #25415f!important;
  box-shadow:0 8px 22px rgba(0,0,0,.18)!important;
}
html body .sites-page .site-entry-card:hover{
  border-color:#35638f!important;
  box-shadow:0 11px 28px rgba(0,0,0,.24)!important;
}
html body .sites-page .merchant-shop-card__head b{color:#f0f7ff!important}
html body .sites-page .merchant-shop-card__head span{color:#86a8c7!important}
html body .sites-page .merchant-shop-card__head em.is-on{
  background:rgba(42,187,139,.14)!important;
  border:1px solid rgba(78,224,178,.24)!important;
  color:#6de4b7!important;
}
html body .sites-page .merchant-shop-card__head em.is-off{
  background:rgba(214,74,98,.12)!important;
  border:1px solid rgba(255,111,137,.22)!important;
  color:#ff9caf!important;
}
html body .sites-page .site-entry-id{
  background:#142d4b!important;
  border:1px solid #284c73!important;
  color:#9fbad4!important;
}
html body .sites-page .site-entry-id span{color:#76bfff!important}
html body .sites-page .site-entry-id b{color:#eef7ff!important}
html body .sites-page .merchant-shop-meta dt{color:#7998b7!important}
html body .sites-page .merchant-shop-meta dd{
  color:#d7e8f7!important;
  overflow-wrap:anywhere;
  word-break:break-word;
}
html body .sites-page .merchant-shop-meta dd:first-of-type{color:#8ed5ff!important}

/* Configure: the first direct link in the site action row. */
html body .sites-page .merchant-shop-actions>a.mer-btn.gray,
html body .sites-page .merchant-shop-actions .site-action-config{
  background:linear-gradient(135deg,#1d669b,#2387bd)!important;
  border:1px solid #3b91bd!important;
  color:#f3fbff!important;
  box-shadow:0 7px 16px rgba(22,110,164,.18)!important;
}
html body .sites-page .merchant-shop-actions>a.mer-btn.gray:hover,
html body .sites-page .merchant-shop-actions .site-action-config:hover{filter:brightness(1.09)!important}

/* Disable: active site's toggle button. */
html body .sites-page .merchant-shop-actions>form .mer-btn.red,
html body .sites-page .merchant-shop-actions .site-action-toggle.red{
  background:linear-gradient(135deg,#76551a,#976f22)!important;
  border:1px solid #aa8030!important;
  color:#ffe7aa!important;
  box-shadow:0 7px 16px rgba(130,92,25,.15)!important;
}

/* Enable: inactive site's toggle button. */
html body .sites-page .merchant-shop-actions>form .mer-btn.gray,
html body .sites-page .merchant-shop-actions .site-action-toggle.gray{
  background:rgba(38,139,98,.16)!important;
  border:1px solid rgba(74,201,148,.28)!important;
  color:#7ce1b4!important;
  box-shadow:none!important;
}

/* Delete is the only destructive red action. */
html body .sites-page .merchant-shop-actions>.merchant-delete-trigger,
html body .sites-page .merchant-shop-actions .site-action-delete,
html body .sites-page .merchant-delete-panel .mer-btn.red{
  background:linear-gradient(135deg,#843344,#a13d50)!important;
  border:1px solid #af5364!important;
  color:#ffdce3!important;
  box-shadow:0 7px 16px rgba(142,50,70,.16)!important;
}
html body .sites-page .merchant-shop-actions>.merchant-delete-trigger:hover,
html body .sites-page .merchant-shop-actions .site-action-delete:hover,
html body .sites-page .merchant-delete-panel .mer-btn.red:hover{filter:brightness(1.08)!important}

/* Add site buttons. */
html body .sites-page a.mer-btn[href="#add-site"],
html body .sites-page .site-add-btn{
  background:linear-gradient(135deg,#356fe4,#4388f4)!important;
  border:1px solid #6399f6!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(50,107,220,.22)!important;
}
html body .sites-page a.mer-btn[href="#add-site"]:hover,
html body .sites-page .site-add-btn:hover{filter:brightness(1.08)!important}

/* Light theme. */
html[data-theme="light"] body .sites-page .site-entry-card{
  background:#fff!important;
  border-color:#d8e4ef!important;
  box-shadow:0 8px 20px rgba(33,67,96,.07)!important;
}
html[data-theme="light"] body .sites-page .merchant-shop-card__head b{color:#18334d!important}
html[data-theme="light"] body .sites-page .merchant-shop-card__head span,
html[data-theme="light"] body .sites-page .merchant-shop-meta dt{color:#65809a!important}
html[data-theme="light"] body .sites-page .site-entry-id{
  background:#eef6ff!important;
  border-color:#d4e6f7!important;
  color:#607b95!important;
}
html[data-theme="light"] body .sites-page .site-entry-id b{color:#173b5e!important}
html[data-theme="light"] body .sites-page .merchant-shop-meta dd{color:#2b4a66!important}
html[data-theme="light"] body .sites-page .merchant-shop-meta dd:first-of-type{color:#176ea6!important}

/* ========================================================================== 
   Adsrek Pay — Merchant create forms polish v2, 2026-08-26
   Fixes oversized native checkboxes and turns Callback/Redirect into compact
   setting cards. CSS only: no PHP/template/database changes.
   ========================================================================== */

/* Keep both creation blocks clean and vertically separated. */
html body .sites-page .sites-create-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:18px!important;
}
html body .sites-page .merchant-create-card{
  padding:22px!important;
  overflow:visible!important;
}
html body .sites-page .merchant-create-card .merchant-card-head{
  margin-bottom:18px!important;
  padding-bottom:15px!important;
  border-bottom:1px solid var(--mer-line)!important;
}
html body .sites-page .merchant-create-card .merchant-card-head h3{
  margin-top:5px!important;
  font-size:20px!important;
}
html body .sites-page .merchant-create-card .merchant-card-head .muted{
  margin-top:5px!important;
  max-width:760px;
  font-size:11px!important;
  line-height:1.55!important;
}

/* Two-column form: main fields, then compact integration setting rows. */
html body .sites-page .merchant-channel-form{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px 16px!important;
  align-items:start!important;
}
html body .sites-page .merchant-channel-form>div{
  min-width:0!important;
}

/* Normal text/url inputs stay compact. */
html body .sites-page .merchant-channel-form input:not([type="checkbox"]){
  min-height:44px!important;
  height:44px!important;
  border-radius:12px!important;
  padding:9px 12px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
html body .sites-page .merchant-channel-form>div>label,
html body .sites-page .merchant-toggle-fields>label,
html body .sites-page .merchant-toggle-grid label{
  margin-bottom:6px!important;
  color:#8da9c5!important;
  font-size:9px!important;
  line-height:1.2!important;
  letter-spacing:.055em!important;
}

/* Setting card on the left side of each row. */
html body .sites-page .merchant-switch-row{
  min-height:82px!important;
  padding:13px 14px!important;
  border:1px solid #25415f!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,rgba(18,40,65,.88),rgba(13,31,51,.88))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.018)!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease!important;
}
html body .sites-page .merchant-switch-row:has(input[type="checkbox"]:checked){
  border-color:rgba(62,153,217,.52)!important;
  background:linear-gradient(180deg,rgba(18,48,78,.94),rgba(13,35,58,.94))!important;
  box-shadow:inset 3px 0 0 #3d8fe5!important;
}

/* Entire card is clickable. */
html body .sites-page .merchant-switch{
  position:relative!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  min-height:54px!important;
  margin:0!important;
  color:var(--mer-text)!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  cursor:pointer!important;
}

/* Hide the browser's huge checkbox caused by the generic input rule. */
html body .sites-page .merchant-switch>input[type="checkbox"]{
  position:absolute!important;
  left:0!important;
  top:50%!important;
  width:1px!important;
  min-width:1px!important;
  height:1px!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  opacity:0!important;
  pointer-events:none!important;
  box-shadow:none!important;
}

/* Custom switch track. */
html body .sites-page .merchant-switch>i{
  position:relative!important;
  display:block!important;
  width:42px!important;
  height:24px!important;
  margin:0!important;
  border:1px solid #385572!important;
  border-radius:999px!important;
  background:#172b40!important;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.22)!important;
  transition:.18s ease!important;
}
html body .sites-page .merchant-switch>i:after{
  content:""!important;
  position:absolute!important;
  left:3px!important;
  top:3px!important;
  width:16px!important;
  height:16px!important;
  border-radius:50%!important;
  background:#92a9bd!important;
  box-shadow:0 2px 6px rgba(0,0,0,.28)!important;
  transition:.18s ease!important;
}
html body .sites-page .merchant-switch>input[type="checkbox"]:checked+i{
  border-color:#4ba4ec!important;
  background:linear-gradient(135deg,#2b72d6,#25a6c8)!important;
  box-shadow:0 0 0 3px rgba(64,153,224,.09),inset 0 2px 5px rgba(0,0,0,.12)!important;
}
html body .sites-page .merchant-switch>input[type="checkbox"]:checked+i:after{
  left:21px!important;
  background:#fff!important;
}
html body .sites-page .merchant-switch>input[type="checkbox"]:focus-visible+i{
  outline:2px solid rgba(94,185,247,.8)!important;
  outline-offset:2px!important;
}

/* Switch copy. */
html body .sites-page .merchant-switch>span{
  display:grid!important;
  gap:4px!important;
  min-width:0!important;
}
html body .sites-page .merchant-switch>span>b{
  color:#edf7ff!important;
  font-size:12px!important;
  line-height:1.25!important;
  font-weight:850!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
html body .sites-page .merchant-switch>span>small{
  display:block!important;
  color:#7f9dbb!important;
  font-size:10px!important;
  line-height:1.45!important;
  font-weight:500!important;
  letter-spacing:0!important;
  text-transform:none!important;
}

/* URL fields on the right side use matching cards. */
html body .sites-page .merchant-toggle-fields,
html body .sites-page .merchant-toggle-grid{
  min-height:82px!important;
  padding:12px 13px!important;
  border:1px solid #25415f!important;
  border-radius:14px!important;
  background:rgba(9,24,40,.52)!important;
  align-content:center!important;
}
html body .sites-page .merchant-toggle-fields{
  display:grid!important;
  grid-template-columns:1fr!important;
}
html body .sites-page .merchant-toggle-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
html body .sites-page .merchant-toggle-fields[hidden],
html body .sites-page .merchant-toggle-grid[hidden]{
  display:none!important;
}
html body .sites-page .merchant-toggle-fields.is-disabled,
html body .sites-page .merchant-toggle-grid.is-disabled{
  opacity:.56!important;
}
html body .sites-page .merchant-toggle-fields input,
html body .sites-page .merchant-toggle-grid input{
  min-height:42px!important;
  height:42px!important;
  background:#091a2b!important;
  border-color:#294764!important;
}

/* Submit row: compact primary action instead of a giant half-screen button. */
html body .sites-page .merchant-submit{
  grid-column:1/-1!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  margin-top:2px!important;
  padding-top:14px!important;
  border-top:1px solid var(--mer-line-soft)!important;
}
html body .sites-page .merchant-submit .mer-btn{
  width:auto!important;
  min-width:210px!important;
  min-height:44px!important;
  padding:0 22px!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#356fe4,#28a9cf)!important;
  border:1px solid rgba(116,196,244,.34)!important;
  box-shadow:0 8px 20px rgba(39,111,199,.22)!important;
}
html body .sites-page .merchant-submit .mer-btn:hover{
  filter:brightness(1.08)!important;
  transform:translateY(-1px)!important;
}

/* App helper under IP:Port. */
html body .sites-page .merchant-channel-form div>.muted{
  display:block!important;
  margin-top:6px!important;
  color:#7896b4!important;
  font-size:9px!important;
  line-height:1.4!important;
}

/* Light theme equivalents. */
html[data-theme="light"] body .sites-page .merchant-switch-row{
  border-color:#d8e5f1!important;
  background:#f7fbff!important;
  box-shadow:none!important;
}
html[data-theme="light"] body .sites-page .merchant-switch-row:has(input[type="checkbox"]:checked){
  border-color:#b9d8f4!important;
  background:#f0f7ff!important;
  box-shadow:inset 3px 0 0 #3b83d7!important;
}
html[data-theme="light"] body .sites-page .merchant-switch>i{
  border-color:#c3d4e3!important;
  background:#dce8f2!important;
}
html[data-theme="light"] body .sites-page .merchant-switch>i:after{background:#7f98ae!important}
html[data-theme="light"] body .sites-page .merchant-switch>input[type="checkbox"]:checked+i:after{background:#fff!important}
html[data-theme="light"] body .sites-page .merchant-switch>span>b{color:#18334d!important}
html[data-theme="light"] body .sites-page .merchant-switch>span>small{color:#6c849d!important}
html[data-theme="light"] body .sites-page .merchant-toggle-fields,
html[data-theme="light"] body .sites-page .merchant-toggle-grid{
  border-color:#d8e5f1!important;
  background:#fbfdff!important;
}
html[data-theme="light"] body .sites-page .merchant-toggle-fields input,
html[data-theme="light"] body .sites-page .merchant-toggle-grid input{
  background:#fff!important;
  border-color:#d4e2ee!important;
}

/* Tablet/mobile: stack each setting card and its fields cleanly. */
@media(max-width:900px){
  html body .sites-page .merchant-channel-form{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  html body .sites-page .merchant-toggle-grid{
    grid-template-columns:1fr!important;
  }
  html body .sites-page .merchant-submit{
    grid-column:1!important;
  }
  html body .sites-page .merchant-submit .mer-btn{
    width:100%!important;
    min-width:0!important;
  }
}

/* Adsrek Pay — Sites form row-lock polish v3 (2026-08-26)
   Keep each integration switch and its URL fields on the same visual row,
   even when one of the optional field blocks is hidden. */
@media (min-width:901px){
  /* Site form: row 1 = identity, row 2 = callback, row 3 = redirect, row 4 = submit. */
  html body .sites-page #add-site .merchant-channel-form > div:nth-of-type(1){grid-column:1!important;grid-row:1!important}
  html body .sites-page #add-site .merchant-channel-form > div:nth-of-type(2){grid-column:2!important;grid-row:1!important}
  html body .sites-page #add-site .merchant-channel-form > div:nth-of-type(3){grid-column:1!important;grid-row:2!important}
  html body .sites-page #site-callback-fields{grid-column:2!important;grid-row:2!important}
  html body .sites-page #add-site .merchant-channel-form > div:nth-of-type(5){grid-column:1!important;grid-row:3!important}
  html body .sites-page #site-redirect-fields{grid-column:2!important;grid-row:3!important}
  html body .sites-page #add-site .merchant-submit{grid-column:1/-1!important;grid-row:4!important}

  /* App form uses the same stable row model. */
  html body .sites-page #add-app .merchant-channel-form > div:nth-of-type(1){grid-column:1!important;grid-row:1!important}
  html body .sites-page #add-app .merchant-channel-form > div:nth-of-type(2){grid-column:2!important;grid-row:1!important}
  html body .sites-page #add-app .merchant-channel-form > div:nth-of-type(3){grid-column:1!important;grid-row:2!important}
  html body .sites-page #app-callback-fields{grid-column:2!important;grid-row:2!important}
  html body .sites-page #add-app .merchant-channel-form > div:nth-of-type(5){grid-column:1!important;grid-row:3!important}
  html body .sites-page #app-redirect-fields{grid-column:2!important;grid-row:3!important}
  html body .sites-page #add-app .merchant-submit{grid-column:1/-1!important;grid-row:4!important}
}

/* More balanced action area and disabled state. */
html body .sites-page .merchant-switch-row:not(:has(input[type="checkbox"]:checked)){
  background:linear-gradient(180deg,rgba(15,33,54,.80),rgba(11,27,45,.80))!important;
  border-color:#213b56!important;
  box-shadow:none!important;
}
html body .sites-page .merchant-switch-row:not(:has(input[type="checkbox"]:checked)) .merchant-switch>span>b{
  color:#c7d7e6!important;
}
html body .sites-page .merchant-submit{
  min-height:62px!important;
}
html body .sites-page .merchant-submit .mer-btn{
  min-width:220px!important;
  font-size:11px!important;
  letter-spacing:.01em!important;
}
html[data-theme="light"] body .sites-page .merchant-switch-row:not(:has(input[type="checkbox"]:checked)){
  background:#f8fbfe!important;
  border-color:#dce7f0!important;
}
html[data-theme="light"] body .sites-page .merchant-switch-row:not(:has(input[type="checkbox"]:checked)) .merchant-switch>span>b{
  color:#526b82!important;
}
