/* ==========================================================================
   OFFICEPRO CLIENT PORTAL (بوابة العملاء) - UNIFIED DESIGN SYSTEM
   Luxury Saudi Law Firm Aesthetic: Deep Navy, Desert Gold & Refined Typography
   Version: 20260922.1
   ========================================================================== */

:root, :where(.cp-body, .cpa) {
    --cp-navy: #0c1b30;
    --cp-navy-dark: #071120;
    --cp-navy-light: #162c4b;
    --cp-navy-soft: #233e63;
    --cp-gold: #c5a059;
    --cp-gold-dark: #a8833b;
    --cp-gold-light: #dfc488;
    --cp-gold-subtle: #fbf7ee;
    --cp-gold-border: #e6d5b0;
    --cp-ink: #0f1e33;
    --cp-muted: #5e7188;
    --cp-muted-light: #8ca0b8;
    --cp-line: #e2e8f0;
    --cp-line-soft: #edf2f7;
    --cp-bg: #f5f7fa;
    --cp-card-bg: #ffffff;
    --cp-emerald: #107c65;
    --cp-emerald-bg: #e8f7f2;
    --cp-emerald-border: #b8e6d8;
    --cp-amber: #b48128;
    --cp-amber-bg: #fdf8eb;
    --cp-amber-border: #f2dcab;
    --cp-rose: #be3232;
    --cp-rose-bg: #fef2f2;
    --cp-rose-border: #f8c8c8;
    --cp-radius-sm: 8px;
    --cp-radius: 14px;
    --cp-radius-lg: 20px;
    --cp-radius-full: 9999px;
    --cp-shadow-sm: 0 2px 6px rgba(12, 27, 48, 0.04);
    --cp-shadow: 0 8px 24px rgba(12, 27, 48, 0.06);
    --cp-shadow-lg: 0 16px 48px rgba(12, 27, 48, 0.12);
    --cp-font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
    --cp-font-body: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
}

/* Base Reset & Typography */
.cp-body {
    margin: 0;
    padding: 0;
    background: var(--cp-bg);
    color: var(--cp-ink);
    font-family: var(--cp-font-body);
    font-size: 14.5px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.cp-body *, .cp-body *::before, .cp-body *::after {
    box-sizing: border-box;
}

.cp-body a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cp-body h1, .cp-body h2, .cp-body h3, .cp-body h4 {
    font-family: var(--cp-font-heading);
    font-weight: 700;
    color: var(--cp-navy);
    line-height: 1.5;
    margin-top: 0;
    overflow-wrap: anywhere;
}

.cp-body p {
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}

.cp-body svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cp-body :focus-visible, .cpa :focus-visible {
    outline: 2.5px solid var(--cp-gold);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.cp-skip {
    position: fixed;
    top: -100px;
    right: 20px;
    background: var(--cp-navy);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--cp-radius-sm);
    z-index: 9999;
    font-weight: 600;
}
.cp-skip:focus {
    top: 15px;
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.cp-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--cp-line);
    box-shadow: 0 4px 20px rgba(12, 27, 48, 0.03);
}

.cp-header-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 76px;
}

.cp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cp-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(12, 27, 48, 0.08);
    border: 1px solid var(--cp-line);
}

.cp-brand-text {
    display: flex;
    flex-direction: column;
}

.cp-brand-name {
    font-family: var(--cp-font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--cp-navy);
    line-height: 1.25;
}

.cp-brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--cp-muted);
}

.cp-brand-divider {
    margin: 0 3px;
    color: var(--cp-gold-dark);
}

.cp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-menu-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--cp-line);
    background: #fff;
    color: var(--cp-navy);
    cursor: pointer;
}

/* Buttons & Interactive Elements */
.cp-button, .cpa .cp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    min-height: 44px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--cp-navy), var(--cp-navy-light));
    color: #ffffff !important;
    font-family: var(--cp-font-heading);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(12, 27, 48, 0.15);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.cp-button:hover, .cpa .cp-button:hover {
    background: linear-gradient(135deg, var(--cp-navy-light), var(--cp-navy-soft));
    box-shadow: 0 6px 16px rgba(12, 27, 48, 0.22);
    transform: translateY(-1px);
}

.cp-button-sm {
    min-height: 36px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
}

.cp-button-block {
    width: 100% !important;
}

.cp-button-gold {
    background: linear-gradient(135deg, var(--cp-gold), var(--cp-gold-dark)) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.25) !important;
}
.cp-button-gold:hover {
    filter: brightness(1.08);
}

.cp-quiet, .cpa .cp-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--cp-line);
    background: #ffffff;
    color: var(--cp-navy);
    font-family: var(--cp-font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none !important;
}

.cp-quiet:hover, .cpa .cp-quiet:hover {
    background: var(--cp-line-soft);
    border-color: #cbd5e1;
    color: var(--cp-navy-dark);
}

.cp-logout-form {
    margin: 0;
}

.cp-preview-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--cp-amber-bg);
    border: 1px solid var(--cp-amber-border);
    border-radius: 10px;
    font-size: 12px;
}
.cp-preview-pill {
    background: var(--cp-amber);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 10.5px;
}
.cp-preview-account {
    color: #6d4e14;
    font-weight: 600;
}
.cp-preview-exit {
    font-size: 11px !important;
    min-height: 30px !important;
    padding: 4px 10px !important;
}

/* Badges & Status Pills */
.cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--cp-radius-full);
    font-size: 11.5px;
    font-weight: 700;
    background: #eef3f8;
    color: #2b496e;
    border: 1px solid #dce5ef;
    line-height: 1.4;
    white-space: nowrap;
}

.cp-badge-gold {
    background: var(--cp-gold-subtle);
    color: var(--cp-gold-dark);
    border-color: var(--cp-gold-border);
}

.cp-badge-emerald {
    background: var(--cp-emerald-bg);
    color: var(--cp-emerald);
    border-color: var(--cp-emerald-border);
}

.cp-badge-amber {
    background: var(--cp-amber-bg);
    color: var(--cp-amber);
    border-color: var(--cp-amber-border);
}

.cp-badge-danger {
    background: var(--cp-rose-bg);
    color: var(--cp-rose);
    border-color: var(--cp-rose-border);
}

/* Notices & Alerts */
.cp-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--cp-radius);
    margin: 0 0 20px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.6;
}
.cp-notice-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}
.cp-notice.cp-success {
    background: var(--cp-emerald-bg);
    border: 1px solid var(--cp-emerald-border);
    color: #0b5545;
}
.cp-notice.cp-success .cp-notice-icon {
    background: #c7ede1;
    color: var(--cp-emerald);
}
.cp-notice.cp-danger {
    background: var(--cp-rose-bg);
    border: 1px solid var(--cp-rose-border);
    color: #8c1e1e;
}
.cp-notice.cp-danger .cp-notice-icon {
    background: #fad5d5;
    color: var(--cp-rose);
}
.cp-notice-info {
    background: #f0f5fa;
    border: 1px solid #d3e1ee;
    color: #1a385c;
}
.cp-notice-info .cp-notice-icon {
    background: #dce7f3;
    color: #214d7a;
}
.cp-preview-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fff8e8;
    border: 1px solid #eed69f;
    border-radius: 12px;
    color: #79571b;
    font-size: 13px;
    margin-bottom: 22px;
}
.cp-preview-badge {
    background: #79571b;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Executive PoA Alert Banner */
.cp-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(12, 27, 48, 0.05);
}
.cp-alert-banner.cp-alert-warning {
    background: linear-gradient(100deg, #fffdf8, #fdf8ed);
    border: 1px solid var(--cp-amber-border);
    border-inline-start: 5px solid var(--cp-gold);
}
.cp-alert-banner.cp-alert-danger {
    background: linear-gradient(100deg, #fff8f8, #fef2f2);
    border: 1px solid var(--cp-rose-border);
    border-inline-start: 5px solid var(--cp-rose);
}
.cp-alert-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    flex-shrink: 0;
    box-shadow: var(--cp-shadow-sm);
}
.cp-alert-warning .cp-alert-icon {
    color: var(--cp-gold-dark);
    border: 1px solid var(--cp-gold-border);
}
.cp-alert-danger .cp-alert-icon {
    color: var(--cp-rose);
    border: 1px solid var(--cp-rose-border);
}
.cp-alert-body {
    flex: 1;
    min-width: 0;
}
.cp-alert-body strong {
    display: block;
    font-size: 15px;
    color: var(--cp-navy);
    margin-bottom: 3px;
}
.cp-alert-body p {
    font-size: 13px;
    color: var(--cp-muted);
    margin: 0;
    line-height: 1.6;
}
.cp-alert-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SHELL LAYOUT & DESKTOP SIDEBAR
   -------------------------------------------------------------------------- */
.cp-app-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    min-height: calc(100vh - 76px);
}

.cp-nav {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    background: #ffffff;
    border-radius: 0;
    border-left: 1px solid var(--cp-line, #e2e8f0);
    padding: 14px 10px;
    box-shadow: -1px 0 8px rgba(0, 0, 0, 0.03);
    color: #1e293b;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
    z-index: 40;
}
.cp-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.cp-nav-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cp-nav-caption {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.4px;
    padding: 2px 8px 3px;
    text-transform: uppercase;
}

.cp-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cp-nav-links a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 8px;
    border-radius: 8px;
    color: #475569;
    font-family: var(--cp-font-heading);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s ease;
    position: relative;
    text-decoration: none;
    min-height: 35px;
}

.cp-nav-links a:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(-2px);
}

.cp-nav-links a.active {
    background: rgba(197, 160, 89, 0.08);
    color: #8c6a23;
    font-weight: 700;
    transform: none;
}

.cp-nav-links a.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 3px 0 0 3px;
    background: var(--cp-gold, #c5a059);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.3);
}

.cp-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.cp-nav-icon svg {
    width: 16px;
    height: 16px;
}

.cp-nav-links a:hover .cp-nav-icon {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.04);
}

.cp-nav-links a.active .cp-nav-icon {
    background: rgba(197, 160, 89, 0.16);
    color: #8c6a23;
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.12);
}

.cp-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    margin-inline-start: auto;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.2px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.cp-nav-badge.is-unread {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    animation: cp-pulse-subtle 2s infinite ease-in-out;
}

@keyframes cp-pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.cp-nav-badge.is-zero {
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-weight: 600;
    box-shadow: none;
}

.cp-nav-links a.active .cp-nav-badge.is-zero {
    background: rgba(197, 160, 89, 0.16);
    color: #8c6a23;
    border-color: rgba(197, 160, 89, 0.3);
}

.cp-nav-links a:hover .cp-nav-badge.is-zero {
    background: rgba(148, 163, 184, 0.22);
    color: #334155;
}

.cp-header-notifications {
    position: relative;
    padding: 8px 12px;
}

.cp-header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--cp-rose, #e11d48);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.45);
}

.cp-nav-bottom {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--cp-line, #e2e8f0);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-nav-person {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.18s ease;
}
.cp-nav-person:hover {
    background: #f1f5f9;
    border-color: rgba(197, 160, 89, 0.4);
    transform: translateY(-1px);
}
.cp-person-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f9f6f0 60%, #f0ece4 100%);
    border: 1.5px solid rgba(197, 160, 89, 0.85);
    color: #8c6a23;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(197, 160, 89, 0.12);
}
.cp-person-meta {
    min-width: 0;
}
.cp-person-meta strong {
    display: block;
    font-size: 12px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-person-meta small {
    display: block;
    font-size: 10px;
    color: #64748b;
}
.cp-nav-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    color: #94a3b8;
}
.cp-nav-privacy svg {
    width: 12px;
    height: 12px;
    color: #c5a059;
}

/* --------------------------------------------------------------------------
   MAIN CONTENT AREA & HEADINGS
   -------------------------------------------------------------------------- */
.cp-main {
    min-width: 0;
    padding: 28px 36px 32px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 76px);
}
.cp-main.cp-auth {
    padding: 0;
    display: block;
    min-height: auto;
}

.cp-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--cp-line);
    margin-bottom: 26px;
}

.cp-heading-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cp-heading-copy h1 {
    font-size: 26px;
    margin: 2px 0 4px;
    letter-spacing: -0.3px;
}
.cp-heading-copy p {
    color: var(--cp-muted);
    font-size: 13.5px;
    margin: 0;
}
.cp-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--cp-gold-dark);
    display: inline-block;
    letter-spacing: 0.2px;
}

.cp-heading-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--cp-gold-border);
    color: var(--cp-gold-dark);
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.15);
}
.cp-heading-icon svg {
    width: 26px;
    height: 26px;
}

.cp-back-bar {
    margin-bottom: 20px;
}

/* Generic Cards */
.cp-card {
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-lg);
    padding: 26px 28px;
    margin-bottom: 24px;
    box-shadow: var(--cp-shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.cp-card:hover {
    box-shadow: var(--cp-shadow);
}
.cp-section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cp-line-soft);
}
.cp-section-top h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    margin: 0;
    color: var(--cp-navy);
}
.cp-section-top h2 svg {
    color: var(--cp-gold-dark);
}
.cp-link-subtle {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--cp-navy);
}
.cp-link-subtle:hover {
    color: var(--cp-gold-dark);
}

.cp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 44px 24px;
    background: #fafbfd;
    border: 1px dashed #cbd5e1;
    border-radius: var(--cp-radius);
    text-align: center;
    color: var(--cp-muted);
}
.cp-empty svg {
    width: 36px;
    height: 36px;
    color: var(--cp-muted-light);
}
.cp-empty strong {
    font-size: 15px;
    color: var(--cp-navy);
}
.cp-empty span {
    font-size: 13px;
    max-width: 420px;
}

.cp-empty-rich {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 36px;
    gap: 16px;
    background: #ffffff;
    border: 1px dashed var(--cp-line);
    border-radius: var(--cp-radius-lg);
    box-shadow: var(--cp-shadow-sm);
}
.cp-empty-symbol {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #f0f4f9;
    color: var(--cp-navy);
    box-shadow: 0 6px 20px rgba(12, 27, 48, 0.08);
}
.cp-empty-symbol svg {
    width: 34px;
    height: 34px;
}
.cp-symbol-gold {
    background: linear-gradient(135deg, #fbf5e8, #f5ecd3);
    color: var(--cp-gold-dark);
    border: 1px solid var(--cp-gold-border);
}
.cp-empty-rich h2 {
    font-size: 21px;
    font-weight: 800;
    color: var(--cp-navy);
    margin: 0;
}
.cp-empty-rich p {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--cp-muted);
    max-width: 660px;
    margin: 0;
}
.cp-empty-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   EXECUTIVE HOME DASHBOARD
   -------------------------------------------------------------------------- */
.cp-dashboard-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.cp-dashboard-title h1 {
    font-size: 28px;
    margin: 4px 0 0;
    letter-spacing: -0.4px;
}
.cp-today-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--cp-muted);
    box-shadow: var(--cp-shadow-sm);
}
.cp-today-badge svg {
    color: var(--cp-gold-dark);
}

/* Welcome Hero Card - Executive Light Luxury Theme */
.cp-client-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
    overflow: hidden;
    padding: 34px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #faf8f5 55%, #f6f1e6 100%);
    color: #1e293b;
    border-radius: 18px;
    margin-bottom: 28px;
    border: 1px solid rgba(197, 160, 89, 0.35);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
}
.cp-client-welcome::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.cp-client-welcome::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: 25%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.cp-welcome-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
}
.cp-client-welcome .cp-eyebrow {
    color: #926d27;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}
.cp-client-welcome h2 {
    color: #0f172a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.45;
    margin: 4px 0 12px;
}
.cp-client-welcome p {
    color: #475569;
    font-size: 14.5px;
    line-height: 1.85;
    margin-bottom: 24px;
    max-width: 620px;
}
.cp-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.cp-client-welcome .cp-button {
    background: linear-gradient(135deg, #c5a059, #a8823b);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.35);
}
.cp-client-welcome .cp-button:hover {
    background: linear-gradient(135deg, #cca861, #9f7932);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.45);
    transform: translateY(-1px);
}
.cp-hero-btn {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.cp-hero-btn:hover {
    background: #f8fafc !important;
    border-color: rgba(197, 160, 89, 0.4) !important;
    color: #8c6a23 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.12);
}
.cp-welcome-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-width: 170px;
}
.cp-welcome-emblem img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f9f6f0 60%, #f0ece4 100%);
    border-radius: 50%;
    padding: 8px;
    border: 2px solid rgba(197, 160, 89, 0.7);
    box-shadow: 0 0 0 6px rgba(197, 160, 89, 0.1), 0 6px 16px rgba(0, 0, 0, 0.06);
}
.cp-welcome-emblem span {
    font-family: var(--cp-font-heading);
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}
.cp-welcome-emblem small {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* KPI Statistics Grid */
.cp-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}
@media (max-width: 1400px) {
    .cp-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .cp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .cp-stats {
        grid-template-columns: 1fr;
    }
}
.cp-stat {
    position: relative;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    padding: 20px 22px 16px;
    box-shadow: var(--cp-shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.cp-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--cp-shadow);
    border-color: var(--cp-gold-border);
}
.cp-stat-symbol {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #f0f4f9;
    color: var(--cp-navy);
}
.cp-stat-cases .cp-stat-symbol { background: #eef4fc; color: #1e4a7a; }
.cp-stat-sessions .cp-stat-symbol { background: #fbf5e8; color: var(--cp-gold-dark); }
.cp-stat-executions .cp-stat-symbol { background: #f5f0fb; color: #5a2e99; }
.cp-stat-poas .cp-stat-symbol { background: #e9f7f2; color: var(--cp-emerald); }
.cp-stat-documents .cp-stat-symbol { background: #f0f7fb; color: #206d9a; }
.cp-stat-messages .cp-stat-symbol { background: #fdf2f2; color: #a82e2e; }

.cp-stat-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cp-muted);
}
.cp-stat strong {
    font-family: var(--cp-font-heading);
    font-size: 34px;
    font-weight: 800;
    color: var(--cp-navy);
    line-height: 1.3;
    margin: 6px 0 12px;
}
.cp-stat-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cp-muted);
    border-top: 1px solid var(--cp-line-soft);
    padding-top: 10px;
}
.cp-stat:hover .cp-stat-foot {
    color: var(--cp-gold-dark);
}

/* Dashboard Two-Column Grid */
.cp-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(360px, 1.15fr);
    gap: 28px;
    align-items: start;
}
.cp-flow-col, .cp-side-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   JUDICIAL ENFORCEMENT STYLES (التنفيذ القضائي)
   -------------------------------------------------------------------------- */
.cp-enforcement-home-card {
    border-inline-start: 4px solid #5a2e99;
}

.cp-enforcement-overview-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 16px;
    align-items: center;
    background: #faf7fd;
    border: 1px solid #ede3f7;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 14px;
}
.cp-enforcement-metric small {
    display: block;
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-enforcement-metric strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--cp-navy);
    margin-top: 2px;
}
.cp-metric-success strong {
    color: var(--cp-emerald) !important;
}
.cp-metric-remaining strong {
    color: #69788d !important;
}
.cp-enforcement-rate-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d9c7f0;
    border-radius: 10px;
}
.cp-enforcement-rate-badge span {
    font-size: 10px;
    color: #5a2e99;
    font-weight: 700;
}
.cp-enforcement-rate-badge b {
    font-size: 16px;
    color: #5a2e99;
}

/* Progress Track */
.cp-progress-track {
    width: 100%;
    height: 8px;
    background: #e9edf3;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}
.cp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cp-gold), var(--cp-emerald));
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Enforcement Row */
.cp-enforcement-home-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cp-enforcement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    background: #fff;
    transition: all 0.18s ease;
}
.cp-enforcement-row:hover {
    border-color: var(--cp-gold);
    box-shadow: var(--cp-shadow-sm);
    transform: translateY(-1px);
}
.cp-enforcement-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.cp-muted-code {
    font-size: 11.5px;
    font-family: monospace;
    color: var(--cp-muted);
}
.cp-enforcement-info h3 {
    font-size: 15px;
    margin: 4px 0 2px;
}
.cp-enforcement-info small {
    color: var(--cp-muted);
    font-size: 12px;
}
.cp-measures-preview {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.cp-measure-pill {
    padding: 2px 9px;
    background: #f1f4f8;
    color: #364d66;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.cp-enforcement-money {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.cp-enforcement-money span:first-child {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--cp-navy);
}

/* Enforcement Full Page Layout */
.cp-enforcement-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}
.cp-enforcement-kpi-card {
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    padding: 22px;
    position: relative;
    box-shadow: var(--cp-shadow-sm);
}
.cp-enforcement-kpi-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #f5f8fc;
    color: var(--cp-navy);
}
.cp-kpi-collected .cp-enforcement-kpi-icon { background: #e8f7f2; color: var(--cp-emerald); }
.cp-kpi-remaining .cp-enforcement-kpi-icon { background: #fdf8eb; color: var(--cp-amber); }
.cp-kpi-rate .cp-enforcement-kpi-icon { background: #f3ebfc; color: #5a2e99; }

.cp-enforcement-kpi-card small {
    font-size: 12px;
    color: var(--cp-muted);
    font-weight: 600;
}
.cp-enforcement-kpi-card strong {
    display: block;
    font-family: var(--cp-font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--cp-navy);
    margin: 6px 0 8px;
}
.cp-enforcement-kpi-card span {
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-kpi-rate .cp-progress-track {
    margin: 10px 0 0;
}

/* Executions Cards Grid */
.cp-executions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
    gap: 22px;
}
.cp-execution-card {
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--cp-gold);
}
.cp-execution-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}
.cp-execution-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.cp-execution-no {
    font-family: monospace;
    font-weight: 700;
    color: var(--cp-muted);
    font-size: 13px;
}
.cp-execution-title {
    font-size: 18px;
    margin: 0;
}
.cp-execution-symbol {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #faf4e6;
    color: var(--cp-gold-dark);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-execution-court-bar {
    font-size: 12px;
    color: var(--cp-muted);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cp-line-soft);
    margin-bottom: 16px;
}
.cp-execution-financials-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}
.cp-execution-financials-labels small {
    display: block;
    font-size: 11px;
    color: var(--cp-muted);
}
.cp-execution-financials-labels strong {
    font-size: 14px;
    color: var(--cp-navy);
}
.cp-text-success { color: var(--cp-emerald) !important; }
.cp-text-muted { color: #64748b !important; }
.cp-text-warning { color: var(--cp-amber) !important; }

/* Decisions Milestones */
.cp-decisions-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    margin-bottom: 16px;
}
.cp-decision-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cp-decision-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--cp-muted);
}
.cp-decision-item.is-active .cp-decision-badge {
    color: var(--cp-navy);
}
.cp-decision-item small {
    font-size: 11px;
    color: var(--cp-muted-light);
}
.cp-decision-item.is-active small {
    color: var(--cp-emerald);
    font-weight: 600;
}

.cp-measures-container {
    margin-bottom: 20px;
}
.cp-measures-caption {
    display: block;
    font-size: 11.5px;
    color: var(--cp-muted);
    font-weight: 600;
    margin-bottom: 8px;
}
.cp-measures-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cp-execution-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cp-line-soft);
}

/* Execution Detail Workspace */
.cp-execution-detail-card {
    border-top: 4px solid var(--cp-navy);
}
.cp-enforcement-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0 16px;
}
.cp-detail-kpi {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
}
.cp-detail-kpi small {
    font-size: 12px;
    color: var(--cp-muted);
}
.cp-detail-kpi strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--cp-navy);
    margin-top: 4px;
}
.cp-deed-info-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--cp-line-soft);
    margin-top: 16px;
}
.cp-deed-info-row small {
    display: block;
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-deed-info-row strong {
    font-size: 14px;
    color: var(--cp-navy);
}

.cp-decisions-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-inline-start: 16px;
}
.cp-decisions-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    right: 32px;
    width: 2px;
    background: var(--cp-line);
}
.cp-timeline-node {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    position: relative;
}
.cp-timeline-marker {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    color: var(--cp-muted);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    z-index: 1;
}
.cp-timeline-node.is-complete .cp-timeline-marker {
    background: var(--cp-emerald);
    border-color: var(--cp-emerald);
    color: #fff;
    box-shadow: 0 0 0 4px #c6f0e3;
}
.cp-timeline-content {
    flex: 1;
    background: #fbfcfe;
    border: 1px solid var(--cp-line);
    border-radius: 14px;
    padding: 16px 20px;
}
.cp-timeline-content h3 {
    font-size: 15.5px;
    margin: 0 0 6px;
}
.cp-timeline-content p {
    font-size: 13px;
    color: var(--cp-muted);
    margin-bottom: 10px;
}
.cp-date-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f7f2;
    color: var(--cp-emerald);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
}
.cp-pending-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    color: var(--cp-muted);
    border-radius: 6px;
    font-size: 11.5px;
}
.cp-measures-box {
    margin-top: 22px;
    padding: 18px 20px;
    background: #fdfaf3;
    border: 1px solid #ebdcb8;
    border-radius: 14px;
}
.cp-measures-box h3 {
    font-size: 14.5px;
    margin: 0 0 10px;
    color: var(--cp-gold-dark);
}
.cp-measure-active {
    background: #fff !important;
    border: 1px solid #dfc793 !important;
    color: #7b591b !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
}

/* Payments Table */
.cp-payments-table-wrap {
    overflow-x: auto;
}
.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.cp-table th {
    background: #f8fafc;
    color: var(--cp-muted);
    text-align: right;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 12px;
    border-bottom: 1px solid var(--cp-line);
}
.cp-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--cp-line-soft);
}

/* --------------------------------------------------------------------------
   POWER OF ATTORNEY (الوكالات الشرعية)
   -------------------------------------------------------------------------- */
.cp-poas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
    gap: 24px;
}
.cp-poa-deed-card {
    background: #ffffff;
    border: 1px solid var(--cp-gold-border);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
}
.cp-poa-deed-card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 15px;
    pointer-events: none;
}
.cp-poa-deed-card.cp-poa-expired {
    border-color: var(--cp-rose-border);
}
.cp-poa-deed-card.cp-poa-expired::before {
    border-color: rgba(190, 50, 50, 0.2);
}

.cp-deed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-deed-seal {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cp-gold-dark);
    font-weight: 800;
    font-size: 14px;
}
.cp-deed-seal svg {
    width: 24px;
    height: 24px;
}
.cp-poa-expired .cp-deed-seal {
    color: var(--cp-rose);
}

.cp-deed-number-box {
    background: #faf8f3;
    border: 1px solid var(--cp-gold-border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-deed-number-box small {
    display: block;
    font-size: 11px;
    color: var(--cp-muted);
}
.cp-deed-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}
.cp-deed-number {
    font-size: 18px;
    font-family: monospace;
    font-weight: 800;
    color: var(--cp-navy);
    letter-spacing: 1px;
}
.cp-copy-btn {
    min-height: 34px !important;
    padding: 4px 12px !important;
    font-size: 11.5px !important;
    background: #fff !important;
}

.cp-deed-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-deed-dates-grid small {
    display: block;
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-deed-dates-grid strong {
    font-size: 14px;
    color: var(--cp-navy);
}

.cp-deed-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px dashed var(--cp-line);
    border-bottom: 1px dashed var(--cp-line);
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-deed-parties small {
    display: block;
    font-size: 11px;
    color: var(--cp-muted);
}
.cp-deed-parties strong {
    font-size: 13.5px;
}

/* Privileges Matrix */
.cp-deed-matrix {
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-matrix-caption {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cp-navy);
    margin-bottom: 10px;
}
.cp-matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.cp-matrix-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 600;
}
.cp-matrix-item.is-granted {
    background: #edf8f4;
    color: #0b5545;
}
.cp-matrix-item.is-denied {
    background: #f8fafc;
    color: #94a3b8;
    text-decoration: line-through;
}
.cp-matrix-check {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}
.is-granted .cp-matrix-check {
    background: var(--cp-emerald);
    color: #fff;
}
.is-denied .cp-matrix-check {
    background: #cbd5e1;
    color: #fff;
}
.cp-matrix-check svg {
    width: 11px;
    height: 11px;
}

.cp-deed-scope {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.cp-deed-scope small {
    display: block;
    font-size: 11px;
    color: var(--cp-muted);
    font-weight: 700;
    margin-bottom: 4px;
}
.cp-deed-scope p {
    font-size: 12px;
    color: var(--cp-ink);
    margin: 0;
    line-height: 1.7;
}

.cp-deed-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

/* Najiz Renewal Guide */
.cp-najiz-guide-card {
    background: linear-gradient(135deg, #fafbfc, #f1f5fa);
    border: 1px solid var(--cp-line);
    margin-top: 32px;
}
.cp-najiz-guide-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}
.cp-najiz-guide-header svg {
    width: 38px;
    height: 38px;
    color: var(--cp-gold-dark);
}
.cp-najiz-guide-header h2 {
    font-size: 19px;
    margin: 0 0 3px;
}
.cp-najiz-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.cp-step-item {
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 14px;
    padding: 20px 18px;
    position: relative;
    box-shadow: var(--cp-shadow-sm);
}
.cp-step-num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--cp-navy);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 12px;
}
.cp-step-item strong {
    display: block;
    font-size: 14px;
    color: var(--cp-navy);
    margin-bottom: 6px;
}
.cp-step-item p {
    font-size: 12px;
    color: var(--cp-muted);
    margin: 0;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   CASES & SESSIONS
   -------------------------------------------------------------------------- */
.cp-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 22px;
}
.cp-case {
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--cp-navy);
}
.cp-case-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cp-file-symbol {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef4fb;
    color: var(--cp-navy);
}
.cp-case h2 {
    font-size: 17px;
    line-height: 1.6;
    margin: 0 0 10px;
}
.cp-case p {
    font-size: 13px;
    color: var(--cp-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}
.cp-case-court-tag {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cp-line-soft);
    margin-bottom: 14px;
    color: var(--cp-muted);
    font-size: 12px;
}
.cp-case-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--cp-navy);
}
.cp-case-link:hover {
    color: var(--cp-gold-dark);
}

/* Case Detail */
.cp-case-detail-card {
    border-top: 4px solid var(--cp-navy);
}
.cp-case-detail-header h2 {
    font-size: 24px;
    margin: 8px 0 0;
}
.cp-case-detail-meta {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
}
.cp-meta-pill small {
    display: block;
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-meta-pill strong {
    font-size: 14.5px;
    color: var(--cp-navy);
}
.cp-case-body h3 {
    font-size: 16px;
    margin: 0 0 10px;
}

/* Sessions List & Rows */
.cp-session-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px !important;
}
.cp-session-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--cp-line-soft);
}
.cp-session-row:last-child {
    border-bottom: 0;
}
.cp-session-symbol {
    display: grid;
    place-items: center;
    width: 58px;
    height: 64px;
    border-radius: 14px;
    background: #fcf6eb;
    border: 1px solid #ebd9b8;
    color: var(--cp-gold-dark);
    flex-shrink: 0;
}
.cp-session-copy {
    flex: 1;
    min-width: 0;
}
.cp-session-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.cp-time-tag {
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-session-copy h2, .cp-session-copy h3 {
    font-size: 16px;
    margin: 0 0 4px;
}
.cp-session-case-link {
    font-size: 12.5px;
    color: var(--cp-muted);
    margin: 0 0 6px;
}
.cp-session-notes {
    font-size: 13px;
    color: var(--cp-ink);
    margin: 0;
}

/* Session Spotlight on Home */
.cp-session-spotlight {
    background: linear-gradient(135deg, #10243d, #1c3b63);
    color: #fff;
    border: 1px solid #2e537d;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(12, 27, 48, 0.12);
}
.cp-spotlight-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.cp-session-spotlight .cp-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cp-gold-light);
}
.cp-spotlight-status {
    background: rgba(197, 160, 89, 0.25);
    border: 1px solid var(--cp-gold);
    color: var(--cp-gold-light);
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.cp-session-spotlight h2 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 12px;
}
.cp-spotlight-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2ecf7;
    font-size: 14px;
    margin-bottom: 8px;
}
.cp-spotlight-time-icon {
    color: var(--cp-gold-light);
}
.cp-spotlight-court {
    font-size: 12.5px;
    color: #b0c9e5;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   DOCUMENTS & VAULT
   -------------------------------------------------------------------------- */
.cp-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
}
.cp-document-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
}
.cp-document-cover {
    height: 130px;
    background: #f1f5fa;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border: 1px solid var(--cp-line);
}
.cp-document-sheet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 58px;
    height: 74px;
    background: #fff;
    border: 1px solid #d1dbe7;
    border-radius: 6px 14px 6px 6px;
    box-shadow: 0 6px 14px rgba(12, 27, 48, 0.08);
    color: #55708f;
    transform: rotate(-3deg);
}
.cp-document-sheet b {
    font-family: monospace;
    font-size: 10px;
    color: var(--cp-gold-dark);
}
.cp-document-card h2 {
    font-size: 14.5px;
    margin: 8px 0 4px;
    line-height: 1.5;
}
.cp-document-card .cp-muted {
    font-size: 12px;
    margin-bottom: 14px;
}
.cp-document-card .cp-actions {
    margin-top: auto;
    border-top: 1px solid var(--cp-line-soft);
    padding-top: 12px;
    gap: 6px;
}

.cp-document-workspace {
    padding: 24px !important;
}
.cp-document-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cp-line);
}
.cp-document-toolbar h2 {
    font-size: 20px;
    margin: 6px 0 0;
}
.cp-document-frame {
    width: 100%;
    height: 78vh;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    background: #fff;
}

.cp-document-dialog {
    border: 1px solid var(--cp-line);
    border-radius: 18px;
    padding: 0;
    width: min(92vw, 1100px);
    height: 85vh;
    box-shadow: var(--cp-shadow-lg);
    background: #fff;
}
.cp-document-dialog::backdrop {
    background: rgba(12, 27, 48, 0.55);
    backdrop-filter: blur(4px);
}
.cp-document-dialog-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--cp-line);
    background: #f8fafc;
}
.cp-document-dialog-frame {
    width: 100%;
    height: calc(85vh - 60px);
    border: 0;
}

/* --------------------------------------------------------------------------
   MESSAGES & CONSULTATIONS (المراسلات)
   -------------------------------------------------------------------------- */
.cp-messages-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}
.cp-compose-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.cp-compose-heading h2 {
    font-size: 17px;
    margin: 0;
}
.cp-form {
    display: grid;
    gap: 18px;
}
.cp-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cp-navy);
}
.cp-body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.cp-body select,
.cp-body textarea,
.cpa input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.cpa select,
.cpa textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--cp-ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 14px;
    min-height: 46px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cp-body input:focus, .cp-body select:focus, .cp-body textarea:focus,
.cpa input:focus, .cpa select:focus, .cpa textarea:focus {
    border-color: var(--cp-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
    outline: none;
}
.cp-body textarea, .cpa textarea {
    resize: vertical;
    line-height: 1.8;
}

.cp-messages-list {
    display: flex;
    flex-direction: column;
}
.cp-message-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--cp-line-soft);
}
.cp-message-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.cp-message-row h3 {
    font-size: 15px;
    margin: 0 0 4px;
}
.cp-message-row p {
    font-size: 12.5px;
    color: var(--cp-muted);
    margin: 0;
}

/* Conversation Thread */
.cp-thread {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
}
.cp-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: var(--cp-shadow-sm);
}
.cp-message.is-client {
    margin-inline-start: auto;
    background: #eef5fc;
    border: 1px solid #d5e5f5;
}
.cp-message.is-team {
    margin-inline-end: auto;
    background: #ffffff;
    border: 1px solid var(--cp-line);
    border-inline-start: 4px solid var(--cp-gold);
}
.cp-message-sender-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 11.5px;
    color: var(--cp-muted);
    margin-bottom: 6px;
}
.cp-message-bubble p {
    font-size: 13.5px;
    margin: 0;
    line-height: 1.8;
}

/* --------------------------------------------------------------------------
   PROFILE & SECURITY
   -------------------------------------------------------------------------- */
.cp-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.cp-profile-grid .cp-item {
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cp-profile-grid .cp-item small {
    font-size: 11.5px;
    color: var(--cp-muted);
}
.cp-profile-grid .cp-item strong {
    font-size: 14.5px;
    color: var(--cp-navy);
}

.cp-security-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.cp-security-workspace > section:last-child {
    grid-column: 1 / -1;
}
.cp-email-display {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}
.cp-account-email summary {
    cursor: pointer;
    margin-top: 10px;
}
.cp-email-form {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.cp-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cp-session-device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
}
.cp-danger-text {
    color: var(--cp-rose) !important;
}

/* --------------------------------------------------------------------------
   GUEST & AUTHENTICATION SCREENS (LOGIN, FORGOT, TOKEN)
   -------------------------------------------------------------------------- */
.cp-guest {
    background: radial-gradient(ellipse at 15% 25%, #e8eff8 0%, #f4f6f9 65%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.cp-guest .cp-header {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}
.cp-guest .cp-app-shell {
    grid-template-columns: 1.15fr 1fr;
    max-width: 1080px;
    background: #ffffff;
    border-radius: 28px;
    padding: 0;
    margin: 20px auto 40px;
    box-shadow: 0 20px 60px rgba(12, 27, 48, 0.12);
    border: 1px solid #e1e8f0;
    overflow: hidden;
    min-height: 580px;
}
.cp-welcome {
    background: linear-gradient(150deg, #09172b, #152b47, #1f3d64);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.cp-welcome::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    left: -120px;
    bottom: -120px;
}
.cp-welcome-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: #fff;
    border: 3px solid var(--cp-gold);
    padding: 6px;
    margin: 20px 0;
}
.cp-welcome h2 {
    color: #fff;
    font-size: 36px;
    line-height: 1.45;
    margin: 0 0 16px;
}
.cp-welcome p {
    color: #c0d1e5;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 28px;
}
.cp-welcome-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 13.5px;
}
.cp-welcome-features span {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cp-welcome-features svg {
    color: var(--cp-gold-light);
}
.cp-welcome small {
    margin-top: auto;
    padding-top: 24px;
    color: #8da4c0;
    font-size: 11.5px;
}

.cp-auth-form {
    padding: 48px 44px;
    border: 0;
    box-shadow: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cp-auth-header h2 {
    font-size: 24px;
    margin: 0 0 6px;
}
.cp-auth-links {
    display: flex;
    justify-content: flex-end;
    font-size: 12.5px;
    color: var(--cp-navy);
    font-weight: 600;
}
.cp-auth-note {
    font-size: 12px;
    color: var(--cp-muted);
    text-align: center;
    margin-top: 14px;
    border-top: 1px solid var(--cp-line-soft);
    padding-top: 14px;
}

/* --------------------------------------------------------------------------
   MOBILE NATIVE APP BOTTOM DOCK & TOUCH DRAWER
   -------------------------------------------------------------------------- */
.cp-mobile-nav {
    display: none;
}

@media (min-width: 901px) {
    .cp-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

@media (max-width: 900px) {
    .cp-body.cp-signed-in {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .cp-header-inner {
        padding: 10px 16px;
    }

    .cp-menu-toggle {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .cp-app-shell {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }

    .cp-main {
        padding: 16px;
    }

    /* Off-canvas Navigation Drawer */
    .cp-nav {
        display: none;
        position: fixed;
        top: 76px;
        right: 0;
        bottom: 0;
        width: min(86vw, 320px);
        height: auto;
        max-height: none;
        z-index: 50;
        background: #ffffff;
        border-radius: 0 0 0 20px;
        border-left: 1px solid var(--cp-line, #e2e8f0);
        box-shadow: -10px 0 40px rgba(12, 27, 48, 0.2);
        padding: 20px 16px;
        overflow-y: auto;
    }
    .cp-navigation-open .cp-nav {
        display: flex;
        animation: cpDrawerIn 0.22s ease-out;
    }
    @keyframes cpDrawerIn {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }

    /* Floating Native Mobile Dock - Strict Equal-Width Responsive Grid */
    .cp-mobile-nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        width: 100%;
        max-width: 100%;
        position: fixed;
        z-index: 45;
        right: 0;
        left: 0;
        bottom: 0;
        margin: 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--cp-line);
        box-shadow: 0 -4px 20px rgba(12, 27, 48, 0.08);
        overflow: hidden;
    }
    .cp-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .cp-mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 4px 1px;
        border-radius: 10px;
        color: #64748b;
        font-size: 10px;
        font-weight: 700;
        gap: 3px;
        position: relative;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        transition: all 0.16s ease;
    }
    .cp-mobile-nav a svg {
        width: 19px;
        height: 19px;
        color: #64748b;
        flex-shrink: 0;
    }
    .cp-mobile-nav a.active {
        background: #0c1b30;
        color: #ffffff;
        font-weight: 700;
        box-shadow: 0 3px 10px rgba(12, 27, 48, 0.2);
    }
    .cp-mobile-nav a.active svg {
        color: var(--cp-gold-light);
    }
    .cp-mobile-nav .cp-nav-badge {
        position: absolute;
        top: 2px;
        left: 50%;
        margin-left: 6px;
        min-width: 15px;
        height: 15px;
        padding: 0 3px;
        border: 2px solid #fff;
        font-size: 8.5px;
        line-height: 11px;
        border-radius: 10px;
        background: #dc2626;
        color: #fff;
        font-weight: 800;
    }
    .cp-mobile-nav a.active .cp-nav-badge {
        border-color: #0c1b30;
    }

    .cp-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .cp-client-welcome {
        padding: 28px 24px;
    }
    .cp-client-welcome h2 {
        font-size: 24px;
    }
    .cp-welcome-emblem {
        display: none;
    }

    .cp-enforcement-kpis, .cp-najiz-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cp-enforcement-overview-bar {
        grid-template-columns: 1fr 1fr;
    }
    .cp-enforcement-rate-badge {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .cp-header-inner {
        padding: 10px 16px;
        height: 68px;
    }
    .cp-brand-name {
        font-size: 15px;
    }
    .cp-brand-sub {
        display: none;
    }
    .cp-install-label {
        display: none;
    }

    .cp-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cp-enforcement-kpis, .cp-najiz-steps-grid {
        grid-template-columns: 1fr;
    }

    .cp-poas-grid, .cp-executions-grid {
        grid-template-columns: 1fr;
    }

    .cp-alert-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }
    .cp-alert-actions {
        width: 100%;
        margin-top: 10px;
    }
    .cp-alert-actions .cp-button, .cp-alert-actions .cp-quiet {
        flex: 1;
    }

    .cp-messages-workspace, .cp-security-workspace {
        grid-template-columns: 1fr;
    }

    .cp-guest .cp-app-shell {
        grid-template-columns: 1fr;
        margin: 10px;
        border-radius: 18px;
    }
    .cp-welcome {
        padding: 32px 24px;
    }
    .cp-welcome h2 {
        font-size: 26px;
    }
    .cp-auth-form {
        padding: 32px 24px;
    }
}

/* Footer */
.cp-footer {
    margin-top: auto;
    padding: 32px 0 10px;
    border-top: 1px solid var(--cp-line, #e2e8f0);
    background: transparent;
    color: var(--cp-muted);
    font-size: 12px;
}
.cp-footer-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   SCOPED ADMINISTRATION & COCKPIT SYSTEM (.cpa & .cp-admin-*)
   Harmonized with OfficeUI design system tokens and archetypes
   -------------------------------------------------------------------------- */
.cpa {
    font-family: 'Tajawal', sans-serif;
    color: var(--cp-ink, #1e293b);
    line-height: 1.7;
    width: 100%;
}

.cpa * {
    box-sizing: border-box;
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.cpa .cp-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--cp-navy, #1B365D);
    color: #fff !important;
    border: 1px solid var(--cp-navy, #1B365D);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(27, 54, 93, 0.15);
}
.cpa .cp-btn-primary:hover {
    background: #142846;
    border-color: #142846;
    box-shadow: 0 4px 12px rgba(27, 54, 93, 0.25);
    transform: translateY(-1px);
    color: #fff !important;
}

.cpa .cp-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--cp-navy, #1B365D) !important;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cpa .cp-btn-secondary:hover {
    background: #eef3f8;
    border-color: var(--cp-navy, #1B365D);
    color: var(--cp-navy, #1B365D) !important;
    transform: translateY(-1px);
}

.cpa .cp-btn-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef9ee, #fdf2dc);
    color: #92400e !important;
    border: 1px solid #fde68a;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cpa .cp-btn-preview:hover {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #d97706;
    color: #78350f !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

.cpa .cp-btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    color: #ef4444 !important;
    border: 1px solid #fca5a5;
    font-weight: 700;
    font-size: 0.84rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cpa .cp-btn-danger-outline:hover {
    background: #ef4444;
    color: #fff !important;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.cpa .cp-btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
    border-radius: 9px;
}

.cpa .cp-btn-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    cursor: not-allowed;
}

.cpa .cp-btn-icon-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cpa .cp-btn-icon-copy:hover {
    background: #e2e8f0;
    color: var(--cp-navy, #1B365D);
}
.cpa .cp-btn-icon-copy.copied {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

/* ==========================================================================
   STATUS BADGES & INDICATORS
   ========================================================================== */
.cpa .cp-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.cpa .badge-active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.cpa .badge-disabled {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.cpa .badge-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cpa .badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cpa .cp-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.cpa .badge-active .cp-badge-dot {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cpa .cp-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    font-size: 0.78rem;
    font-weight: 600;
}
.cpa .cp-id-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

/* ==========================================================================
   ALERTS & NOTICES
   ========================================================================== */
.cpa .cp-notice-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    color: #166534;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.cpa .cp-notice-banner svg {
    color: #16a34a;
    flex-shrink: 0;
}

.cpa .cp-created-account-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #86efac;
    border-radius: 16px;
    margin-bottom: 22px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    flex-wrap: wrap;
}
.cpa .cp-created-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #10b981;
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cpa .cp-created-content strong {
    display: block;
    color: #065f46;
    font-size: 1.05rem;
    font-weight: 800;
}
.cpa .cp-created-content p {
    margin: 2px 0 0;
    color: #047857;
    font-size: 0.88rem;
}
.cpa .cp-created-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   ADMIN HUB TOP NAVIGATION & SPACING
   ========================================================================== */
.cp-admin-hub .stg-top-nav {
    margin-bottom: 22px;
}
.cp-admin-hub-content {
    min-height: 400px;
}
.cp-admin-hub .uph-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cp-admin-hub .uph-actions .cp-btn-secondary,
.cp-admin-hub .uph-actions .cp-btn-preview {
    font-size: 0.82rem;
    padding: 7px 14px;
}

/* ==========================================================================
   KPI SUMMARY CARDS (.cp-membership-stats & .cp-admin-kpis)
   ========================================================================== */
.cpa .cp-membership-stats,
.cpa .cp-admin-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.cpa .cp-membership-stat,
.cpa .cp-admin-kpis article {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--cp-line, #e2e8f0);
    border-radius: 16px;
    box-shadow: var(--cp-shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    transition: all 0.2s ease;
}
.cpa .cp-membership-stat:hover,
.cpa .cp-admin-kpis article:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.cpa .cp-stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cpa .stat-icon-navy { background: #eef3f8; color: var(--cp-navy, #1B365D); }
.cpa .stat-icon-green { background: #ecfdf5; color: #10b981; }
.cpa .stat-icon-gold { background: #fef9ee; color: #b45309; }
.cpa .stat-icon-red { background: #fef2f2; color: #ef4444; }

.cpa .cp-membership-stat strong,
.cpa .cp-admin-kpis strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--cp-navy, #1B365D);
}
.cpa .cp-membership-stat span,
.cpa .cp-admin-kpis span {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

/* ==========================================================================
   TOOLBARS & SEARCH (Listings)
   ========================================================================== */
.cpa .cp-membership-toolbar-wrap {
    background: #fff;
    border: 1px solid var(--cp-line, #e2e8f0);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 22px;
    box-shadow: var(--cp-shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cpa .cp-membership-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    flex-wrap: wrap;
}

.cpa .cp-inbox-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--cp-line, #e2e8f0);
    border-radius: 16px;
    margin-bottom: 22px;
    box-shadow: var(--cp-shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    flex-wrap: wrap;
}

.cpa .cp-toolbar-search-box {
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.cpa .cp-search-input-wrap {
    position: relative !important;
    flex: 1 1 auto;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}
.cpa .cp-search-icon {
    position: absolute !important;
    right: 16px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}
.cpa .cp-search-input-wrap input,
.cpa .cp-search-input-wrap .cp-search-input,
.cpa .cp-toolbar-search-box input {
    width: 100% !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    padding-right: 50px !important;
    padding-left: 38px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    font-size: 0.88rem !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
    direction: rtl !important;
    text-align: right !important;
    transition: all 0.2s ease !important;
}
.cpa .cp-search-input-wrap input:focus,
.cpa .cp-search-input-wrap .cp-search-input:focus,
.cpa .cp-toolbar-search-box input:focus {
    outline: none !important;
    border-color: var(--cp-navy, #1B365D) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.08) !important;
}
.cpa .cp-toolbar-submit {
    padding: 11px 22px;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 12px;
    flex-shrink: 0;
    cursor: pointer;
}
.cpa .cp-search-clear {
    position: absolute !important;
    left: 12px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    z-index: 3 !important;
    line-height: 1 !important;
}
.cpa .cp-search-clear:hover {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

/* Modern Filter Pills Bar */
.cpa .cp-filter-pills-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.cpa .cp-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.cpa .cp-filter-pill:hover {
    background: #eef3f8;
    border-color: #cbd5e1;
    color: var(--cp-navy, #1B365D);
    transform: translateY(-1px);
}
.cpa .cp-filter-pill.is-active {
    background: var(--cp-navy, #1B365D);
    border-color: var(--cp-navy, #1B365D);
    color: #fff;
    box-shadow: 0 3px 10px rgba(27, 54, 93, 0.2);
}
.cpa .cp-filter-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 800;
    transition: all 0.2s ease;
}
.cpa .cp-filter-pill:hover .cp-filter-counter {
    background: #cbd5e1;
    color: var(--cp-navy, #1B365D);
}
.cpa .cp-filter-pill.is-active .cp-filter-counter {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.cpa .cp-clear-filter-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    margin-inline-start: auto;
    transition: all 0.15s ease;
}
.cpa .cp-clear-filter-link:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.cpa .cp-toolbar-filter-group,
.cpa .cp-inbox-filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cpa .cp-filter-select-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}
.cpa .cp-toolbar-filter-group select,
.cpa .cp-select-filter,
.cpa .cp-select-sm {
    padding: 9px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.86rem;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-weight: 600;
}
.cpa .cp-toolbar-filter-group select:focus,
.cpa .cp-select-filter:focus {
    outline: none;
    border-color: var(--cp-navy, #1B365D);
}

.cpa .cp-clear-filter {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fef2f2;
}
.cpa .cp-clear-filter:hover {
    background: #fee2e2;
}

/* ==========================================================================
   CLIENT CARDS GRID (.cp-membership-grid)
   ========================================================================== */
.cpa .cp-membership-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 12px;
}
.cpa .cp-list-head-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cpa .cp-list-head-info strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin-left: 8px;
}
.cpa .cp-select-all-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}
.cpa .cp-select-all-wrap input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.cpa .cp-select-all-wrap:hover {
    border-color: var(--cp-navy, #1B365D);
    background: #f8fafc;
}
.cpa .cp-select-all-wrap input:checked ~ .cp-checkmark,
.cpa .cp-select-all-wrap input:indeterminate ~ .cp-checkmark {
    background: var(--cp-navy, #1B365D);
    border-color: var(--cp-navy, #1B365D);
}
.cpa .cp-select-all-wrap input:checked ~ .cp-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
.cpa .cp-select-all-wrap input:indeterminate ~ .cp-checkmark::after {
    content: '';
    width: 10px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}
.cpa .cp-select-all-label {
    font-size: 0.85rem;
    font-weight: 700;
}
.cpa .cp-bulk-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cpa .cp-selected-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid #cbd5e1;
}
.cpa .cp-btn-danger-outline.cp-bulk-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1.5px solid #ef4444;
    background: #fff;
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.cpa .cp-btn-danger-outline.cp-bulk-action:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.cpa .cp-count-tag {
    font-size: 0.8rem;
    padding: 3px 9px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.cpa .cp-membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.cpa .cp-client-card {
    background: #fff;
    border: 1px solid var(--cp-line, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--cp-shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cpa .cp-client-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.cpa .cp-client-card.is-enabled {
    border-top: 3px solid var(--cp-gold, #C5A059);
}
.cpa .cp-client-card.is-disabled {
    border-top: 3px solid #cbd5e1;
}

.cpa .cp-client-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}
.cpa .cp-card-top-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cpa .cp-btn-preview-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--cp-navy, #1B365D);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}
.cpa .cp-btn-preview-icon:hover {
    background: var(--cp-navy, #1B365D);
    border-color: var(--cp-navy, #1B365D);
    color: #fff;
    box-shadow: 0 2px 6px rgba(27, 54, 93, 0.2);
}

.cpa .cp-client-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.cpa .cp-client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    flex-shrink: 0;
}
.cpa .cp-client-name-wrap {
    min-width: 0;
    flex: 1;
}
.cpa .cp-client-link {
    text-decoration: none;
}
.cpa .cp-client-link h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}
.cpa .cp-client-link:hover h2 {
    color: var(--cp-gold, #C5A059);
}
.cpa .cp-client-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Enriched Contact Strip */
.cpa .cp-client-contact-strip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}
.cpa .cp-contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cpa .cp-contact-chip svg {
    color: #94a3b8;
    flex-shrink: 0;
}
.cpa .cp-chip-phone {
    direction: ltr;
    text-align: right;
}
.cpa .cp-chip-phone svg {
    color: #10b981;
}
.cpa .cp-chip-login {
    direction: ltr;
    text-align: right;
}
.cpa .cp-chip-login span {
    direction: rtl;
}

.cpa .cp-client-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 16px;
}
.cpa .cp-metric-item strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
}
.cpa .cp-metric-item span {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}
.cpa .cp-metric-item.metric-pending {
    grid-column: span 2;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    margin-top: 4px;
}

.cpa .cp-client-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cpa .cp-client-actions a {
    flex: 1;
}

/* ==========================================================================
   CUSTOM CHECKBOX & SWITCHES
   ========================================================================== */
.cpa .cp-checkbox-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
}
.cpa .cp-checkbox-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.cpa .cp-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: grid;
    place-items: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.cpa .cp-checkbox-custom:hover .cp-checkmark {
    border-color: var(--cp-navy, #1B365D);
}
.cpa .cp-checkbox-custom input:checked ~ .cp-checkmark {
    background: var(--cp-navy, #1B365D);
    border-color: var(--cp-navy, #1B365D);
}
.cpa .cp-checkbox-custom input:checked ~ .cp-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.cpa .cp-switch-container {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 12px 0;
    transition: all 0.2s ease;
}
.cpa .cp-switch-container:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.cpa .cp-switch-container input {
    position: absolute;
    opacity: 0;
}
.cpa .cp-switch-track {
    width: 44px;
    height: 24px;
    border-radius: 24px;
    background: #cbd5e1;
    position: relative;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 2px;
}
.cpa .cp-switch-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    right: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cpa .cp-switch-container input:checked ~ .cp-switch-track {
    background: #10b981;
}
.cpa .cp-switch-container input:checked ~ .cp-switch-track .cp-switch-thumb {
    transform: translateX(-20px);
}
.cpa .cp-switch-label strong {
    display: block;
    color: var(--cp-navy, #1B365D);
    font-size: 0.92rem;
    font-weight: 700;
}
.cpa .cp-switch-label small {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ==========================================================================
   COCKPIT SUB-TAB (.cp-client-portal-summary)
   ========================================================================== */
.cp-client-portal-summary {
    padding: 6px 0;
}

.cp-cockpit-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cp-cockpit-tab-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cp-cockpit-tab-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-cockpit-tab-title h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 3px;
}
.cp-cockpit-tab-title p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

.cp-summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.cp-summary-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    transition: all 0.2s ease;
}
.cp-summary-stat-card:hover {
    border-color: #cbd5e1;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cp-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cp-stat-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}
.cp-stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    line-height: 1.2;
}
.cp-stat-time {
    font-size: 1.05rem;
    direction: ltr;
    text-align: right;
}
.cp-stat-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

.cp-summary-action-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}
.cp-summary-action-panels .cp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cp-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.cp-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    flex-shrink: 0;
}
.cp-icon-green { background: #ecfdf5; color: #10b981; }
.cp-icon-red { background: #fef2f2; color: #ef4444; }
.cp-icon-gold { background: #fef9ee; color: #b45309; }

.cp-card-head h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 3px;
}
.cp-card-head p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

.cp-toggle-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.cp-disabled-reason-note {
    font-size: 0.8rem;
    color: #ef4444;
}

.cp-empty-account-state {
    text-align: center;
    padding: 24px 16px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
}
.cp-empty-account-state svg {
    color: #94a3b8;
    margin-bottom: 8px;
}
.cp-empty-account-state strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}
.cp-empty-account-state p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 14px;
}

.cp-account-detail-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cp-account-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}
.cp-field-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
}
.cp-field-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
}
.cp-email-with-copy {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-email-value {
    font-family: monospace;
    font-size: 0.88rem;
}

.cp-account-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cp-cockpit-tab-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.84rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 12px;
}
.cp-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-footer-link {
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
    text-decoration: none;
    transition: color 0.15s ease;
}
.cp-footer-link:hover {
    color: var(--cp-gold, #C5A059);
}

/* ==========================================================================
   PORTAL SETTINGS VIEW (.cp-access-page)
   ========================================================================== */
.cp-status-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 22px;
    box-shadow: var(--cp-shadow-sm);
    flex-wrap: wrap;
}
.cp-status-strip.is-open {
    border-right: 4px solid #10b981;
}
.cp-status-strip.is-closed {
    border-right: 4px solid #ef4444;
}

.cp-status-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-status-strip.is-open .cp-status-icon-wrap {
    background: #ecfdf5;
    color: #10b981;
}
.cp-status-strip.is-closed .cp-status-icon-wrap {
    background: #fef2f2;
    color: #ef4444;
}

.cp-status-main {
    flex: 1;
}
.cp-status-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    display: block;
}
.cp-status-main strong {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    display: block;
    margin: 1px 0 3px;
}
.cp-status-main small {
    color: #64748b;
    font-size: 0.84rem;
}

.cp-status-rules {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cp-rule-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}
.cp-rule-pill svg {
    color: #10b981;
}

.cp-settings-panel {
    background: #fff;
    border: 1px solid var(--cp-line, #e2e8f0);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--cp-shadow-sm);
}

.cp-panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.cp-panel-heading h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 3px;
}
.cp-panel-heading p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

.cp-base-url-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.cp-base-url-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cp-auto-badge {
    padding: 3px 9px;
    border-radius: 6px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    font-size: 0.76rem;
    font-weight: 700;
}

.cp-modules-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.cp-module-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.cp-module-toggle-card:hover {
    border-color: #cbd5e1;
    background: #fff;
}
.cp-module-toggle-card.is-selected {
    background: #fff;
    border-color: var(--cp-navy, #1B365D);
    box-shadow: 0 2px 8px rgba(27, 54, 93, 0.08);
}
.cp-module-toggle-card input {
    position: absolute;
    opacity: 0;
}
.cp-module-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-module-toggle-card.is-selected .cp-module-card-icon {
    background: var(--cp-navy, #1B365D);
    color: #fff;
}
.cp-module-card-text {
    flex: 1;
}
.cp-module-card-text strong {
    display: block;
    font-size: 0.92rem;
    color: var(--cp-navy, #1B365D);
    margin-bottom: 3px;
}
.cp-module-card-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.cp-module-card-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-module-toggle-card.is-selected .cp-module-card-check {
    background: var(--cp-navy, #1B365D);
    border-color: var(--cp-navy, #1B365D);
}
.cp-module-toggle-card.is-selected .cp-module-card-check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.cp-settings-save-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1.5px solid #cbd5e1;
}
.cp-settings-save-panel .cp-form-group {
    flex: 1 1 340px;
    margin: 0;
}
.cp-save-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.cp-muted-note {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   PORTAL INBOX & MESSAGES VIEW (.cp-inbox-page)
   ========================================================================== */
.cp-inbox-hero-stat strong {
    font-size: 1.1rem;
    font-weight: 800;
}

.cp-mail-health {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: var(--cp-shadow-sm);
    flex-wrap: wrap;
}
.cp-mail-health.is-ready {
    border-right: 4px solid #10b981;
}
.cp-mail-health.is-warning {
    border-right: 4px solid #f59e0b;
}
.cp-mail-health-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-mail-health.is-ready .cp-mail-health-icon {
    background: #ecfdf5;
    color: #10b981;
}
.cp-mail-health.is-warning .cp-mail-health-icon {
    background: #fffbeb;
    color: #f59e0b;
}
.cp-mail-health-content {
    flex: 1;
}
.cp-mail-health-content strong {
    display: block;
    font-size: 0.92rem;
    color: var(--cp-navy, #1B365D);
}
.cp-mail-health-content p {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

/* Status Filter Tabs (Fixed & Beautiful) */
.cp-inbox-statuses {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: var(--cp-shadow-sm);
    overflow-x: auto;
}
.cp-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #64748b;
    font-weight: 700;
    font-size: 0.86rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.cp-status-pill:hover {
    background: #f1f5f9;
    color: var(--cp-navy, #1B365D);
}
.cp-status-pill.active {
    background: var(--cp-navy, #1B365D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(27, 54, 93, 0.18);
}
.cp-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
}
.cp-status-pill.active .cp-pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.cp-pill-count.count-warn {
    background: #fef2f2;
    color: #ef4444;
}
.cp-status-pill.active .cp-pill-count.count-warn {
    background: #ef4444;
    color: #fff;
}

/* Conversations List & Chat Bubbles */
.cp-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cp-inbox-conversation {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--cp-shadow-sm);
    transition: all 0.2s ease;
}
.cp-inbox-conversation:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.cp-inbox-conversation.is-unread {
    border-right: 4px solid #f59e0b;
}

.cp-inbox-summary-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.cp-inbox-summary-row::-webkit-details-marker {
    display: none;
}
.cp-inbox-client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 800;
    flex-shrink: 0;
}
.cp-inbox-summary-main {
    flex: 1;
    min-width: 0;
}
.cp-inbox-client-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.cp-client-name-link {
    text-decoration: none;
    color: var(--cp-navy, #1B365D);
    font-weight: 800;
    font-size: 0.95rem;
}
.cp-client-name-link:hover {
    color: var(--cp-gold, #C5A059);
}
.cp-client-email-pill {
    font-size: 0.76rem;
    padding: 1px 7px;
    border-radius: 5px;
    background: #f1f5f9;
    color: #64748b;
    font-family: monospace;
}
.cp-conversation-subject {
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    margin: 2px 0 4px;
}
.cp-conversation-time {
    font-size: 0.78rem;
    color: #94a3b8;
}

.cp-inbox-summary-side {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cp-attention-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.cp-expand-icon {
    color: #94a3b8;
    transition: transform 0.2s ease;
}
.cp-inbox-conversation[open] .cp-expand-icon {
    transform: rotate(180deg);
}

.cp-inbox-detail {
    padding: 0 22px 22px;
    border-top: 1px solid #f1f5f9;
    background: #fcfdfe;
}
.cp-inbox-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.cp-team-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}
.cp-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.6;
}
.cp-message.is-client {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.cp-message.is-team {
    align-self: flex-end;
    background: #eef3f8;
    border: 1px solid #cbd5e1;
    color: var(--cp-navy, #1B365D);
}
.cp-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.74rem;
    margin-bottom: 4px;
    color: #64748b;
}
.cp-sender-badge {
    font-weight: 800;
}
.cp-message-body {
    white-space: pre-wrap;
}

.cp-mail-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.cp-mail-alert.is-error { background: #fef2f2; color: #ef4444; border: 1px solid #fca5a5; }
.cp-mail-alert.is-pending { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.cp-mail-alert.is-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.cp-team-reply {
    margin-top: 14px;
}
.cp-inbox-action-bar {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   ACCOUNTS CARDS & DRAWERS (Single Client Admin)
   ========================================================================== */
.cp-admin-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.cp-admin-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--cp-shadow-sm);
}

.cp-account-ready-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cp-ready-box {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}
.cp-ready-box p {
    font-size: 0.86rem;
    color: #475569;
    margin: 0 0 14px;
}
.cp-ready-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cp-admin-section {
    margin-bottom: 28px;
}
.cp-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cp-section-heading h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 2px 0 0;
}
.cp-section-count {
    padding: 3px 10px;
    border-radius: 8px;
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    font-size: 0.8rem;
    font-weight: 700;
}

.cp-account-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cp-account-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--cp-shadow-sm);
}
.cp-account-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.cp-account-head-info {
    flex: 1;
}
.cp-account-head-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 2px;
}
.cp-account-email-tag {
    font-size: 0.82rem;
    color: #64748b;
    font-family: monospace;
}

.cp-account-meta-bar {
    display: flex;
    gap: 24px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cp-meta-metric {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cp-meta-metric span {
    color: #64748b;
}
.cp-meta-metric strong {
    color: var(--cp-navy, #1B365D);
    font-weight: 700;
}

.cp-account-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}
.cp-inline-form {
    margin: 0;
    display: inline-flex;
}
.cp-status-change-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cp-account-drawers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cp-drawer {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.cp-drawer-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
    cursor: pointer;
    user-select: none;
}
.cp-drawer-body {
    padding: 18px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.cp-preferences-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.cp-pref-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
}
.cp-info-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #eef3f8;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #475569;
    margin-top: 10px;
}
.cp-admin-confirm-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.cp-admin-confirm-bar .cp-form-group {
    flex: 1 1 300px;
    margin: 0;
}

/* Published Content List */
.cp-published-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.cp-published-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: var(--cp-shadow-sm, 0 1px 3px rgba(0,0,0,0.04));
    transition: all 0.2s ease;
    gap: 12px;
}
.cp-published-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.cp-published-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.cp-pub-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.cp-pub-icon.type-case {
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
}
.cp-pub-icon.type-session {
    background: #fef9ee;
    color: #b45309;
}
.cp-pub-icon.type-doc {
    background: #ecfdf5;
    color: #059669;
}
.cp-pub-icon.type-update {
    background: #f0fdf4;
    color: #15803d;
}
.cp-pub-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.cp-pub-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cp-pub-title-row strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.cp-pub-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}
.cp-pub-type-badge.type-case {
    background: #eef3f8;
    color: var(--cp-navy, #1B365D);
    border: 1px solid #cbd5e1;
}
.cp-pub-type-badge.type-session {
    background: #fef9ee;
    color: #b45309;
    border: 1px solid #fde68a;
}
.cp-pub-type-badge.type-doc {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.cp-pub-type-badge.type-update {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Publishing Panels */
.cp-publishing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.cp-publish-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.cp-publish-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cp-navy, #1B365D);
    cursor: pointer;
    user-select: none;
}
.cp-publish-form {
    padding: 18px;
    border-top: 1px solid #e2e8f0;
}

/* Audit Log */
.cp-admin-audit {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.cp-audit-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #475569;
    cursor: pointer;
}
.cp-audit-list {
    padding: 14px 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}
.cp-audit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
}
.cp-audit-time {
    color: #94a3b8;
    font-family: monospace;
}

/* Generic Form Helpers */
.cpa .cp-form-group {
    margin-bottom: 14px;
}
.cpa .cp-form-footer {
    margin-top: 16px;
}
.cpa .cp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.cpa .cp-create-password-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cpa .cp-full-width {
    grid-column: span 2;
}
.cpa .cp-my-2 {
    margin-top: 8px;
    margin-bottom: 8px;
}
.cpa .text-green { color: #059669 !important; }
.cpa .text-gold { color: #d97706 !important; }
.cpa .text-navy { color: var(--cp-navy, #1B365D) !important; }

.cpa .cp-empty-state-card {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    margin-bottom: 22px;
}
.cpa .cp-empty-state-card svg {
    color: #94a3b8;
    margin-bottom: 12px;
}
.cpa .cp-empty-state-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cp-navy, #1B365D);
    margin: 0 0 6px;
}
.cpa .cp-empty-state-card p {
    color: #64748b;
    font-size: 0.88rem;
    margin: 0 0 16px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
    .cpa .cp-membership-stats,
    .cpa .cp-admin-kpis,
    .cp-summary-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cpa .cp-admin-workspace,
    .cp-summary-action-panels,
    .cp-preferences-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cpa .cp-membership-stats,
    .cpa .cp-admin-kpis,
    .cp-summary-stats-grid {
        grid-template-columns: 1fr;
    }
    .cpa .cp-membership-toolbar,
    .cpa .cp-inbox-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .cpa .cp-toolbar-search-box {
        flex: 1 1 100%;
    }
    .cpa .cp-toolbar-filter-group,
    .cpa .cp-inbox-filter-controls {
        flex-wrap: wrap;
    }
    .cpa .cp-grid-2,
    .cpa .cp-create-password-grid {
        grid-template-columns: 1fr;
    }
    .cpa .cp-full-width {
        grid-column: span 1;
    }
}

