/* ============================================================
   SCP ADMIN – Modern Design System
   Uses WordPress admin theme color scheme via CSS custom properties.
   Tokens: radius 12/8/6 · danger #b32d2e
   text #1d2327 · secondary #50575e · muted #9ca0a5
   border #e0e0e0 · bg-subtle #f8f9fa
   ============================================================ */

/* ── Theme-aware color tokens ──────────────────────────────
   --wp-admin-theme-color is set by WordPress based on the
   user's chosen admin color scheme (Profile → Admin Color). */
:root {
    --scp-primary:        var(--wp-admin-theme-color, #0073aa);
    --scp-primary-dark:   var(--wp-admin-theme-color-darker-10, #006799);
    --scp-primary-rgb:    var(--wp-admin-theme-color--rgb, 0, 115, 170);
    --scp-primary-light:  rgba(var(--scp-primary-rgb), 0.06);
    --scp-primary-border: rgba(var(--scp-primary-rgb), 0.25);
    --scp-primary-focus:  rgba(var(--scp-primary-rgb), 0.15);
    --scp-page-bg:        rgba(var(--scp-primary-rgb), 0.03);
}

/* ── Theme-tinted page background ──────────────────────────
   Applied to the WP content area on all plugin pages.
   admin.css only loads on SCP pages so this won't leak. */
#wpcontent {
    background: var(--scp-page-bg);
}
#wpbody-content > .wrap {
    padding-top: 16px;
}

/* ---------- Section cards ---------- */
.scp-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 28px;
    overflow: hidden;
}
.wp-header-end + * {
    margin-top: 24px;
}
.scp-section-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.scp-section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    letter-spacing: -0.02em;
}
.scp-section-content {
    padding: 24px;
}
.scp-clients-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--scp-primary);
    background: var(--scp-primary-light);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--scp-primary-border);
}
.scp-clients-count svg {
    color: var(--scp-primary);
    flex-shrink: 0;
}

/* ---------- Search box ---------- */
.scp-search-box { margin: 0 0 20px; }
.scp-search-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.scp-search-input {
    width: 340px;
    max-width: 100%;
    height: 40px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    border: 1px solid #c3c4c7 !important;
    border-radius: 14px 0 0 14px !important;
    background: #fff !important;
    color: #1d2327 !important;
    outline: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0 !important;
    -webkit-transition: border-color 0.15s ease, box-shadow 0.15s ease;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-search-input:focus {
    border-color: var(--scp-primary, #0073aa) !important;
    box-shadow: 0 0 0 2px rgba(var(--scp-primary-rgb, 0,115,170),0.15) !important;
}
.scp-search-button {
    height: 40px !important;
    padding: 0 18px !important;
    display: -webkit-inline-box !important;
    display: -ms-inline-flexbox !important;
    display: inline-flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: #0073aa !important;
    background: var(--scp-primary, #0073aa) !important;
    border: 1px solid #0073aa !important;
    border: 1px solid var(--scp-primary, #0073aa) !important;
    border-left: none !important;
    border-radius: 0 14px 14px 0 !important;
    cursor: pointer;
    -webkit-transition: all 0.15s ease;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1 !important;
    margin: 0 !important;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    text-decoration: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.scp-search-button svg {
    -webkit-box-flex: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    display: block;
    margin-right: 6px;
}
.scp-search-button:hover,
.scp-search-button:focus {
    background: #005a87 !important;
    background: var(--scp-primary-dark, #005a87) !important;
    border-color: #005a87 !important;
    border-color: var(--scp-primary-dark, #005a87) !important;
    border-left: none !important;
    color: #fff !important;
}
.scp-search-clear {
    color: #0073aa;
    color: var(--scp-primary, #0073aa);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-left: 12px;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
.scp-search-clear:hover { color: #005a87; color: var(--scp-primary-dark, #005a87); }
.scp-search-clear .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-right: 4px;
}

/* ---------- Client form ---------- */
.scp-client-form { margin-top: 0; }
.scp-client-form .form-table { margin-top: 0; border-collapse: separate; border-spacing: 0; }
.scp-client-form .form-table th {
    width: 170px;
    padding: 14px 16px 14px 0;
    font-weight: 500;
    color: #1d2327;
    font-size: 13px;
    vertical-align: middle;
}
.scp-client-form .form-table td {
    padding: 14px 0;
    vertical-align: middle;
}
.scp-client-form .form-table input[type="text"],
.scp-client-form .form-table input[type="email"],
.scp-client-form .form-table input[type="password"] {
    width: 100%;
    max-width: 420px;
    margin: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    color: #1d2327;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-client-form .form-table input[type="number"] {
    width: 100px;
    margin: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    color: #1d2327;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-client-form .form-table select {
    height: 38px;
    padding: 0 32px 0 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    color: #1d2327;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%239ca0a5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-client-form .form-table input[type="text"]:focus,
.scp-client-form .form-table input[type="email"]:focus,
.scp-client-form .form-table input[type="password"]:focus,
.scp-client-form .form-table input[type="number"]:focus,
.scp-client-form .form-table select:focus {
    border-color: var(--scp-primary);
    box-shadow: 0 0 0 2px rgba(var(--scp-primary-rgb),0.15);
}
.scp-client-form .form-table input[disabled],
.scp-client-form .form-table input[readonly] {
    background: #f8f9fa;
    color: #646970;
    cursor: not-allowed;
    opacity: 0.85;
}
.scp-client-form .form-table textarea {
    width: 100%;
    max-width: 520px;
    margin: 0;
    min-height: 80px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    color: #1d2327;
    outline: none;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-client-form .form-table textarea:focus {
    border-color: var(--scp-primary);
    box-shadow: 0 0 0 2px rgba(var(--scp-primary-rgb),0.15);
}
.scp-client-form .form-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    cursor: pointer;
    vertical-align: middle;
    margin: 0;
}
.scp-client-form .form-table .description {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 12px;
    color: #9ca0a5;
    line-height: 1.5;
}
.scp-client-form .submit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.scp-client-form .submit .button { margin-right: 0; }

/* ---------- Inputs with action buttons ---------- */
.scp-input-with-button {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 520px;
}
.scp-input-with-button input[type="text"] {
    flex: 1;
    min-width: 0;
    margin: 0;
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-input-with-button input[type="text"]:focus {
    border-color: var(--scp-primary);
    box-shadow: 0 0 0 2px rgba(var(--scp-primary-rgb),0.15);
}
.scp-input-with-button .scp-password-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
}
.scp-password-wrapper { position: relative; }
.scp-input-with-button .scp-password-wrapper input[type="password"],
.scp-input-with-button .scp-password-wrapper input[type="text"] {
    width: 100%;
    height: 38px;
    padding: 0 36px 0 14px;
    margin: 0;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scp-input-with-button .scp-password-wrapper input:focus {
    border-color: var(--scp-primary);
    box-shadow: 0 0 0 2px rgba(var(--scp-primary-rgb),0.15);
}
.scp-input-with-button .button {
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
    height: 38px;
    line-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #c3c4c7;
    background: #f8f9fa;
    color: #1d2327;
    cursor: pointer;
    transition: all 0.15s ease;
}
.scp-input-with-button .button:hover {
    background: #f0f1f3;
    border-color: #8c8f94;
}
.scp-input-with-button .scp-copy-btn {
    flex-shrink: 0;
    margin-left: 0;
}

/* ---------- Password toggle ---------- */
.scp-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca0a5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.scp-toggle-password:hover { background: #f0f1f3; color: var(--scp-primary); }
.scp-toggle-password:focus { outline: 2px solid var(--scp-primary); outline-offset: 2px; }
.scp-toggle-password svg { width: 16px; height: 16px; }
.scp-password-wrapper.hide-password .scp-toggle-password svg path:first-child { display: none; }
.scp-password-wrapper.show-password .scp-toggle-password svg { display: none; }
.scp-password-wrapper.show-password .scp-toggle-password::after {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22currentColor%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24%22%3E%3C/path%3E%3Cline x1=%221%22 y1=%221%22 x2=%2223%22 y2=%2223%22%3E%3C/line%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
}

@keyframes scp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Primary & secondary buttons ---------- */
.scp-save-client-btn {
    position: relative;
    min-width: 150px;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.scp-save-client-btn .scp-btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scp-client-form .submit .button:not(.button-primary) {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #c3c4c7;
    background: #f8f9fa;
    color: #50575e;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.scp-client-form .submit .button:not(.button-primary):hover {
    background: #f0f1f3;
    color: #1d2327;
    border-color: #8c8f94;
}
.scp-login .scp-password-wrapper { max-width: 420px; }

/* ---------- Info password (read-only display) ---------- */
.scp-info-password {
    max-width: 420px;
    margin: 8px 0;
}
/* ---------- Copy button ---------- */
.scp-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 6px;
    padding: 0;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #9ca0a5;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s ease;
    position: relative;
}
.scp-copy-btn:hover {
    background: #f0f1f3;
    border-color: #c3c4c7;
    color: var(--scp-primary);
}
.scp-copy-btn:active {
    transform: scale(0.92);
}
.scp-copy-btn.scp-copied {
    background: #edf8f2;
    border-color: #00a32a;
    color: #00a32a;
}

/* ---------- Password + Copy row ---------- */
.scp-password-copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.scp-password-copy-row > strong {
    flex-shrink: 0;
    white-space: nowrap;
}
.scp-password-copy-row .scp-info-password {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.scp-password-copy-row .scp-copy-btn {
    flex-shrink: 0;
    margin-left: 0;
}

.scp-info-password input {
    background: #f8f9fa;
    cursor: default;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 38px;
    padding: 0 36px 0 14px;
    font-size: 14px;
}
.scp-credentials-box .scp-info-password { margin-top: 8px; }

/* ---------- Client info box ---------- */
.scp-client-info {
    margin-top: 28px;
    padding: 20px 24px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}
.scp-client-info h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}
.scp-client-info p {
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
}
.scp-client-info .scp-password-copy-row { max-width: 420px; }
.scp-client-info .scp-password-copy-row .scp-info-password { max-width: none; flex: 1; min-width: 0; }
.scp-client-info .scp-password-copy-row .scp-info-password input { width: 100%; padding-right: 36px; }
.scp-client-info code {
    background: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
    margin: 2px 0;
    border: 1px solid #ebebeb;
    color: var(--scp-primary);
}

/* ---------- Files section ---------- */
.scp-files-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e0e0e0;
}
.scp-section-content > .scp-files-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.scp-files-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* IMPORTANT: reset old .scp-file-upload / .scp-files-list rules
   so they don't fight with the new step layout */
.scp-files-step.scp-file-upload {
    background: transparent;
    border: none;
    border-radius: 0;
}
.scp-files-step.scp-files-list {
    margin-top: 0;
}

/* ---------- Credentials box ---------- */
.scp-credentials-box {
    margin-top: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}
.scp-credentials-box p {
    margin: 8px 0;
    font-size: 13px;
}
.scp-credentials-box code {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #ebebeb;
    color: var(--scp-primary);
}

/* ---------- Empty state ---------- */
.scp-empty-state {
    padding: 48px 20px;
    text-align: center;
    color: #9ca0a5;
    background: #fafafa;
    border-radius: 10px;
    border: 2px dashed #e0e0e0;
}
.scp-empty-state p {
    margin: 0;
    font-size: 14px;
    color: #646970;
}
.scp-empty-state a { font-weight: 500; }

/* ---------- Clients table ---------- */
.scp-table-wrapper {
    overflow-x: auto;
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}
.scp-clients-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}
.scp-clients-table th {
    font-weight: 600;
    padding: 12px 8px;
    background: #f8f9fa;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0;
    color: #50575e;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.scp-clients-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f1;
    white-space: nowrap;
    font-size: 14px;
}
.scp-clients-table tbody tr {
    transition: background 0.1s ease;
}
.scp-clients-table tbody tr:hover {
    background: #f8f9fa;
}
.scp-clients-table tbody tr:last-child td {
    border-bottom: none;
}
.scp-clients-table .column-name { white-space: nowrap; padding-left: 26px !important; }
.scp-cell-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.scp-name-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    color: #1a5fa0;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    border: 1px solid var(--scp-primary-border);
}
.scp-clients-table .column-name strong { font-weight: 600; color: #1d2327; }
.scp-clients-table .column-id { white-space: nowrap; }
.scp-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', ui-monospace, monospace;
    letter-spacing: 0.03em;
    cursor: help;
    background: #fef8ee;
    color: #93560a;
    border: 1px solid #f0d9b5;
}
.scp-id-badge svg {
    color: #c67b0b;
    flex-shrink: 0;
}
.scp-id-copyable {
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.scp-id-copyable:hover {
    background: #fdf0db;
    border-color: #ddc08a;
}
.scp-id-copyable:active {
    transform: scale(0.96);
}
.scp-id-badge__check,
.scp-id-badge__copied {
    display: none;
}
.scp-id-copyable.scp-id-copied .scp-id-badge__icon,
.scp-id-copyable.scp-id-copied .scp-id-badge__text {
    display: none;
}
.scp-id-copyable.scp-id-copied .scp-id-badge__check,
.scp-id-copyable.scp-id-copied .scp-id-badge__copied {
    display: inline;
}
.scp-id-copyable.scp-id-copied {
    background: #edf8f2;
    border-color: #00a32a;
    color: #00a32a;
}
.scp-id-copyable.scp-id-copied svg {
    color: #00a32a;
}
.scp-clients-table .column-id code {
    cursor: help;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--scp-primary);
    border: 1px solid #ebebeb;
}
.scp-clients-table .column-email { white-space: nowrap; }
.scp-clients-table .column-files { white-space: nowrap; }
.scp-clients-table .column-last-seen { white-space: nowrap; }
.scp-last-seen {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    line-height: 1;
    white-space: nowrap;
}
.scp-last-seen svg { flex-shrink: 0; }
.scp-last-seen--recent { color: var(--scp-primary, #0073aa); }
.scp-last-seen--week { color: #646970; }
.scp-last-seen--stale { color: #d63638; }
.scp-last-seen--never { color: #a7aaad; font-style: italic; }
.scp-clients-table .column-actions { white-space: nowrap; }

/* ---------- File badges (table column) ---------- */
.scp-files-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.scp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.scp-badge svg {
    flex-shrink: 0;
}
.scp-badge--files {
    background: #f0faf4;
    color: #15713a;
    border: 1px solid #c8e6d4;
}
.scp-badge--files svg {
    color: #1a8a3f;
}
.scp-badge--size {
    background: #f5f0fa;
    color: #6b41a0;
    border: 1px solid #d9cdef;
}
.scp-badge--size svg {
    color: #8b5cf6;
}
.scp-badge--empty {
    color: #a7aaad;
    font-size: 13px;
    padding: 0;
}

/* ---------- Action buttons (table row) ---------- */
.scp-action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}
.scp-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid #dcdcde;
    background: #fff;
    color: #50575e;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}
.scp-act-btn svg { flex-shrink: 0; }
.scp-act-btn:hover { border-color: #8c8f94; color: #1d2327; background: #f6f7f7; }

.scp-act-btn--view  { color: var(--scp-primary); border-color: var(--scp-primary-border); background: var(--scp-primary-light); }
.scp-act-btn--view:hover  { background: rgba(var(--scp-primary-rgb),0.12); border-color: var(--scp-primary-border); color: var(--scp-primary-dark); }

.scp-act-btn--edit  { color: #1e7e34; border-color: #c3e0ca; background: #f0faf4; }
.scp-act-btn--edit:hover  { background: #dff2e6; border-color: #a0d4ac; color: #15713a; }

.scp-act-btn--email { color: #fff; border-color: var(--scp-primary); background: var(--scp-primary); }
.scp-act-btn--email:hover { background: var(--scp-primary-dark); border-color: var(--scp-primary-dark); color: #fff; }
.scp-act-btn--email .scp-btn-text { display: inline-flex; align-items: center; gap: 5px; }

.scp-act-btn--preview { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.scp-act-btn--preview:hover { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }

.scp-act-btn--delete { color: #b32d2e; border-color: rgba(179,45,46,0.2); background: #fff; }
.scp-act-btn--delete:hover { color: #8a2424; background: #fcf0f1; border-color: rgba(179,45,46,0.35); }

.scp-act-label { display: none; }
.scp-act-btn { padding: 7px; gap: 0; }
.scp-send-email-btn.scp-loading {
    cursor: wait;
    pointer-events: none;
    opacity: 0.65;
}
.scp-btn-spinner {
    display: inline-flex;
    align-items: center;
    animation: scp-spin 1s linear infinite;
}
.scp-btn-spinner svg { width: 14px; height: 14px; }

/* ---------- Loading overlay ---------- */
.scp-loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(2px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
.scp-loading-overlay[style*="flex"] { display: flex !important; }
.scp-loading-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 14px;
}
.scp-loading-overlay-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--scp-primary);
    border-radius: 50%;
    animation: scp-spin 0.8s linear infinite;
}
.scp-loading-overlay-text {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.scp-act-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.scp-email-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #50575e;
    text-decoration: none;
    font-size: 13px;
    padding: 3px 0;
    transition: color 0.15s ease;
}
.scp-email-link svg {
    color: #a7aaad;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.scp-email-link:hover {
    color: var(--scp-primary);
}
.scp-email-link:hover svg {
    color: var(--scp-primary);
}
.scp-clients-table .column-email a {
    color: var(--scp-primary);
    text-decoration: none;
    font-weight: 500;
}
.scp-clients-table .column-email a:hover {
    color: var(--scp-primary-dark);
    text-decoration: underline;
}

/* ---------- Pagination ---------- */
.scp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.scp-pagination .button {
    min-width: 36px;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #c3c4c7;
    background: #fff;
    color: #1d2327;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s ease;
}
.scp-pagination .button:hover {
    background: #f0f1f3;
    border-color: #8c8f94;
}
.scp-pagination .button.disabled {
    background: var(--scp-primary);
    color: #fff;
    border-color: var(--scp-primary);
    cursor: default;
    font-weight: 600;
}
.scp-pagination .button.disabled:hover {
    background: var(--scp-primary);
    color: #fff;
}

/* ---------- View Details Modal ---------- */
.scp-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
.scp-modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
}
.scp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    max-width: 880px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 100001;
}
.scp-modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid #ebebeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.scp-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}
.scp-modal-close {
    background: #f0f0f1;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #50575e;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.scp-modal-close:hover {
    background: #e0e0e0;
    color: #1d2327;
}
.scp-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}
.scp-modal-body .form-table { margin: 0; }
.scp-modal-body .form-table th {
    width: 140px;
    font-weight: 600;
    padding: 14px 0;
    vertical-align: top;
    color: #1d2327;
    font-size: 13px;
}
.scp-modal-body .form-table td {
    padding: 14px 0;
    color: #50575e;
    font-size: 14px;
}
#scp-modal-password .scp-password-copy-row { max-width: 300px; }
#scp-modal-password .scp-password-copy-row .scp-info-password { margin: 0; max-width: none; flex: 1; min-width: 0; }
#scp-modal-password .scp-password-copy-row .scp-info-password input { width: 100%; padding-right: 36px; }
#scp-modal-password { vertical-align: middle !important; }
#scp-modal-password + td,
td#scp-modal-password { vertical-align: middle; }
/* Align the th next to the password td */
.scp-modal-body .form-table tr:has(#scp-modal-password) th {
    vertical-align: middle;
}
.scp-modal-body .form-table code {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--scp-primary);
    font-family: ui-monospace, monospace;
    word-break: break-all;
    border: 1px solid #ebebeb;
}
.scp-modal-footer {
    padding: 18px 28px;
    border-top: 1px solid #ebebeb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
.scp-modal-footer .button {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.scp-modal-footer .button-primary {
    background: var(--scp-primary);
    border-color: var(--scp-primary);
    color: #fff;
}
.scp-modal-footer .button-primary:hover {
    background: var(--scp-primary-dark);
    border-color: var(--scp-primary-dark);
}
.scp-modal-footer .scp-modal-footer-close {
    min-width: 100px;
    background: #f8f9fa;
    border: 1px solid #c3c4c7;
    color: #50575e;
}
.scp-modal-footer .scp-modal-footer-close:hover {
    background: #f0f1f3;
    color: #1d2327;
}
body.scp-modal-open { overflow: hidden; }

/* ---------- Delete client modal ---------- */
.scp-delete-client-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.scp-delete-client-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
}
.scp-delete-client-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}
.scp-delete-client-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.scp-delete-client-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fcf0f1;
    border-radius: 10px;
    flex-shrink: 0;
}
.scp-delete-client-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #1d2327;
}
.scp-delete-client-body { padding: 12px 24px 24px; }
.scp-delete-client-message {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #646970;
}
.scp-delete-client-name {
    margin: 0 0 24px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}
.scp-delete-client-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- Shared modal buttons ---------- */
.scp-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}
.scp-modal-btn--secondary {
    color: #50575e;
    background: #f0f0f1;
    border: 1px solid #dcdcde;
}
.scp-modal-btn--secondary:hover {
    color: #1d2327;
    background: #e8e8e8;
    border-color: #c3c4c7;
}
.scp-modal-btn--danger {
    color: #fff;
    background: #b32d2e;
}
.scp-modal-btn--danger:hover {
    background: #8a2424;
    box-shadow: 0 2px 6px rgba(179,45,46,0.25);
    color: #fff;
}
.scp-modal-btn:focus-visible {
    outline: 2px solid var(--scp-primary);
    outline-offset: 2px;
}

/* ---------- Admin notices ---------- */
.wrap > .notice {
    border-radius: 8px;
    border-left-width: 4px;
    padding: 12px 18px;
    margin: 12px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.wrap > .notice p {
    font-size: 14px;
    line-height: 1.5;
}
.wrap > .notice.is-dismissible {
    padding-right: 38px;
}
.wrap > .notice.is-dismissible .notice-dismiss {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 0;
    height: 18px;
    display: flex;
    align-items: center;
}

/* ---------- WP header inline adjustments ---------- */
.page-title-action {
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    border: 1px solid #c3c4c7 !important;
    background: #f8f9fa !important;
    color: #1d2327 !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}
.page-title-action:hover {
    background: #f0f1f3 !important;
    border-color: #8c8f94 !important;
    color: #1d2327 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
    .scp-name-avatar { width: 28px; height: 28px; font-size: 11px; }
    .scp-id-badge { padding: 3px 8px; font-size: 11px; }
    .scp-badge { padding: 3px 8px; font-size: 11px; }
}
@media (max-width: 1200px) {
    .scp-section { margin-bottom: 24px; }
    .scp-section-header { padding: 16px 20px; }
    .scp-section-content { padding: 20px; }
    .scp-clients-table th, .scp-clients-table td { padding: 12px 10px; }
}
@media (max-width: 782px) {
    .scp-section-header {
        padding: 14px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .scp-section-content { padding: 18px; }
    .scp-table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .scp-clients-table { font-size: 13px; }
    .scp-clients-table th, .scp-clients-table td { padding: 10px 8px; }
    .scp-pagination { flex-wrap: wrap; }
    .scp-stats-row { grid-template-columns: repeat(2, 1fr); }
    .scp-actions-grid { grid-template-columns: 1fr; }
    .scp-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .scp-stats-row { grid-template-columns: 1fr; }
    .scp-features-grid { grid-template-columns: 1fr; }
    .scp-section-header { padding: 12px 16px; }
    .scp-section-content { padding: 16px; }
    .scp-client-form .form-table th,
    .scp-client-form .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    .scp-client-form .form-table th { padding-bottom: 4px; }
    .scp-input-with-button {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }
    .scp-input-with-button input[type="text"],
    .scp-input-with-button input[type="password"] {
        width: 100%;
        max-width: 100%;
    }
    .scp-input-with-button .button { width: 100%; justify-content: center; }
    .scp-clients-table { font-size: 12px; }
    .scp-clients-table .column-email,
    .scp-clients-table .column-last-seen { display: none; }
    .scp-modal-content { width: 95%; max-height: 95vh; }
    .scp-modal-header, .scp-modal-body, .scp-modal-footer { padding: 18px; }
    .scp-modal-body .form-table th,
    .scp-modal-body .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    .scp-modal-body .form-table th { padding-bottom: 4px; font-weight: 600; }
}

/* ======== Home Page – Modern dashboard ======== */
.scp-home-page {
    max-width: 1100px;
    margin: 0 auto;
}
.scp-home-page .wp-header-end { display: none; }
.scp-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.scp-home-title {
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
    letter-spacing: -0.02em;
}
.scp-home-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.scp-home-header__right .scp-home-subtitle {
    margin: 0;
}
.scp-home-badges {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.scp-home-role-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.01em;
}
.scp-home-role-badge--admin {
    color: #1e4d2b;
    background: #d4edda;
    border: 1px solid #a3d9b1;
}
.scp-home-role-badge--manager {
    color: #5b4200;
    background: #fef3cd;
    border: 1px solid #e6d289;
}
.scp-home-role-badge--contributor {
    color: #005a87;
    color: var(--scp-primary-dark, #005a87);
    background: #e8f4fa;
    background: var(--scp-primary-light, #e8f4fa);
    border: 1px solid #b8d9ec;
    border-color: var(--scp-primary-border, #b8d9ec);
}
.scp-home-subtitle {
    display: inline-block;
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--scp-primary);
    background: var(--scp-primary-light);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--scp-primary-border);
    letter-spacing: 0.01em;
}
.scp-home-content { margin-top: 8px; }
.scp-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}
/* Hero */
.scp-hero-section {
    background: linear-gradient(160deg, var(--scp-primary) 0%, var(--scp-primary-dark) 100%);
    color: #fff;
    padding: 40px 44px;
    border-radius: 12px;
    margin-bottom: 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(var(--scp-primary-rgb),0.25);
}
.scp-hero-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scp-hero-icon svg { stroke: #fff; }
.scp-hero-icon--logo {
    width: 96px;
    height: 96px;
    background: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: none;
}
.scp-hero-icon--logo img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 18px;
}
.scp-hero-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}
.scp-hero-title em {
    font-style: italic;
    font-weight: 700;
}
.scp-hero-description {
    margin: 0 auto;
    font-size: 16px;
    color: rgba(255,255,255,0.92);
    line-height: 1.6;
    max-width: 600px;
}
/* Stats Row */
.scp-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}
.scp-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: default;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
a.scp-stat-card,
.scp-stat-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}
a.scp-stat-card:hover,
.scp-stat-card--link:hover {
    border-color: var(--scp-primary);
    box-shadow: 0 4px 14px rgba(var(--scp-primary-rgb),0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
a.scp-stat-card:focus-visible,
.scp-stat-card--link:focus-visible {
    outline: 2px solid var(--scp-primary);
    outline-offset: 2px;
    border-color: var(--scp-primary);
}
.scp-stat-card--link::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 12px;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a7aaad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.scp-stat-card--link:hover::after {
    opacity: 1;
    transform: translateX(2px);
}
.scp-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.scp-stat-icon--clients { background: var(--scp-primary-light); color: var(--scp-primary); }
.scp-stat-icon--folders { background: #fef8ee; color: #c67b0b; }
.scp-stat-icon--files   { background: #f0faf4; color: #1a8a3f; }
.scp-stat-icon--size    { background: #f5f0fa; color: #8b5cf6; }
.scp-stat-icon--smtp-ok { background: #f0faf4; color: #00a32a; }
.scp-stat-icon--smtp-no { background: #fcf0f1; color: #b32d2e; }
.scp-stat-body { display: flex; flex-direction: column; }
.scp-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}
.scp-stat-value .scp-stat-limit {
    font-size: 14px;
    font-weight: 500;
    color: #8c8f94;
    letter-spacing: 0;
}
.scp-stat-card--at-limit {
    border-color: #f0b429 !important;
    background: #fffbeb;
}
.scp-stat-card--at-limit .scp-stat-value,
.scp-stat-card--at-limit .scp-stat-value .scp-stat-limit {
    color: #b45309;
}
.scp-stat-label {
    font-size: 13px;
    color: #646970;
    margin-top: 2px;
}
/* Quick Actions */
.scp-quick-actions { margin-bottom: 40px; }
.scp-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.scp-action-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    text-decoration: none;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.scp-action-card:hover {
    border-color: var(--scp-primary);
    box-shadow: 0 6px 20px rgba(var(--scp-primary-rgb),0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.scp-action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: var(--scp-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--scp-primary);
}
.scp-action-card h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}
.scp-action-card p {
    margin: 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.4;
}
/* Features Grid */
.scp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.scp-feature-card {
    background: #f9fafb;
    border: 1px dashed #d7dadd;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: help;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.scp-feature-card:hover {
    background-color: #ffffff;
    border-color: #c4c7cc;
}
.scp-section-title--features {
    margin-bottom: 6px;
}
.scp-section-subtitle {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: #8c8f94;
    font-style: italic;
}
.scp-feature-modal {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.scp-feature-modal.scp-feature-modal--visible {
    opacity: 1;
    visibility: visible;
}
.scp-feature-modal-content {
    position: relative;
    background: #1d2327;
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    font-size: 13px;
    line-height: 1.6;
    max-width: 340px;
    text-align: left;
}
.scp-feature-modal-content::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 6px solid #1d2327;
}
.scp-feature-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--scp-primary);
}
.scp-feature-icon svg {
    display: block;
}
.scp-feature-card h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}
.scp-feature-card p {
    margin: 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
}
/* Instructions */
.scp-instructions-section { margin-bottom: 32px; }
.scp-instructions-section .scp-section-title { margin-bottom: 24px; }
.scp-instruction-block {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.scp-instruction-block:hover {
    border-color: var(--scp-primary-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.scp-instruction-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--scp-primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
}
.scp-instruction-content { flex: 1; }
.scp-instruction-content h3 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 600;
    color: #1d2327;
}
.scp-instruction-content > p {
    margin: 0 0 14px 0;
    font-size: 14px;
    color: #646970;
    line-height: 1.55;
}
.scp-instruction-content a:not(.scp-instruction-btn) {
    color: var(--scp-primary);
    text-decoration: none;
}
.scp-instruction-content a:not(.scp-instruction-btn):hover {
    text-decoration: underline;
}
.scp-instruction-content ul {
    margin: 0 0 16px 0;
    padding-left: 22px;
    color: #50575e;
}
.scp-instruction-content ul li {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}
.scp-instruction-content code {
    background: #f0f0f1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--scp-primary);
    font-family: ui-monospace, monospace;
}
.scp-instruction-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    background: #f8f9fa;
    border: 1px solid #c3c4c7;
    color: #1d2327;
}
.scp-instruction-btn:hover {
    background: #f0f1f3;
    border-color: #8c8f94;
    color: #1d2327;
    text-decoration: none;
}
.scp-instruction-btn--primary {
    background: #0073aa;
    background: var(--scp-primary, #0073aa);
    border-color: #0073aa;
    border-color: var(--scp-primary, #0073aa);
    color: #fff !important;
}
.scp-instruction-btn--primary:hover,
.scp-instruction-btn--primary:focus {
    background: #005a87;
    background: var(--scp-primary-dark, #005a87);
    border-color: #005a87;
    border-color: var(--scp-primary-dark, #005a87);
    color: #fff !important;
    text-decoration: none;
}

/* Team Access role badge */
.scp-team-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #005a87;
    color: var(--scp-primary-dark, #005a87);
    background: #e8f4fa;
    background: var(--scp-primary-light, #e8f4fa);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #b8d9ec;
    border-color: var(--scp-primary-border, #b8d9ec);
}
.scp-team-role-badge--manager {
    color: #5b4200;
    background: #fef3cd;
    border-color: #e6d289;
}
.scp-instruction-content .button {
    margin-top: 6px;
}
@media (max-width: 960px) {
    .scp-actions-grid { grid-template-columns: 1fr; }
    .scp-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1200px) and (min-width: 961px) {
    .scp-features-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ── Data Protection section ─────────────────────────────────── */
.scp-data-protection-section { margin-bottom: 32px; }
.scp-data-protection-section .scp-section-title { margin-bottom: 16px; }
.scp-data-protection-card {
    background: #fff;
    border: 1px solid var(--scp-primary-border, #e0e0e0);
    border-radius: 12px;
    padding: 28px 32px;
    transition: border-color 0.2s;
}
.scp-data-protection-card:hover { border-color: var(--scp-primary, #0073aa); }
.scp-data-protection-info h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.scp-data-protection-info p { font-size: 14px; color: #50575e; margin: 0 0 6px; line-height: 1.6; }
.scp-data-protection-note { font-style: italic; color: #888 !important; font-size: 13px !important; }
.scp-data-protection-toggle { margin-top: 18px; padding-top: 18px; border-top: 1px solid #f0f0f0; }
.scp-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.scp-toggle-label input[type="checkbox"] { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.scp-toggle-description { font-size: 13px; color: #888; margin: 8px 0 0 28px; line-height: 1.5; }
.scp-toggle-status {
    display: inline-block;
    margin-top: 10px;
    margin-left: 28px;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}
.scp-toggle-status--safe { color: #46b450; }
.scp-toggle-status--warning { color: #d63638; }

/* ── Confirmation Modal ─────────────────────────────────────────── */
.scp-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.scp-confirm-modal--visible { opacity: 1; }
.scp-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.scp-confirm-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    text-align: center;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}
.scp-confirm-modal--visible .scp-confirm-modal__dialog {
    transform: translateY(0) scale(1);
}
.scp-confirm-modal__icon {
    margin-bottom: 16px;
    line-height: 1;
}
.scp-confirm-modal__icon svg { display: inline-block; }
.scp-confirm-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 10px;
}
.scp-confirm-modal__text {
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
    margin: 0 0 24px;
}
.scp-confirm-modal__input-group {
    text-align: left;
    margin-bottom: 24px;
}
.scp-confirm-modal__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
    margin-bottom: 8px;
}
.scp-confirm-modal__label strong {
    color: #d63638;
    font-weight: 700;
}
.scp-confirm-modal__field {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.scp-confirm-modal__field:focus {
    border-color: #d63638;
    box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.2);
}
.scp-confirm-modal__field::placeholder { color: #c3c4c7; }
.scp-confirm-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.scp-confirm-modal__btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s, transform 0.1s;
    line-height: 1.4;
}
.scp-confirm-modal__btn:active { transform: scale(0.97); }
.scp-confirm-modal__btn--cancel {
    background: #f0f0f1;
    color: #50575e;
}
.scp-confirm-modal__btn--cancel:hover { background: #e2e4e7; }
.scp-confirm-modal__btn--danger {
    background: #d63638;
    color: #fff;
}
.scp-confirm-modal__btn--danger:hover { background: #b32d2e; }
.scp-confirm-modal__btn--danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.scp-confirm-modal__btn--danger:disabled:hover { background: #d63638; }

@media (max-width: 782px) {
    .scp-hero-section { padding: 32px 24px; }
    .scp-hero-title { font-size: 20px; }
    .scp-hero-description { font-size: 15px; }
    .scp-features-grid { grid-template-columns: 1fr; }
    .scp-instruction-block { flex-direction: column; padding: 20px; }
    .scp-instruction-number { align-self: flex-start; }
    .scp-data-protection-card { padding: 20px; }
    .scp-confirm-modal__dialog { padding: 32px 24px 24px; margin: 16px; }
}
