/* Frontend styles on WooCommerce My Account */
.sg365m-account .sg365m-banner{
  padding:16px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.08);
  margin-bottom:14px;
}
.sg365m-banner--warn{ background: rgba(255, 220, 0, .12); }
.sg365m-banner--ok{ background: rgba(0, 200, 120, .10); }

.sg365m-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin:14px 0;
}

.sg365m-kv{
  list-style: none;
  margin: 0;
  padding: 0;
}
.sg365m-kv li{
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.sg365m-domain-list-front{
  padding-left:18px;
}
.sg365m-domain-list-front li{
  margin:6px 0;
}

/* ===== Professional modal (Stripe/Google-ish) ===== */
body.sg365m-modal-open{ overflow:hidden; }

.sg365m-front-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition: opacity .18s ease;
}

.sg365m-front-modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sg365m-front-modal.is-open{
  opacity:1;
  pointer-events:auto;
}

.sg365m-front-modal.is-closing{
  opacity:0;
  pointer-events:none;
}

.sg365m-front-modal-inner{
  width: min(720px, 100%);
  background:#fff;
  border-radius:18px;
  padding:22px 22px 18px;
  position:relative;
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
  transform: translateY(10px) scale(.98);
  opacity:.98;
  transition: transform .18s ease, opacity .18s ease;
  border: 1px solid rgba(17, 24, 39, .08);
  z-index:1;
}

.sg365m-front-modal.is-open .sg365m-front-modal-inner{
  transform: translateY(0) scale(1);
  opacity:1;
}

.sg365m-front-modal-inner.sg365m-scrollable{
  max-height: 82vh;
  overflow:auto;
}

.sg365m-front-close,
.sg365m-front-modal__close{
  position:absolute;
  top: 22px;
  right: 22px;
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(17, 24, 39, .12);
  border-radius:999px;
  background: rgba(255,255,255,.85);
  cursor:pointer;
  font-size:18px;
  line-height:1;
  z-index:2;
}

.sg365m-front-close:hover,
.sg365m-front-modal__close:hover{
  background:#fff;
  border-color: rgba(17, 24, 39, .22);
}

.sg365m-front-modal h2,
.sg365m-front-modal h3{
  margin-top:0;
  padding-right:40px;
}

/* Responsive table wrapper */
.sg365m-table-wrap{ overflow:auto; -webkit-overflow-scrolling: touch; }
.sg365m-table-wrap table{ min-width:640px; }

/* Ticket / logs chat style */
.sg365m-status-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  border:1px solid rgba(17,24,39,.10);
  background:rgba(17,24,39,.04);
}
.sg365m-status-badge--open{ background:rgba(37,99,235,.10); border-color:rgba(37,99,235,.20); }
.sg365m-status-badge--resolved{ background:rgba(22,163,74,.10); border-color:rgba(22,163,74,.20); }
.sg365m-status-badge--reopened{ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.25); }

.sg365m-chat{ display:flex; flex-direction:column; gap:10px; }
.sg365m-msg{ max-width:92%; padding:12px 12px; border-radius:14px; border:1px solid rgba(17,24,39,.10); }
.sg365m-msg__meta{ display:flex; gap:10px; justify-content:space-between; font-size:12px; opacity:.75; margin-top:6px; }
.sg365m-msg--customer{ align-self:flex-end; background:rgba(37,99,235,.08); border-color:rgba(37,99,235,.18); }
.sg365m-msg--admin{ align-self:flex-start; background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.18); }

.sg365m-front-modal .button,
.sg365m-front-modal button.button{
  border-radius: 12px;
}

.sg365m-alert{
  padding:14px;
  border-radius:14px;
  border:1px solid #ffb6b6;
  background:#ffecec;
  color:#8b0000;
}

.sg365m-alert.sg365m-alert-info{border-color:rgba(79,124,255,.22);background:rgba(79,124,255,.08);color:#1a3d8f;}
.sg365m-alert.sg365m-alert-warning{border-color:rgba(245,158,11,.22);background:rgba(245,158,11,.10);color:#8a5a00;}
.sg365m-alert.sg365m-alert-success{border-color:rgba(0,217,130,.22);background:rgba(0,217,130,.10);color:#0b5a3c;}
.sg365m-alert.sg365m-alert-danger{border-color:rgba(255,77,79,.22);background:rgba(255,77,79,.10);color:#8a0f23;}

/* ===== Responsive tables (all devices) ===== */
.sg365m-table-wrap{ overflow:auto; -webkit-overflow-scrolling:touch; }
.sg365m-table-wrap table{ min-width: 640px; }

/* ===== Ticket / replies (Stripe-ish chat) ===== */
.sg365m-chat{ display:flex; flex-direction:column; gap:10px; margin:12px 0 0; }
.sg365m-msg{ max-width: 92%; padding:12px 14px; border-radius:16px; border:1px solid rgba(17,24,39,.10); box-shadow: 0 8px 24px rgba(17,24,39,.06); }
.sg365m-msg__meta{ display:flex; justify-content:space-between; gap:10px; font-size:12px; opacity:.72; margin-bottom:6px; }
.sg365m-msg--customer{ align-self:flex-end; background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.18); }
.sg365m-msg--admin{ align-self:flex-start; background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.18); }
.sg365m-status-pill{ display:inline-block; padding:6px 10px; border-radius:999px; font-size:12px; border:1px solid rgba(17,24,39,.10); background: rgba(17,24,39,.04); }
.sg365m-status-pill--open{ background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.18); }
.sg365m-status-pill--resolved{ background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.18); }
.sg365m-status-pill--reopened{ background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.18); }

/* ===== SG365M premium modal bits (theme-compatible) ===== */
.sg365m-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;}
.sg365m-modal-body{font-size:14px;line-height:1.5;color:var(--sg365-text, #111);}
.sg365m-chip{display:inline-block;padding:4px 10px;border-radius:999px;background:rgba(79,124,255,.10);border:1px solid rgba(79,124,255,.18);margin:2px 6px 2px 0;font-size:12px;}
.sg365m-box{padding:12px;border-radius:12px;border:1px solid rgba(0,0,0,.08);background:rgba(255,255,255,.65);}
.sg365m-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width: 680px){.sg365m-grid-2{grid-template-columns:1fr;}}
.sg365m-section-title{display:flex;align-items:center;gap:8px;font-weight:700;margin:0 0 10px;color:#0f172a;font-size:13px;letter-spacing:.2px;opacity:.95;}
.sg365m-section-title i{opacity:.8;}
.sg365m-muted{opacity:.72;font-size:13px;}
.sg365m-strong{font-weight:800;font-size:15px;}
.sg365m-kv{display:grid;grid-template-columns: 140px 1fr;gap:10px;padding:8px 0;border-bottom:1px dashed rgba(0,0,0,.10);}
.sg365m-kv:last-child{border-bottom:none;}
.sg365m-k{opacity:.72;font-size:12px;font-weight:700;}
.sg365m-v{font-size:13px;font-weight:600;color:#111827;}
.sg365m-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.sg365m-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:rgba(79,124,255,.10);border:1px solid rgba(79,124,255,.18);font-size:12px;font-weight:700;color:#1a3d8f;text-decoration:none;}
.sg365m-chip:hover{filter:brightness(1.02);transform:translateY(-1px);}
.sg365m-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(0,0,0,.08);background:#f5f7ff;}
.sg365m-badge--active{background:#e9f9f0;border-color:#bfe9cf;color:#0d6b3a;}
.sg365m-badge--pending{background:#fff7e6;border-color:#ffe0a3;color:#8a5a00;}
.sg365m-badge--overdue{background:#ffecec;border-color:#ffbdbd;color:#8b0000;}
.sg365m-badge--inactive{background:#eef2f7;border-color:#d8e0ea;color:#344054;}
.sg365m-badge--suspended{background:#fff0f6;border-color:#ffc2d9;color:#a61e4d;}
.sg365m-badge--work_done{background:#e7f5ff;border-color:#b3ddff;color:#0b4f7a;}
.sg365m-badge--info{background:#eef4ff;border-color:#c7d8ff;color:#1a3d8f;}

/* Notification bell (theme integration) */
.sg365m-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:999px;border:1px solid rgba(0,0,0,.08);background:rgba(255,255,255,.75);cursor:pointer;}
.sg365m-bell__badge{position:absolute;top:6px;right:6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ff3b30;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;line-height:1;}
.sg365m-bell__panel{position:absolute;top:48px;right:0;width:320px;max-width:86vw;background:#fff;border:1px solid rgba(0,0,0,.10);border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.10);overflow:hidden;z-index:99999;display:none;}
.sg365m-bell__panel.is-open{display:block;animation:sg365mPop .16s ease-out;}
.sg365m-bell__item{padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.06);}
.sg365m-bell__item:last-child{border-bottom:none;}
.sg365m-bell__title{font-weight:600;font-size:13px;margin:0 0 2px;}
.sg365m-bell__msg{font-size:12px;opacity:.85;margin:0;}
.sg365m-bell__time{font-size:11px;opacity:.65;margin-top:6px;}
.sg365m-bell__item.is-unread{background:rgba(79,124,255,.06);}

@keyframes sg365mPop{from{transform:translateY(-6px) scale(.98);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}

/* =========================
 * Modal loader (5 styles)
 * ========================= */
.sg365m-modal-loader{display:flex;align-items:center;justify-content:center;min-height:180px;position:relative}
.sg365m-modal-loader span{display:none}

.sg365m-modal-loader--spinner .sg365m-loader-spinner{display:inline-block;width:46px;height:46px;border-radius:999px;border:4px solid rgba(79,124,255,.20);border-top-color:rgba(79,124,255,1);animation:sg365mSpin .9s linear infinite}
@keyframes sg365mSpin{to{transform:rotate(360deg)}}

.sg365m-modal-loader--dots .sg365m-loader-dots{display:inline-flex;gap:10px}
.sg365m-modal-loader--dots .sg365m-loader-dots i{display:block;width:10px;height:10px;border-radius:999px;background:rgba(79,124,255,.92);animation:sg365mDot 1.1s infinite ease-in-out}
.sg365m-modal-loader--dots .sg365m-loader-dots i:nth-child(2){animation-delay:.15s}
.sg365m-modal-loader--dots .sg365m-loader-dots i:nth-child(3){animation-delay:.3s}
@keyframes sg365mDot{0%,80%,100%{transform:scale(.4);opacity:.35}40%{transform:scale(1);opacity:1}}

.sg365m-modal-loader--bar .sg365m-loader-bar{display:block;width:220px;height:10px;border-radius:999px;background:rgba(79,124,255,.12);overflow:hidden;position:relative}
.sg365m-modal-loader--bar .sg365m-loader-bar:after{content:'';position:absolute;left:-40%;top:0;height:100%;width:40%;background:rgba(79,124,255,.92);border-radius:999px;animation:sg365mBar 1.1s infinite ease-in-out}
@keyframes sg365mBar{0%{left:-40%}50%{left:40%}100%{left:110%}}

.sg365m-modal-loader--run .sg365m-loader-run{display:block;width:56px;height:56px;border-radius:16px;background:rgba(79,124,255,.10);position:relative;overflow:hidden}
.sg365m-modal-loader--run .sg365m-loader-run:before{content:'🏃';position:absolute;left:-20px;top:10px;font-size:30px;animation:sg365mRun 1.2s infinite linear}
@keyframes sg365mRun{to{left:60px}}

.sg365m-modal-loader--fade .sg365m-loader-fade{display:block;width:120px;height:120px;border-radius:30px;background:rgba(79,124,255,.18);animation:sg365mFade 1.2s infinite ease-in-out}
@keyframes sg365mFade{0%,100%{opacity:.25;transform:scale(.86)}50%{opacity:1;transform:scale(1)}}

.sg365m-service-card .sg365m-service-row{display:flex;gap:16px;align-items:center;justify-content:space-between}
.sg365m-service-card .sg365m-service-body{flex:1;min-width:0}
.sg365m-service-card .sg365m-service-icon{width:64px;height:64px;display:flex;align-items:center;justify-content:center}
.sg365m-service-card .sg365m-service-icon svg{width:60px;height:60px}


/* Bell delete/dismiss */
.sg365m-bell__item{ position:relative; }
.sg365m-bell__close{
  position:absolute; top:8px; right:8px;
  border:0; background:transparent;
  width:28px; height:28px; line-height:28px;
  border-radius:10px;
  font-size:18px;
  cursor:pointer;
  color: rgba(11,18,32,0.6);
}
.sg365m-bell__close:hover{
  background: rgba(79,124,255,0.12);
  color: rgba(11,18,32,0.9);
}

/* ==============================
   Staff dashboard (shortcode)
   ============================== */
.sg365m-staff-wrap{max-width:1100px;margin:0 auto;}
.sg365m-staff-header{display:flex;align-items:center;justify-content:space-between;margin:14px 0 10px;}
.sg365m-h{margin:0;font-size:22px;}
.sg365m-muted{opacity:.75;}
.sg365m-staff-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px;}
.sg365m-tab{border:1px solid rgba(0,0,0,.12);background:#fff;border-radius:12px;padding:10px 12px;cursor:pointer;display:inline-flex;gap:8px;align-items:center;}
.sg365m-tab.is-active{border-color:var(--sg365-primary,#4f7cff);box-shadow:0 8px 24px rgba(0,0,0,.06);}
.sg365m-panel{display:none;}
.sg365m-panel.is-active{display:block;}
.sg365m-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;padding:14px;margin:0 0 12px;}
.sg365m-loading{padding:10px 0;opacity:.7;}
.sg365m-tags{display:flex;gap:8px;flex-wrap:wrap;}
.sg365m-tag{display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(79,124,255,.10);border:1px solid rgba(79,124,255,.25);}
.sg365m-table th,.sg365m-table td{padding:10px;border-bottom:1px solid rgba(0,0,0,.06);text-align:left;white-space:nowrap;}


/* ===== Premium form fields & ticket timeline (v2.3.7) ===== */
.sg365m-issue-form label{ font-weight:700; }
.sg365m-issue-form input[type="text"],
.sg365m-issue-form input[type="email"],
.sg365m-issue-form select,
.sg365m-issue-form textarea{
  width:100%;
  border-radius:14px;
  padding:12px 12px;
  border:1px solid rgba(17,24,39,.14);
  background: rgba(250,250,252,1);
  outline:none;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.sg365m-issue-form input:focus,
.sg365m-issue-form select:focus,
.sg365m-issue-form textarea:focus{
  border-color: rgba(99,102,241,.45);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.sg365m-form-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:12px;
}
.sg365m-inline-spinner{
  width:18px;height:18px;
  border-radius:999px;
  border:2px solid rgba(17,24,39,.18);
  border-top-color: rgba(17,24,39,.55);
  display:inline-block;
  animation: sg365mSpin .8s linear infinite;
}
@keyframes sg365mSpin { to { transform: rotate(360deg); } }

.sg365m-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(17,24,39,.12);
}
.sg365m-badge--neutral{ background: rgba(148,163,184,.18); }
.sg365m-badge--open{ background: rgba(59,130,246,.16); }
.sg365m-badge--viewed{ background: rgba(99,102,241,.16); }
.sg365m-badge--working{ background: rgba(245,158,11,.18); }
.sg365m-badge--pending{ background: rgba(168,85,247,.16); }
.sg365m-badge--notprioritized{ background: rgba(148,163,184,.22); }
.sg365m-badge--resolved{ background: rgba(16,185,129,.18); }
.sg365m-badge--reopened{ background: rgba(239,68,68,.16); }

.sg365m-ticket-timeline{
  margin-top:12px;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(249,250,251,1);
}
.sg365m-ticket-timeline__title{
  font-weight:900;
  margin-bottom:10px;
}
.sg365m-ticket-timeline__item{
  padding:10px 0;
  border-top:1px dashed rgba(17,24,39,.14);
}
.sg365m-ticket-timeline__item:first-child{ border-top:none; padding-top:0; }
.sg365m-ticket-timeline__row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.sg365m-ticket-timeline__remark{
  margin-top:8px;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(17,24,39,.10);
  color: rgba(17,24,39,.88);
}


/* 2.3.7.5 Premium client activation gate + application modal */

.sg365m-gate-card{
  background:#0b1220;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:22px;
  margin:14px 0 18px;
  color:#eaf0ff;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}
.sg365m-gate-title{font-size:20px;font-weight:700;margin:0 0 10px;}
.sg365m-gate-text{opacity:.9;line-height:1.6;margin:0 0 14px;}
.sg365m-gate-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 10px;}
.sg365m-gate-footnote{opacity:.75;font-size:12px;margin-top:8px;}
.sg365m-gate-badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;border-radius:999px;font-weight:700;font-size:12px;
  border:1px solid rgba(255,255,255,.12); margin-bottom:10px;
}
.sg365m-badge-info{background:rgba(56,189,248,.12);color:#7dd3fc;}
.sg365m-badge-warn{background:rgba(250,204,21,.12);color:#fde047;}
.sg365m-status-pill{
  display:inline-flex;align-items:center; padding:4px 10px;border-radius:999px;
  font-weight:700;font-size:12px;border:1px solid rgba(0,0,0,.05);
}
.sg365m-status-open{background:rgba(59,130,246,.12);}
.sg365m-status-working{background:rgba(250,204,21,.14);}
.sg365m-status-resolved{background:rgba(34,197,94,.14);}
.sg365m-status-closed{background:rgba(148,163,184,.18);}
.sg365m-front-modal .sg365m-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media(max-width:720px){.sg365m-front-modal .sg365m-form-grid{grid-template-columns:1fr;}}
.sg365m-front-modal label{display:block;font-weight:700;margin:0 0 6px;}
.sg365m-front-modal input[type="text"], 
.sg365m-front-modal input[type="email"],
.sg365m-front-modal input[type="number"],
.sg365m-front-modal textarea,
.sg365m-front-modal select{
  width:100%;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#eaf0ff;
  padding:10px 12px;
  outline:none;
}
.sg365m-front-modal textarea{min-height:90px;resize:vertical;}
.sg365m-front-modal input:focus, .sg365m-front-modal textarea:focus, .sg365m-front-modal select:focus{
  border-color:rgba(34,211,238,.5);
  box-shadow:0 0 0 4px rgba(34,211,238,.12);
}
.sg365m-front-modal .sg365m-help{opacity:.8;font-size:12px;line-height:1.5;margin-top:6px;}
.sg365m-front-modal .sg365m-step-title{font-size:18px;font-weight:800;margin:0 0 10px;}
.sg365m-front-modal .sg365m-success{
  background:rgba(34,197,94,.10);
  border:1px solid rgba(34,197,94,.25);
  border-radius:14px;
  padding:14px;
}
.sg365m-front-modal .sg365m-danger{
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.25);
  border-radius:14px;
  padding:14px;
  margin-top:10px;
}

/* Link-style button used to avoid navigation reloads when JS fails */
.sg365m-linkbtn{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;text-decoration:underline;}
.sg365m-linkbtn:hover{opacity:.85;}




/* --- v1.2.3 premium fixes: modal forms + due badges --- */
.sg365-modal-section .sg365-ajax-form input[type="text"],
.sg365-modal-section .sg365-ajax-form input[type="email"],
.sg365-modal-section .sg365-ajax-form select,
.sg365-modal-section .sg365-ajax-form textarea{
  width:100%;
  border-radius:14px;
  padding:12px 12px;
  border:1px solid rgba(17,24,39,.14);
  background: #ffffff;
  color: #0f172a;
  outline:none;
}
.sg365-modal-section .sg365-ajax-form textarea{ min-height:140px; }
.sg365-modal-section .sg365-ajax-form input:focus,
.sg365-modal-section .sg365-ajax-form select:focus,
.sg365-modal-section .sg365-ajax-form textarea:focus{
  border-color: rgba(99,102,241,.45);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.sg365-modal-section.sg365-ticket-create,
.sg365-modal-section .sg365-ticket-create{
  background: linear-gradient(180deg, rgba(240,247,255,.9), rgba(255,255,255,1));
}
.sg365-service-modal .sg365-card-soft,
.sg365-salary-modal .sg365-card-soft{
  border:1px solid rgba(17,24,39,.08);
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}
.sg365-kv-premium > div{
  border:1px solid rgba(17,24,39,.08);
  background: rgba(255,255,255,1);
}
.sg365-alert{
  border-radius:14px;
  padding:12px 12px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(248,250,252,1);
  color:#0f172a;
}
.sg365-alert-soft{ box-shadow: 0 10px 28px rgba(2,6,23,.05); }

.sg365-badge.sg365-due-ok{ background: rgba(16,185,129,.12); color: rgba(6,95,70,1); }
.sg365-badge.sg365-due-warning{ background: rgba(245,158,11,.14); color: rgba(146,64,14,1); }
.sg365-badge.sg365-due-today{ background: rgba(59,130,246,.14); color: rgba(30,64,175,1); }
.sg365-badge.sg365-due-overdue{ background: rgba(239,68,68,.14); color: rgba(153,27,27,1); }
.sg365-badge.sg365-due-danger{ background: rgba(220,38,38,.18); color: rgba(127,29,29,1); }

/* v1.5.0.codex: ticket popup polish + priority controls */
.sg365m-front-modal-inner{
  width:min(920px, calc(100vw - 28px));
  max-height:calc(100vh - 34px);
  overflow-x:hidden;
}
.sg365m-issue-form,
.sg365m-ticket-thread{
  width:100%;
}
.sg365m-issue-form input,
.sg365m-issue-form select,
.sg365m-issue-form textarea,
.sg365m-ticket-thread textarea{
  width:100%;
  box-sizing:border-box;
  color:#0f172a;
}
.sg365m-seg{
  display:inline-flex;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.sg365m-seg-btn{
  border:0;
  border-right:1px solid rgba(148,163,184,.4);
  background:#fff;
  padding:9px 14px;
  font-weight:700;
  cursor:pointer;
  color:#334155;
}
.sg365m-seg-btn:last-child{ border-right:0; }
.sg365m-prio-emergency.is-active{ background:#b42318; color:#fff; }
.sg365m-prio-high.is-active{ background:#d92d20; color:#fff; }
.sg365m-prio-normal.is-active{ background:#1570ef; color:#fff; }
.sg365m-prio-low.is-active{ background:#667085; color:#fff; }
.sg365m-priority-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid transparent;
}
.sg365m-priority-pill--emergency{ background:rgba(180,35,24,.10); color:#b42318; border-color:rgba(180,35,24,.28); }
.sg365m-priority-pill--high{ background:rgba(217,45,32,.10); color:#b42318; border-color:rgba(217,45,32,.25); }
.sg365m-priority-pill--normal{ background:rgba(21,112,239,.10); color:#155eef; border-color:rgba(21,112,239,.25); }
.sg365m-priority-pill--low{ background:rgba(102,112,133,.12); color:#475467; border-color:rgba(102,112,133,.24); }

/* v1.5.0.codex.2 inactive dashboard premium redesign + apply popup */
.sg365m-inactive-dashboard{
  border:1px solid rgba(148,163,184,.25);
  border-radius:24px;
  padding:24px;
  background:linear-gradient(145deg,#07122a 0%, #0f1f44 55%, #132f64 100%);
  color:#f8fbff;
  box-shadow:0 28px 70px rgba(2,6,23,.35);
  margin:14px 0 18px;
}
.sg365m-inactive-dashboard__head{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:flex-start;}
.sg365m-inactive-dashboard__kicker{font-size:12px;letter-spacing:.14em;text-transform:uppercase;opacity:.72;font-weight:800;}
.sg365m-inactive-dashboard h2{margin:6px 0 8px;font-size:30px;line-height:1.1;color:#fff;font-weight:900;}
.sg365m-inactive-dashboard__sub{margin:0;opacity:.88;max-width:65ch;line-height:1.6;}
.sg365m-inactive-dashboard__badge{display:inline-flex;align-items:center;gap:8px;background:rgba(250,204,21,.16);border:1px solid rgba(250,204,21,.44);padding:8px 12px;border-radius:999px;font-weight:700;color:#fde68a;}
.sg365m-inactive-dashboard__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px;}
.sg365m-inactive-dashboard__card{background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);border-radius:16px;padding:14px;backdrop-filter:blur(2px);}
.sg365m-inactive-dashboard__card strong{display:block;font-size:13px;color:#cfe1ff;}
.sg365m-inactive-dashboard__card span{display:block;font-size:20px;color:#fff;font-weight:900;margin-top:4px;}
.sg365m-inactive-dashboard__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;}
.sg365m-inactive-dashboard .sg365-btn--ghost{background:rgba(255,255,255,.08);color:#e5eefc;border-color:rgba(255,255,255,.22);}
.sg365m-inactive-dashboard-mode .woocommerce-MyAccount-content > p:first-child{display:none;}

.sg365m-front-modal .sg365m-apply-form,
.sg365m-front-modal .sg365m-apply-intro,
.sg365m-front-modal .sg365m-apply-final{color:#0f172a;}
.sg365m-front-modal .sg365m-apply-form label,
.sg365m-front-modal .sg365m-apply-intro .sg365m-apply-lead{color:#0f172a;}
.sg365m-front-modal .sg365m-apply-form input[type="text"],
.sg365m-front-modal .sg365m-apply-form input[type="email"],
.sg365m-front-modal .sg365m-apply-form input[type="number"],
.sg365m-front-modal .sg365m-apply-form textarea,
.sg365m-front-modal .sg365m-apply-form select{
  border:1px solid rgba(15,23,42,.15);
  background:#fff;
  color:#0f172a;
}
.sg365m-front-modal .sg365m-apply-form ::placeholder{color:#64748b;opacity:.9;}
.sg365m-apply-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px;}
.sg365m-apply-actions .button{border-radius:12px;min-height:40px;padding:0 16px;}
.sg365m-apply-actions .button-primary{background:linear-gradient(90deg,#3b82f6,#06b6d4)!important;border-color:#1d4ed8!important;color:#fff!important;}

.sg365m-apply-final{text-align:center;padding:6px 4px 4px;}
.sg365m-apply-final__icon{width:72px;height:72px;border-radius:999px;background:linear-gradient(180deg,#22c55e,#16a34a);display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:34px;font-weight:900;box-shadow:0 16px 40px rgba(34,197,94,.35);animation:sg365mPulse 1.7s ease-in-out infinite;}
.sg365m-apply-final__msg{font-size:18px;font-weight:700;margin:10px 0 14px;color:#0f172a;}
.sg365m-apply-final__box{margin:10px auto;padding:12px 14px;max-width:580px;border:1px solid rgba(15,23,42,.11);border-radius:14px;background:#f8fafc;display:flex;justify-content:space-between;gap:12px;align-items:center;text-align:left;}
.sg365m-apply-final__box strong{font-size:13px;color:#334155;}
.sg365m-apply-final__box span{font-weight:700;color:#0f172a;}
.sg365m-apply-finish-close{margin-top:14px;min-height:42px;padding:0 18px!important;border-radius:12px!important;}
@keyframes sg365mPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@media (max-width: 860px){
  .sg365m-inactive-dashboard__grid{grid-template-columns:1fr;}
  .sg365m-inactive-dashboard h2{font-size:25px;}
  .sg365m-apply-final__box{display:block;}
}

/* v1.5.0.codex.3 payments + service types premium uplift */
#sg365m-my-payments-view .sg365-topbar h2{
  font-size:30px;
  letter-spacing:-.02em;
  font-weight:900;
}
#sg365m-my-payments-view .sg365-card{
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  box-shadow:0 14px 40px rgba(15,23,42,.08);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
}
#sg365m-my-payments-view .sg365-card__value{
  font-weight:900;
  letter-spacing:-.01em;
}
#sg365m-my-payments-view .sg365-section__title h3{font-weight:800;}

.sg365m-service-card{
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  box-shadow:0 14px 40px rgba(15,23,42,.08);
  background:linear-gradient(180deg,#fff,#f8fbff);
  transition:transform .18s ease, box-shadow .18s ease;
}
.sg365m-service-card:hover{
  transform:translateY(-2px);
  box-shadow:0 20px 52px rgba(15,23,42,.12);
}
.sg365m-service-card .sg365-card__title{font-size:18px;font-weight:900;}
.sg365m-service-actions .sg365-btn{min-height:40px;border-radius:12px;}

.sg365m-front-modal .sg365m-front-payment-wrap,
.sg365m-front-modal #sg365m-front-salary-paid-modal,
.sg365m-front-modal .sg365-salary-modal{
  border:1px solid rgba(15,23,42,.10);
  border-radius:18px;
  box-shadow:0 20px 50px rgba(15,23,42,.13);
}

/* v1.5.2.codex payments/ticket ux polish */
#sg365m-my-payments-view .sg365m-pay-filter-row > div{
  flex: 1 1 180px;
  min-width: 150px;
}
#sg365m-my-payments-view .sg365m-pay-filter-row > div:last-child{
  flex: 0 0 220px;
}
#sg365m-my-payments-view .sg365m-pay-filter-row label{
  display:block;
  font-weight:700;
  margin-bottom:4px;
}
.sg365m-ticket-success-card{
  border:1px solid rgba(56,189,248,.35);
  background:linear-gradient(180deg,#061828,#0b2238);
  border-radius:16px;
  padding:16px;
  color:#e2e8f0;
  margin-top:12px;
  text-align:left;
}
.sg365m-ticket-success-icon{
  width:46px;height:46px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(16,185,129,.2);color:#34d399;
  font-size:20px;
  animation:sg365mPulse 1.8s ease-in-out infinite;
  margin-bottom:8px;
}
@keyframes sg365mPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
.sg365m-ticket-success-card h4{margin:0 0 8px;font-size:19px;color:#fff;}
.sg365m-ticket-success-card p{margin:0 0 8px;line-height:1.5;}
.sg365m-ticket-success-sub{color:#93c5fd;font-size:13px;}
.sg365m-ticket-success-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px;}


/* v1.5.5.codex service types icon + popup table polish */
.sg365m-service-card .sg365m-service-icon i{font-size:30px;line-height:1;color:inherit}
.sg365m-service-dot{display:inline-block;width:20px;height:20px;border-radius:999px;box-shadow:0 0 0 6px rgba(59,130,246,.12)}
.sg365m-service-popup-table th,.sg365m-service-popup-table td{padding:10px 8px;border-bottom:1px solid rgba(15,23,42,.08);font-size:13px;white-space:nowrap}
.sg365m-service-popup-table th{font-weight:800;background:#f8fafc;color:#0f172a;position:sticky;top:0}
.sg365m-service-popup-table tbody tr:nth-child(even){background:#fcfdff}
