/* ============================================================
   SUPER ADMIN — White & Sky Blue Theme
   ============================================================ */

:root {
    --sa-primary:      #38bdf8;
    --sa-primary-dark: #0ea5e9;
    --sa-primary-light:#f0f9ff;
    --sa-bg:           #f5fbff;
    --sa-sidebar-bg:   #ffffff;
    --sa-topnav-bg:    #ffffff;
    --sa-text:         #1e293b;
    --sa-text-muted:   #64748b;
    --sa-border:       #e8f4fd;
    --sa-card-bg:      #ffffff;
    --sa-shadow:       0 1px 10px rgba(56,189,248,0.07);
    --sa-shadow-hover: 0 8px 28px rgba(56,189,248,0.14);
    --sa-radius:       14px;
    --sa-sidebar-w:    260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body, html { font-family: 'Nunito', sans-serif; height: 100%; }

/* ---- AUTH ---- */
.sa-auth-body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f5fbff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sa-auth-wrapper { width: 100%; padding: 20px; display: flex; justify-content: center; }
.sa-auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(56,189,248,0.10);
    border: 1px solid #e0f2fe;
}
.sa-auth-logo { text-align: center; margin-bottom: 28px; }
.sa-logo-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(56,189,248,0.25);
}
.sa-auth-logo h4 { font-size: 22px; font-weight: 800; color: var(--sa-text); margin-bottom: 2px; }
.sa-auth-logo p  { font-size: 13px; color: var(--sa-text-muted); margin: 0; }
.sa-auth-subtitle { font-size: 13px; color: var(--sa-text-muted); text-align: center; margin-bottom: 20px; margin-top: -10px; }

/* ---- FORM ---- */
.sa-form-label { font-size: 12px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; }
.sa-input-group { position: relative; display: flex; align-items: center; }
.sa-input-icon { position: absolute; left: 14px; color: var(--sa-text-muted); font-size: 14px; z-index: 1; pointer-events: none; }
.sa-form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-form-control:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.sa-form-control.is-invalid { border-color: #ef4444; }
.sa-eye-btn { position: absolute; right: 12px; background: none; border: none; color: var(--sa-text-muted); cursor: pointer; font-size: 14px; padding: 4px; }
.sa-eye-btn:hover { color: var(--sa-primary); }
.sa-field-error { font-size: 12px; color: #ef4444; margin-top: 4px; }
.sa-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--sa-text-muted); cursor: pointer; }
.sa-check input[type=checkbox] { accent-color: var(--sa-primary); width: 15px; height: 15px; cursor: pointer; }
.sa-link { font-size: 13px; font-weight: 600; color: var(--sa-primary); text-decoration: none; }
.sa-link:hover { color: var(--sa-primary-dark); text-decoration: underline; }
.sa-btn-primary {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    color: #fff; border: none; padding: 12px 20px;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(56,189,248,0.25);
}
.sa-btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(56,189,248,0.35); }

/* ---- LAYOUT ---- */
.sa-body { background: var(--sa-bg); height: 100vh; overflow: hidden; }

.sa-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sa-sidebar-w); height: 100vh;
    background: var(--sa-sidebar-bg);
    border-right: 1px solid #e0f2fe;
    display: flex; flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 16px rgba(56,189,248,0.06);
    transition: transform 0.3s ease;
}
.sa-sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sa-border);
    display: flex; align-items: center; gap: 10px;
}
.sa-logo-icon-sm {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
}
.sa-sidebar-logo span { font-size: 16px; font-weight: 800; color: var(--sa-text); }
.sa-sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; scrollbar-width: none; }
.sa-sidebar-nav::-webkit-scrollbar { display: none; }
.sa-nav-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; padding: 6px 10px 3px; }
.sa-sidebar-link {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--sa-text-muted); text-decoration: none;
    font-size: 13.5px; font-weight: 600; margin-bottom: 1px;
    transition: background 0.2s, color 0.2s;
}
.sa-sidebar-link i { width: 18px; text-align: center; font-size: 14px; }
.sa-sidebar-link:hover { background: #f0f9ff; color: #0ea5e9; }
.sa-sidebar-link.active { background: linear-gradient(135deg, #bae6fd, #7dd3fc); color: #0369a1; box-shadow: 0 3px 10px rgba(56,189,248,0.18); }
.sa-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sa-border);
}
.sa-user-info { display: flex; align-items: center; gap: 10px; }
.sa-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #bae6fd, #38bdf8);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #0369a1; flex-shrink: 0;
}
.sa-user-avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #bae6fd, #38bdf8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #0369a1; flex-shrink: 0;
}
.sa-user-name { font-size: 13px; font-weight: 700; color: var(--sa-text); line-height: 1.2; }
.sa-user-role { font-size: 11px; color: var(--sa-text-muted); }

/* ---- MAIN ---- */
.sa-main-wrapper { margin-left: var(--sa-sidebar-w); height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sa-content { padding: 24px; flex: 1; }

/* ---- TOPNAV ---- */
.sa-topnav {
    background: var(--sa-topnav-bg);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--sa-border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--sa-shadow);
}
.sa-page-title { font-size: 16px; font-weight: 800; color: var(--sa-text); margin: 0; line-height: 1.2; }
.sa-breadcrumb { font-size: 11px; }
.sa-breadcrumb a { color: var(--sa-primary); text-decoration: none; font-weight: 600; }
.sa-breadcrumb .breadcrumb-item.active { color: var(--sa-text-muted); }
.sa-topnav-right { display: flex; align-items: center; gap: 10px; }
.sa-topnav-btn {
    position: relative; background: var(--sa-bg);
    border: 1px solid var(--sa-border); color: var(--sa-text-muted);
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 15px; transition: background 0.2s;
}
.sa-topnav-btn:hover { background: #f0f9ff; color: #38bdf8; }
.sa-badge { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sa-topnav-user {
    display: flex; align-items: center; gap: 8px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    padding: 5px 12px 5px 5px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--sa-text);
    cursor: pointer; transition: background 0.2s;
}
.sa-topnav-user:hover { background: #f0f9ff; }
.sa-topnav-user::after { display: none; }
.sa-dropdown { border: 1px solid var(--sa-border); border-radius: 12px; box-shadow: var(--sa-shadow-hover); padding: 6px; }
.sa-logout-btn { font-size: 13px; font-weight: 600; color: #ef4444; border-radius: 8px; padding: 8px 14px; display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; cursor: pointer; }
.sa-logout-btn:hover { background: #fef2f2; color: #dc2626; }
.sa-hamburger { display: none; background: none; border: none; font-size: 20px; color: var(--sa-text-muted); cursor: pointer; }

/* ---- FOOTER ---- */
.sa-footer { padding: 16px 24px; text-align: center; font-size: 12px; color: var(--sa-text-muted); border-top: 1px solid var(--sa-border); background: var(--sa-topnav-bg); }

/* ---- CARDS ---- */
.sa-stat-card {
    background: var(--sa-card-bg); border-radius: var(--sa-radius);
    padding: 20px; box-shadow: var(--sa-shadow);
    display: flex; align-items: center; justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--sa-border);
}
.sa-stat-card:hover { transform: translateY(-3px); box-shadow: var(--sa-shadow-hover); }
.sa-stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.sa-stat-info p { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.sa-stat-info h4 { font-size: 24px; font-weight: 800; color: var(--sa-text); margin: 0 0 2px; }
.sa-stat-info small { font-size: 11px; color: var(--sa-text-muted); }
.sa-card { background: var(--sa-card-bg); border-radius: var(--sa-radius); box-shadow: var(--sa-shadow); border: 1px solid var(--sa-border); overflow: hidden; }
.sa-card-head { padding: 18px 20px; border-bottom: 1px solid var(--sa-border); display: flex; align-items: center; justify-content: space-between; }
.sa-card-head h6 { font-size: 15px; font-weight: 800; color: var(--sa-text); margin: 0; }
.sa-card-head p { font-size: 12px; color: var(--sa-text-muted); margin: 2px 0 0; }
.sa-card-body { padding: 20px; }
.sa-badge-active { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }

/* ---- OVERLAY ---- */
.sa-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 999; }
.sa-overlay.show { display: block; }

/* ---- TOAST ---- */
#toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
    min-width: 300px; max-width: 360px;
}
.sa-toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    border-left: 4px solid;
    animation: toastIn 0.35s cubic-bezier(.22,1,.36,1) forwards;
    pointer-events: all;
}
.sa-toast.hiding { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(40px); } }
.sa-toast-success { border-color: #22c55e; }
.sa-toast-error   { border-color: #ef4444; }
.sa-toast-warning { border-color: #f59e0b; }
.sa-toast-info    { border-color: #0ea5e9; }
.sa-toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.sa-toast-success .sa-toast-icon { color: #22c55e; }
.sa-toast-error   .sa-toast-icon { color: #ef4444; }
.sa-toast-warning .sa-toast-icon { color: #f59e0b; }
.sa-toast-info    .sa-toast-icon { color: #0ea5e9; }
.sa-toast-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.sa-toast-success .sa-toast-label { color: #15803d; }
.sa-toast-error   .sa-toast-label { color: #dc2626; }
.sa-toast-warning .sa-toast-label { color: #d97706; }
.sa-toast-info    .sa-toast-label { color: #0284c7; }
.sa-toast-message { font-size: 13px; color: #475569; line-height: 1.4; margin: 0; }
.sa-toast-close { margin-left: auto; background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 0 0 0 8px; flex-shrink: 0; transition: color 0.2s; }
.sa-toast-close:hover { color: #475569; }
.sa-toast-progress { height: 3px; border-radius: 0 0 12px 12px; position: absolute; bottom: 0; left: 0; animation: progress 4s linear forwards; }
.sa-toast-success .sa-toast-progress { background: #22c55e; }
.sa-toast-error   .sa-toast-progress { background: #ef4444; }
.sa-toast-warning .sa-toast-progress { background: #f59e0b; }
.sa-toast-info    .sa-toast-progress { background: #0ea5e9; }
@keyframes progress { from { width:100%; } to { width:0%; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
    .sa-sidebar { transform: translateX(calc(-1 * var(--sa-sidebar-w))); }
    .sa-sidebar.open { transform: translateX(0); }
    .sa-main-wrapper { margin-left: 0; }
    .sa-hamburger { display: block; }
}

/* ============================================================
   TENANT MODULE — Extended Theme Classes
   ============================================================ */

/* ---- Page Header ---- */
.sa-page-header { display: flex; align-items: center; justify-content: space-between; }
.sa-page-heading { font-size: 18px; font-weight: 800; color: var(--sa-text); margin: 0; line-height: 1.3; }
.sa-page-sub { font-size: 12px; color: var(--sa-text-muted); margin: 2px 0 0; }
.sa-back-btn {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--sa-text-muted); text-decoration: none; flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.sa-back-btn:hover { background: #e0f2fe; color: var(--sa-primary-dark); }

/* ---- Form Cards ---- */
.sa-form-card {
    background: var(--sa-card-bg);
    border-radius: var(--sa-radius);
    border: 1px solid var(--sa-border);
    box-shadow: var(--sa-shadow);
    overflow: hidden;
}
.sa-form-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sa-border);
    background: linear-gradient(135deg, #f8fdff, #f0f9ff);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sa-form-card-title { font-size: 14px; font-weight: 800; color: var(--sa-text); line-height: 1.3; }
.sa-form-card-sub   { font-size: 11px; color: var(--sa-text-muted); margin-top: 1px; }
.sa-form-card-body  { padding: 20px; }

/* ---- Step Badge ---- */
.sa-step-badge {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    box-shadow: 0 3px 10px rgba(56,189,248,0.3);
}

/* ---- Form Fields ---- */
.sa-form-label {
    font-size: 11px; font-weight: 700; color: var(--sa-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px; display: block;
}
.sa-required { color: #ef4444; }
.sa-field-wrap { position: relative; display: flex; align-items: center; }
.sa-field-icon {
    position: absolute; left: 13px;
    color: var(--sa-text-muted); font-size: 13px;
    pointer-events: none; z-index: 1;
}
.sa-field {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-field:focus          { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(56,189,248,0.13); }
.sa-field.is-invalid     { border-color: #ef4444; background: #fff8f8; }
.sa-field.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.sa-field::placeholder   { color: #b0c4d8; }
.sa-field-eye {
    position: absolute; right: 12px;
    background: none; border: none;
    color: var(--sa-text-muted); cursor: pointer;
    font-size: 13px; padding: 4px;
    transition: color 0.2s;
}
.sa-field-eye:hover { color: var(--sa-primary); }
.sa-field-error { font-size: 11.5px; color: #ef4444; margin-top: 5px; display: flex; align-items: center; gap: 4px; }

/* ---- Password Rules ---- */
.sa-pwd-rules {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px 14px;
    background: #f8fdff;
    border: 1px solid var(--sa-border);
    border-radius: 10px;
}
.sa-pwd-rule {
    font-size: 11px; font-weight: 600;
    color: #94a3b8;
    display: flex; align-items: center; gap: 4px;
    transition: color 0.2s;
}
.sa-pwd-rule.passed       { color: #16a34a; }
.sa-pwd-rule.passed i     { color: #16a34a; }

/* ---- Buttons ---- */
.sa-btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    color: #fff; border: none;
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 14px rgba(56,189,248,0.25);
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.15s;
    white-space: nowrap;
}
.sa-btn-primary:hover { opacity: 0.9; box-shadow: 0 6px 20px rgba(56,189,248,0.35); transform: translateY(-1px); color: #fff; }
.sa-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.sa-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--sa-text-muted);
    border: 1.5px solid var(--sa-border);
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.sa-btn-ghost:hover { background: #f0f9ff; color: var(--sa-primary-dark); border-color: var(--sa-primary); }

.sa-btn-outline {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--sa-primary-dark);
    border: 1.5px solid #bae6fd;
    padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.sa-btn-outline:hover { background: #f0f9ff; border-color: var(--sa-primary); color: var(--sa-primary-dark); }

.sa-btn-success {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    color: #fff; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(22,163,74,0.2);
    transition: opacity 0.2s; white-space: nowrap;
}
.sa-btn-success:hover { opacity: 0.88; color: #fff; }

.sa-btn-warning {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    color: #78350f; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(245,158,11,0.2);
    transition: opacity 0.2s; white-space: nowrap;
}
.sa-btn-warning:hover { opacity: 0.88; color: #78350f; }

.sa-btn-danger {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fca5a5, #ef4444);
    color: #fff; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 12px rgba(239,68,68,0.2);
    transition: opacity 0.2s; white-space: nowrap;
}
.sa-btn-danger:hover { opacity: 0.88; color: #fff; }

.sa-icon-btn {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--sa-bg); border: 1px solid var(--sa-border);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--sa-text-muted); text-decoration: none; font-size: 13px;
    transition: background 0.2s, color 0.2s; cursor: pointer;
}
.sa-icon-btn:hover { background: #e0f2fe; color: var(--sa-primary-dark); }

/* ---- Onboarding Flow Steps (right panel) ---- */
.sa-flow-steps { list-style: none; padding: 4px 20px 20px; margin: 0; }
.sa-flow-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 0;
    border-left: 2px solid var(--sa-border);
    margin-left: 10px;
    padding-left: 20px;
    position: relative;
}
.sa-flow-step:last-child { border-left-color: transparent; }
.sa-flow-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--sa-border); border: 2px solid #cbd5e1;
    position: absolute; left: -7px; top: 16px; flex-shrink: 0;
    transition: background 0.2s;
}
.sa-flow-step.active .sa-flow-dot {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.15);
}
.sa-flow-label { font-size: 13px; font-weight: 700; color: var(--sa-text); line-height: 1.4; }
.sa-flow-desc  { font-size: 11.5px; color: var(--sa-text-muted); margin-top: 1px; }

/* ---- Info Box ---- */
.sa-info-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: var(--sa-radius);
    padding: 16px;
    display: flex; align-items: flex-start; gap: 12px;
}
.sa-info-box-icon { font-size: 18px; color: var(--sa-primary); flex-shrink: 0; margin-top: 1px; }
.sa-info-box-title { font-size: 13px; font-weight: 800; color: var(--sa-text); margin-bottom: 8px; }
.sa-info-list { list-style: none; padding: 0; margin: 0; }
.sa-info-list li {
    font-size: 12px; color: var(--sa-text-muted);
    display: flex; align-items: center; gap: 7px;
    padding: 3px 0;
}
.sa-info-list li i { color: #0ea5e9; font-size: 11px; flex-shrink: 0; }
.sa-color-swatch {
    display: inline-block; width: 14px; height: 14px;
    background: #3b82f6; border-radius: 3px;
    vertical-align: middle; border: 1px solid #bfdbfe;
}

/* ---- Status Badges ---- */
.sa-badge-pending   { background: #fef9c3; color: #a16207; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-active    { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-warning   { background: #fff7ed; color: #c2410c; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-info      { background: #e0f2fe; color: #0369a1; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-suspended { background: #fef2f2; color: #dc2626; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-rejected  { background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-expired   { background: #fdf4ff; color: #7e22ce; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.sa-badge-lg { font-size: 13px !important; padding: 6px 18px !important; }

/* ---- Table ---- */
.sa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sa-table thead tr { border-bottom: 2px solid var(--sa-border); }
.sa-table th {
    padding: 11px 16px; text-align: left;
    font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--sa-text-muted);
    background: linear-gradient(135deg, #f8fdff, #f0f9ff);
    white-space: nowrap;
}
.sa-table td { padding: 13px 16px; color: var(--sa-text); border-bottom: 1px solid var(--sa-border); vertical-align: middle; }
.sa-table tbody tr:last-child td { border-bottom: none; }
.sa-table tbody tr:hover td { background: #f8fdff; }

/* ---- Pagination ---- */
.sa-pagination-wrap { padding: 14px 16px; border-top: 1px solid var(--sa-border); }
.sa-pagination-wrap .pagination { margin: 0; gap: 4px; }
.sa-pagination-wrap .page-link {
    border-radius: 8px !important; font-size: 12px; font-weight: 700;
    color: var(--sa-text-muted); border-color: var(--sa-border);
    padding: 5px 11px;
}
.sa-pagination-wrap .page-item.active .page-link {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    border-color: transparent; color: #fff;
    box-shadow: 0 3px 8px rgba(56,189,248,0.25);
}
.sa-pagination-wrap .page-link:hover { background: #f0f9ff; color: var(--sa-primary-dark); border-color: var(--sa-primary); }

/* ---- Detail Labels (show page) ---- */
.sa-detail-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.sa-detail-value { font-size: 14px; font-weight: 600; color: var(--sa-text); }

/* ---- Input / Select (index filter) ---- */
.sa-input {
    padding: 9px 14px;
    border: 1.5px solid var(--sa-border);
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Nunito', sans-serif;
    color: var(--sa-text);
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sa-input:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(56,189,248,0.12); }
.sa-label { font-size: 11px; font-weight: 700; color: var(--sa-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; display: block; }

/* ============================================================
   SWEETALERT2 — Custom Theme (sa-* style match)
   ============================================================ */

.sa-swal-popup {
    border-radius: 18px !important;
    padding: 32px 28px 28px !important;
    font-family: 'Nunito', sans-serif !important;
    box-shadow: 0 20px 60px rgba(56, 189, 248, 0.15) !important;
    border: 1px solid #e0f2fe !important;
    max-width: 420px !important;
}

.sa-swal-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
}

.sa-swal-html {
    font-size: 13.5px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 4px 0 0 !important;
}

.sa-swal-html p { margin: 0 0 8px !important; }
.sa-swal-html p:last-child { margin-bottom: 0 !important; }
.sa-swal-html strong { color: #1e293b; }

/* ── Inline status badges inside SweetAlert ── */
.sa-swal-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    vertical-align: middle;
}
.sa-swal-badge-active    { background: #dcfce7; color: #16a34a; }
.sa-swal-badge-suspended { background: #fef2f2; color: #dc2626; }
.sa-swal-badge-rejected  { background: #f1f5f9; color: #475569; }

/* ── Warning note inside popup ── */
.sa-swal-warning-note {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #c2410c;
    margin-top: 10px;
    text-align: left;
}

/* ── Buttons ── */
.swal2-actions { gap: 10px !important; margin-top: 24px !important; }

.sa-swal-confirm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: 'Nunito', sans-serif !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.15s !important;
}
.sa-swal-confirm:hover { opacity: 0.88 !important; transform: translateY(-1px) !important; }

.sa-swal-confirm-success {
    background: linear-gradient(135deg, #4ade80, #16a34a) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25) !important;
}
.sa-swal-confirm-warning {
    background: linear-gradient(135deg, #fde68a, #f59e0b) !important;
    color: #78350f !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}
.sa-swal-confirm-danger {
    background: linear-gradient(135deg, #fca5a5, #ef4444) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25) !important;
}

.sa-swal-cancel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: 'Nunito', sans-serif !important;
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1.5px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
}
.sa-swal-cancel:hover {
    background: #f0f9ff !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}

/* ── Icon sizing ── */
.swal2-icon { margin: 0 auto 16px !important; width: 56px !important; height: 56px !important; }
.swal2-icon .swal2-icon-content { font-size: 26px !important; }

/* ============================================================
   TENANT SETUP STEPS & DOMAIN MANAGEMENT
   ============================================================ */

/* ── Steps Wrapper ── */
.sa-steps-wrap { padding: 8px 0; }

.sa-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sa-border);
    transition: background 0.2s;
}
.sa-step:last-child { border-bottom: none; }
.sa-step:hover { background: #f8fdff; }

/* Step number/icon circle */
.sa-step-num {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; margin-top: 2px;
    background: #f1f5f9; color: #94a3b8;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}
.sa-step-num.done {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(22,163,74,0.25);
}
.sa-step-num.current {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    color: #fff; border-color: transparent;
    box-shadow: 0 3px 10px rgba(56,189,248,0.25);
}

.sa-step-content { flex: 1; min-width: 0; }
.sa-step-title {
    font-size: 14px; font-weight: 800; color: var(--sa-text);
    margin-bottom: 4px;
}
.sa-step-desc {
    font-size: 12.5px; color: var(--sa-text-muted); line-height: 1.5;
}
.sa-step-link {
    color: var(--sa-primary-dark); font-weight: 600;
    text-decoration: none; font-size: 12.5px;
}
.sa-step-link:hover { text-decoration: underline; }

.sa-step-remove-btn {
    background: none; border: none;
    color: #ef4444; font-size: 12px; font-weight: 600;
    cursor: pointer; padding: 3px 8px;
    border-radius: 6px; transition: background 0.2s;
}
.sa-step-remove-btn:hover { background: #fef2f2; }

/* ── Domain Pill ── */
.sa-domain-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: #e0f2fe; color: #0369a1;
    font-size: 12.5px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid #bae6fd;
}

/* ── DNS Box ── */
.sa-dns-box {
    background: #f8fdff;
    border: 1px solid var(--sa-border);
    border-radius: 10px;
    overflow: hidden;
}
.sa-dns-box-head {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 8px 14px;
    font-size: 11px; font-weight: 800;
    color: var(--sa-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sa-border);
}
.sa-dns-record {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--sa-border);
    font-size: 12.5px;
}
.sa-dns-record:last-child { border-bottom: none; }
.sa-dns-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 5px;
    text-transform: uppercase; flex-shrink: 0;
}
.sa-dns-badge.a   { background: #dbeafe; color: #1d4ed8; }
.sa-dns-badge.txt { background: #fef9c3; color: #a16207; }
.sa-dns-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sa-dns-name  { color: var(--sa-text-muted); font-weight: 600; }
.sa-dns-arrow { color: #cbd5e1; }
.sa-dns-val   {
    font-family: 'Courier New', monospace;
    font-size: 11.5px; color: var(--sa-text);
    background: #fff; border: 1px solid #e2e8f0;
    padding: 2px 8px; border-radius: 5px;
    word-break: break-all;
}

/* ── DNS Check Result ── */
.sa-dns-result {
    background: #f8fafc;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    padding: 10px 14px;
}
.sa-dns-result-row { font-size: 12.5px; padding: 3px 0; }
.sa-dns-result-ok   { color: #16a34a; font-weight: 600; }
.sa-dns-result-fail { color: #dc2626; font-weight: 600; }

/* ── Credentials Banner ── */
.sa-credentials-banner {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: var(--sa-radius);
    padding: 18px 20px;
}
.sa-credentials-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
}
.sa-credentials-title {
    font-size: 14px; font-weight: 800; color: #15803d;
    margin-bottom: 10px;
}
.sa-credentials-grid {
    display: flex; flex-direction: column; gap: 6px;
}
.sa-cred-label {
    font-size: 11px; font-weight: 700;
    color: #166534; text-transform: uppercase;
    letter-spacing: 0.4px; margin-right: 8px;
}
.sa-cred-value {
    font-size: 13px; font-weight: 600; color: #15803d;
}
.sa-cred-value a { color: #16a34a; text-decoration: underline; }

/* ── DNS Raw Records Debug ── */
.sa-dns-raw {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px;
    background: #fff8f8;
    border: 1px solid #fecaca;
    border-radius: 6px;
    margin-top: 4px;
}
.sa-dns-raw-label {
    font-size: 11px; font-weight: 700;
    color: #dc2626; display: block; margin-bottom: 2px;
}
.sa-dns-raw-val {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #1e293b;
    background: #fff; border: 1px solid #fca5a5;
    padding: 2px 8px; border-radius: 4px;
    word-break: break-all; display: block;
}
.sa-dns-result-skip {
    color: #64748b; font-weight: 600; font-size: 12.5px;
}

/* ============================================================
   AUDIT LOGS
   ============================================================ */

.sa-audit-event {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #475569;
    background: #f1f5f9;
    padding: 2px 8px; border-radius: 5px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.sa-audit-role-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    background: #e0f2fe; color: #0369a1;
    white-space: nowrap; text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Module badges */
.sa-audit-module-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap;
}
.sa-audit-module-auth   { background: #fef9c3; color: #a16207; }
.sa-audit-module-tenant { background: #dbeafe; color: #1d4ed8; }
.sa-audit-module-domain { background: #dcfce7; color: #15803d; }
.sa-audit-module-ssl    { background: #f3e8ff; color: #6d28d9; }
.sa-audit-module-user   { background: #ffe4e6; color: #be123c; }

/* JSON diff blocks */
.sa-json-block {
    font-family: 'Courier New', monospace;
    font-size: 12px; line-height: 1.6;
    border-radius: 8px; padding: 14px;
    margin: 0; overflow-x: auto;
    white-space: pre-wrap; word-break: break-all;
}
.sa-json-old { background: #fff8f8; border: 1px solid #fecaca; color: #991b1b; }
.sa-json-new { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* ============================================================
   AUDIT LOGS
   ============================================================ */

.sa-audit-event {
    font-family: 'Courier New', monospace;
    font-size: 11px; color: #475569;
    background: #f1f5f9; padding: 2px 8px;
    border-radius: 5px; border: 1px solid #e2e8f0;
    white-space: nowrap; display: inline-block;
}

.sa-audit-role-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    background: #e0f2fe; color: #0369a1;
    white-space: nowrap; text-transform: uppercase;
    letter-spacing: 0.3px; display: inline-block;
}

.sa-audit-module-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap; display: inline-block;
}
.sa-audit-module-auth   { background: #fef9c3; color: #a16207; }
.sa-audit-module-tenant { background: #dbeafe; color: #1d4ed8; }
.sa-audit-module-domain { background: #dcfce7; color: #15803d; }
.sa-audit-module-ssl    { background: #f3e8ff; color: #6d28d9; }
.sa-audit-module-user   { background: #ffe4e6; color: #be123c; }

.sa-json-block {
    font-family: 'Courier New', monospace;
    font-size: 12px; line-height: 1.6;
    border-radius: 8px; padding: 14px; margin: 0;
    overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.sa-json-old { background: #fff8f8; border: 1px solid #fecaca; color: #991b1b; }
.sa-json-new { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
