/* ============================================================
   Profile Studio V2 — Namespaced Stylesheet
   Classes: .profile-studio-v2 root, .ps-* utilities
   Reusable across: Documents, References, Images, AI Workshop,
   Company Profiles, Post Cards, Review Hub, Visual Branding.
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
    --ps-green: #008C8C;
    --ps-green-dark: #089082;
    --ps-green-soft: #E6F7F5;
    --ps-green-mid: #CCF0EB;
    --ps-bg: #F7F8FA;
    --ps-white: #FFFFFF;
    --ps-text-primary: #1A1D23;
    --ps-text-secondary: #6B7280;
    --ps-text-muted: #9CA3AF;
    --ps-border: #E9ECEF;
    --ps-border-light: #F3F4F6;
    --ps-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --ps-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --ps-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.05);
    --ps-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.06);
    --ps-radius-sm: 10px;
    --ps-radius-md: 16px;
    --ps-radius-lg: 20px;
    --ps-radius-xl: 28px;
    --ps-radius-pill: 0.5rem;
    --ps-gap: 24px;
    --ps-transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    /* Badge colours */
    --ps-badge-blue-bg: #EFF6FF;
    --ps-badge-blue-txt: #2563EB;
    --ps-badge-green-bg: #ECFDF5;
    --ps-badge-green-txt: #059669;
    --ps-badge-purple-bg: #F5F3FF;
    --ps-badge-purple-txt: #7C3AED;
    --ps-badge-gray-bg: #F3F4F6;
    --ps-badge-gray-txt: #6B7280;
    --ps-badge-amber-bg: #FFFBEB;
    --ps-badge-amber-txt: #D97706;
}

/* ── Root wrapper ──────────────────────────────────────── */
.profile-studio-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--ps-gap);
    padding: 8px 4px 40px;
    min-height: 100%;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.ps-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    gap: 16px;
}

.ps-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-self: start;
}

/* ── Header search bar (Google-style rounded pill) ─────────── */
.ps-header-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-self: center;
    width: 560px;
    max-width: 560px;
    margin: 0;
}

    .ps-header-search-wrap i {
        position: absolute;
        left: 20px;
        color: var(--ps-text-muted);
        font-size: 14px;
        pointer-events: none;
    }

.ps-header-search-input.form-control {
    width: 100%;
    padding: 12px 20px 12px 44px;
    border-radius: 999px;
    border: 1px solid var(--ps-border);
    background: var(--ps-white);
    box-shadow: var(--ps-shadow-sm);
    font-size: 14px;
    color: var(--ps-text-primary);
    transition: var(--ps-transition);
}

    .ps-header-search-input.form-control:focus {
        outline: none;
        border-color: var(--ps-green);
        box-shadow: 0 0 0 3px var(--ps-green-soft);
    }

    .ps-header-search-input.form-control::placeholder {
        color: var(--ps-text-muted);
    }

.ps-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--ps-text-primary);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.5px;
}

.ps-subtitle {
    font-size: 15px;
    color: var(--ps-text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.ps-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    justify-self: end;
}

/* ── Primary CTA button ──────────────────────────────────── */
.ps-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ps-green);
    color: #fff !important;
    border: none;
    border-radius: var(--ps-radius-pill);
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.1px;
    transition: var(--ps-transition);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
}

    .ps-btn-primary:hover,
    .ps-btn-primary:focus {
        background: var(--ps-green-dark) !important;
        transform: translateY(-1px);
        color: #fff !important;
    }

    .ps-btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(11, 170, 154, 0.3);
    }

    .ps-btn-primary i {
        font-size: 13px;
    }

/* ── Outline / Change button ─────────────────────────────── */
.ps-change-btn {
    display: block;
    width: 100%;
    border: 1.5px solid var(--ps-green);
    background: transparent;
    color: var(--ps-green) !important;
    border-radius: var(--ps-radius-pill);
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: var(--ps-transition);
    cursor: pointer;
    text-decoration: none !important;
}

    .ps-change-btn:hover {
        background: var(--ps-green-soft);
        border-color: var(--ps-green-dark);
        color: var(--ps-green-dark) !important;
    }

/* ============================================================
   INFO CARDS  (Default Country + Default Parse Profile)
   ============================================================ */
.ps-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ps-gap);
    width: 100%;
}

    /* ── ProfileBuilderHead inner grid override ─────────────────
   ProfileBuilderHead renders <div class="row"> with two
   col-lg-6 children. We strip Bootstrap grid chrome and
   make each column look like a ps-info-card. ── */

    /* Top-level .row from ProfileBuilderHead */
    .ps-info-cards .row {
        display: contents;
        margin: 0 !important;
    }

    /* Each col-lg-6 becomes a white card tile */
    .ps-info-cards .col-lg-6,
    .ps-info-cards .col-md-12,
    .ps-info-cards .col-sm-12 {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: unset !important;
        padding: 0 !important;
        background: var(--ps-white);
        border-radius: var(--ps-radius-lg);
        box-shadow: var(--ps-shadow-md);
        border: 1px solid var(--ps-border-light);
        padding: 24px !important;
        display: flex;
        flex-direction: column;
        gap: 12px;
        transition: var(--ps-transition);
    }

        .ps-info-cards .col-lg-6:hover,
        .ps-info-cards .col-md-12:hover {
            box-shadow: var(--ps-shadow-hover);
            transform: translateY(-2px);
        }

    /* Strip the inner Card component chrome */
    .ps-info-cards .card,
    .ps-info-cards .card-body {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    /* Illustration images — keep them small and icon-like */
    .ps-info-cards .arc-img-100 {
        width: 52px !important;
        height: 52px !important;
        object-fit: contain;
        border-radius: 14px;
        padding: 8px;
        background: var(--ps-green-soft);
    }

    /* Country display in info card */
    .ps-info-cards .country-display {
        background: transparent;
        padding: 0;
        gap: 8px;
    }

    .ps-info-cards .country-display-name {
        font-size: 18px;
        font-weight: 600;
        color: var(--ps-text-primary);
        margin: 0 0 0 0;
    }

    /* Profile title in parse card */
    .ps-info-cards .pr-h6 {
        font-size: 18px;
        font-weight: 600;
        color: var(--ps-text-primary);
    }

    /* Label text under each info card */
    .ps-info-cards h5.text-secondary {
        font-size: 12px;
        font-weight: 500;
        color: var(--ps-text-muted) !important;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        margin: 0 0 0 0;
    }

    /* Change / outline button override inside info cards */
    .ps-info-cards .arc-btn-outline-lightgreen {
        border-radius: var(--ps-radius-pill) !important;
        border-width: 1.5px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        padding: 8px 20px !important;
        transition: var(--ps-transition) !important;
    }

        .ps-info-cards .arc-btn-outline-lightgreen:hover {
            background: var(--ps-green-soft) !important;
        }

    /* Remove extra margin rows inside info cards */
    .ps-info-cards .mt-2 {
        margin-top: 8px !important;
    }

    .ps-info-cards .ps-info-header {
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .ps-info-cards .text-lg-center,
    .ps-info-cards .text-center {
        text-align: left !important;
    }

    .ps-info-cards .m-3 {
        margin: 0 !important;
    }

    .ps-info-cards .mb-3 {
        margin-bottom: 0 !important;
    }

/* Each white card panel */
.ps-info-card {
    background: var(--ps-white);
    border-radius: var(--ps-radius-lg);
    box-shadow: var(--ps-shadow-md);
    border: 1px solid var(--ps-border-light);
    padding: 28px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--ps-transition);
}

    .ps-info-card:hover {
        box-shadow: var(--ps-shadow-hover);
        transform: translateY(-2px);
    }

.ps-info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--ps-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ps-green);
    font-size: 22px;
    flex-shrink: 0;
}

.ps-info-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ps-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0;
}

.ps-info-card-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--ps-text-primary);
    margin: 0;
    line-height: 1.2;
}

.ps-info-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* ============================================================
   PROFILE LIST CONTAINER
   ============================================================ */
.ps-profile-list {
    background: var(--ps-white);
    border-radius: var(--ps-radius-lg);
    box-shadow: var(--ps-shadow-md);
    border: 1px solid var(--ps-border-light);
    overflow: hidden;
}

.ps-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--ps-border-light);
}

.ps-list-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--ps-text-secondary);
    letter-spacing: 0.1px;
}

/* ── Profile search bar ──────────────────────────────────── */
.ps-search-row-outer {
    margin-bottom: 16px;
    background: var(--ps-white);
    border-radius: var(--ps-radius-lg);
    box-shadow: var(--ps-shadow-md);
    border: 1px solid var(--ps-border-light);
    padding: 14px 20px;
    width: 100%;
}

.ps-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 50%;
}

    .ps-search-wrap i {
        position: absolute;
        left: 16px;
        color: var(--ps-text-muted);
        font-size: 14px;
        pointer-events: none;
    }

.ps-search-input.form-control {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border-radius: var(--ps-radius-sm);
    border: 1px solid var(--ps-border);
    background: var(--ps-bg);
    font-size: 14px;
    color: var(--ps-text-primary);
    transition: var(--ps-transition);
}

    .ps-search-input.form-control:focus {
        outline: none;
        border-color: var(--ps-green);
        background: var(--ps-white);
        box-shadow: 0 0 0 3px var(--ps-green-soft);
    }

    .ps-search-input.form-control::placeholder {
        color: var(--ps-text-muted);
    }

/* ── Draggable wrapper reset ─────────────────────────────── */
.ps-draggable-wrapper {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

    /* Override DraggableAccordionCard accordion chrome */
    .ps-draggable-wrapper .accordion,
    .ps-draggable-wrapper .accordion-item,
    .ps-draggable-wrapper .accordion-header,
    .ps-draggable-wrapper .accordion-button {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

        .ps-draggable-wrapper .accordion-button::after {
            display: none !important;
        }

/* ============================================================
   PROFILE ROW
   ============================================================ */
.ps-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 14px 16px;
    border-bottom: 1px solid var(--ps-border-light);
    background: var(--ps-white);
    transition: background 0.15s ease;
    min-height: 76px;
    position: relative;
    cursor: default;
}

    /* Last row — remove the trailing border */
    .ps-profile-row:last-child {
        border-bottom: none;
    }

/* DraggableAccordionCard wraps each row in its own accordion-item.
   Target that wrapper to guarantee the divider line shows. */
.ps-profile-list .accordion-item {
    border-bottom: 1px solid var(--ps-border-light) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

    .ps-profile-list .accordion-item:last-child {
        border-bottom: none !important;
    }


/* ── Drag handle ─────────────────────────────────────────── */
.ps-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
    color: var(--ps-text-muted);
    cursor: grab;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    font-size: 14px;
}

    .ps-drag-handle:hover {
        opacity: 1;
        color: var(--ps-text-secondary);
    }

    .ps-drag-handle:active {
        cursor: grabbing;
    }

/* ── Avatar ──────────────────────────────────────────────── */
.ps-avatar-wrap {
    flex-shrink: 0;
}

.ps-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    border: 2px solid var(--ps-border) !important;
    object-fit: cover;
    padding: 0 !important;
    background: var(--ps-bg);
}

/* ── Main info area ──────────────────────────────────────── */
.ps-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.ps-profile-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ps-profile-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ps-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

    .ps-profile-title:hover {
        color: var(--ps-green);
    }

.ps-profile-meta {
    font-size: 13px;
    color: var(--ps-text-muted);
    line-height: 1.3;
}

/* ── Tag chip ────────────────────────────────────────────── */
.ps-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ps-badge-purple-bg);
    color: var(--ps-badge-purple-txt);
    border-radius: var(--ps-radius-pill);
    padding: 2px 10px 2px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
    flex-shrink: 0;
}

    .ps-tag-chip i {
        font-size: 10px;
    }

/* Live / Draft status variants of the tag chip */
.ps-tag-chip-live {
    background: var(--ps-badge-green-bg);
    color: var(--ps-badge-green-txt);
}

    .ps-tag-chip-live i {
        font-size: 6px;
    }

.ps-tag-chip-draft {
    background: var(--ps-badge-amber-bg);
    color: var(--ps-badge-amber-txt);
}

    .ps-tag-chip-draft i {
        font-size: 6px;
    }

/* ── Sub-group header (e.g. "Draft" divider within the list) ──── */
.ps-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px 10px;
    border-top: 1px solid var(--ps-border-light);
}

.ps-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.ps-group-label {
    font-size: 13px;
    font-weight: 600;
}

.ps-group-count {
    font-size: 13px;
    color: var(--ps-text-muted);
}

/* ── Status pills area ───────────────────────────────────── */
.ps-status-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Generic status pill */
.ps-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--ps-radius-pill);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: var(--ps-transition);
}

    .ps-status-pill i {
        font-size: 10px;
    }

/* Variants */
.ps-pill-default-parsing {
    background: var(--ps-badge-blue-bg);
    color: var(--ps-badge-blue-txt);
}

.ps-pill-default-follow {
    background: var(--ps-badge-green-bg);
    color: var(--ps-badge-green-txt);
}

.ps-pill-empty {
    background: var(--ps-badge-gray-bg);
    color: var(--ps-badge-gray-txt);
}

/* ── Three-dot action menu ───────────────────────────────── */
.ps-action-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

    .ps-action-menu .dropdown-toggle,
    .ps-action-menu [role="button"] {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--ps-text-muted);
        transition: background 0.15s ease, color 0.15s ease;
        cursor: pointer;
    }

        .ps-action-menu [role="button"]:hover {
            background: var(--ps-bg);
            color: var(--ps-text-primary);
        }

/* ============================================================
   BADGES (generic reusable)
   ============================================================ */
.ps-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--ps-radius-pill);
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.ps-badge-blue {
    background: var(--ps-badge-blue-bg);
    color: var(--ps-badge-blue-txt);
}

.ps-badge-green {
    background: var(--ps-badge-green-bg);
    color: var(--ps-badge-green-txt);
}

.ps-badge-purple {
    background: var(--ps-badge-purple-bg);
    color: var(--ps-badge-purple-txt);
}

.ps-badge-gray {
    background: var(--ps-badge-gray-bg);
    color: var(--ps-badge-gray-txt);
}

.ps-badge-amber {
    background: var(--ps-badge-amber-bg);
    color: var(--ps-badge-amber-txt);
}

.ps-badge-red {
    background: #FEF2F2;
    color: #DC2626;
}

/* ============================================================
   REUSABLE CONTENT CONTAINER  (for Documents, References, etc.)
   ============================================================ */
.ps-content-container {
    background: var(--ps-white);
    border-radius: var(--ps-radius-lg);
    box-shadow: var(--ps-shadow-md);
    border: 1px solid var(--ps-border-light);
    padding: var(--ps-gap);
}

/* ============================================================
   CARD LAYOUT  (generic white card used across pages)
   ============================================================ */
.ps-card {
    background: var(--ps-white);
    border-radius: var(--ps-radius-lg);
    box-shadow: var(--ps-shadow-md);
    border: 1px solid var(--ps-border-light);
    padding: var(--ps-gap);
    transition: var(--ps-transition);
}

    .ps-card:hover {
        box-shadow: var(--ps-shadow-hover);
        transform: translateY(-2px);
    }

/* ============================================================
   SPACING UTILITIES  (namespaced, no conflict with Bootstrap)
   ============================================================ */
.ps-mt-sm {
    margin-top: 8px;
}

.ps-mt-md {
    margin-top: 16px;
}

.ps-mt-lg {
    margin-top: 24px;
}

.ps-mb-sm {
    margin-bottom: 8px;
}

.ps-mb-md {
    margin-bottom: 16px;
}

.ps-mb-lg {
    margin-bottom: 24px;
}

.ps-gap-sm {
    gap: 8px;
}

.ps-gap-md {
    gap: 16px;
}

.ps-gap-lg {
    gap: 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 991px) {
    .ps-title {
        font-size: 26px;
    }

    .ps-info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .ps-profile-row {
        padding: 12px 16px 12px 12px;
    }

    .ps-status-pills {
        display: none; /* hide on tablet, visible on hover or expand */
    }
}

/* Mobile */
@media (max-width: 767px) {
    .profile-studio-v2 {
        gap: 16px;
        padding: 4px 0 32px;
    }

    .ps-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ps-header-search-wrap {
        width: 100%;
        max-width: 100%;
        margin: 0;
        justify-self: stretch;
    }

    .ps-top-actions {
        width: 100%;
        justify-self: stretch;
    }

    .ps-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .ps-title {
        font-size: 24px;
    }

    .ps-info-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ps-profile-row {
        min-height: auto;
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .ps-profile-title {
        font-size: 15px;
    }

    .ps-status-pills {
        display: flex;
        width: 100%;
        padding-left: calc(24px + 42px + 14px + 14px); /* align under title */
    }

    .ps-list-header {
        padding: 14px 16px 12px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .ps-status-pills {
        padding-left: 0;
    }

    .ps-profile-row {
        padding: 10px 12px;
    }
}

/* ============================================================
   OVERRIDE: DraggableAccordionCard chrome reset
   When used inside .ps-profile-list, strip all accordion chrome
   ============================================================ */
.ps-profile-list .accordion-item {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.ps-profile-list .accordion-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

    .ps-profile-list .accordion-button::after {
        display: none !important;
    }

.ps-profile-list .accordion-body {
    padding: 0 !important;
}

.ps-profile-list .accordion-collapse.collapse {
    display: block !important;
    visibility: visible !important;
}

/* Ensure the DraggableAccordionCard bg doesn't override row colour */
.ps-profile-list .accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: transparent;
}

/* ============================================================
   ANIMATION: subtle entrance fade for list rows
   ============================================================ */
@keyframes ps-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.ps-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.ps-card-content {
    flex: 1;
}

    .ps-card-content h5 {
        margin: 0 0 6px;
        text-transform: uppercase;
        font-size: 12px;
        font-weight: 600;
        color: #94a3b8;
        letter-spacing: .5px;
    }

    .ps-card-content .pr-h6,
    .ps-card-content .country-display-name {
        font-size: 22px;
        font-weight: 600;
        color: #111827;
    }


.country-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
}

.country-display-flag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

@media(max-width:768px) {
    .ps-card-header {
        flex-direction: column;
        text-align: center;
    }

    .ps-card-content {
        text-align: center;
    }
}
/* ============================================================
   DROPDOWN STACKING FIX
   The .ps-profile-list and all ancestor containers must NOT
   have overflow:hidden, and must NOT use CSS transforms
   (transforms create isolated stacking contexts that clip
   child dropdowns regardless of z-index).
   ============================================================ */
.ps-profile-list,
.ps-profile-list .accordion,
.ps-profile-list .accordion-item,
.ps-profile-list .accordion-button,
.ps-profile-list .accordion-body,
.ps-profile-list .accordion-collapse,
.ps-profile-list .card,
.ps-profile-list .card-body {
    overflow: visible !important;
}
/* Profile row: position:relative needed for action menu,
   but NO z-index — that would create a stacking context
   that traps the dropdown behind the next row. */
.ps-profile-row {
    overflow: visible !important;
    position: relative;
    /* z-index intentionally omitted */
}

    /* When a dropdown inside a row is open, elevate that entire
   row above its siblings so the menu paints on top. */
    .ps-profile-row:has(.dropdown.show) {
        z-index: 10 !important;
        position: relative;
    }

/* Action menu wrapper */
.ps-action-menu {
    position: relative;
}

    .ps-action-menu .dropdown {
        position: static;
    }

/* The dropdown menu itself — must be above everything */
.dropdown-menu.show.ppm-dropdown-menu,
.ppm-dropdown-menu.show,
.ppm-dropdown-menu {
    z-index: 9999 !important;
}

/* Hover lift on cards uses box-shadow only — NO transform.
   transform would create a stacking context and cause the
   same dropdown-clipping bug. */
.ps-info-cards .col-lg-6:hover,
.ps-info-cards .col-md-12:hover {
    box-shadow: var(--ps-shadow-hover) !important;
    transform: none !important;
}

.ps-card:hover {
    box-shadow: var(--ps-shadow-hover) !important;
    transform: none !important;
}

/*---------------------Country changes-------------------------------*/
/* Header */
.ps-country-modal-header {
    text-align: center;
    padding-bottom: 12px;
}

.ps-country-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg,#0BAA9A,#16C7B7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 12px 30px rgba(11,170,154,.25);
}

.ps-country-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.ps-country-modal-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Body */

.ps-country-card {
    margin-top: 25px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.ps-country-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Dropdown */

.ps-country-dropdown {
    border-radius: 14px !important;
}

/* Dropdown item */

.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
}

.country-option-flag {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.selected-country-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-country-value-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.ps-country-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 24px;
    background: #EAF8F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-country-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/*Defalut parse color-profile */
/* Header */

.ps-modal-header {
    text-align: center;
    padding-bottom: 20px;
}

/* Illustration */

.ps-modal-illustration {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ps-modal-illustration-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
}

/* Heading */

.ps-modal-title {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.ps-modal-subtitle {
    max-width: 520px;
    margin: auto;
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
}

/* Card */

.ps-setting-card {
    margin-top: 34px;
    background: #F9FBFC;
    border: 1px solid #E7EEF3;
    border-radius: 20px;
    padding: 28px;
}

.ps-setting-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748B;
    letter-spacing: .5px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Dropdown */

.ps-modern-dropdown {
    min-height: 52px;
    border-radius: 14px;
}


/*New color-profile Create */
#newprofile .modal-dialog {
    max-width: 900px;
}

#newprofile .modal-content {
    border-radius: 24px;
    border: 1px solid #E8ECF1;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    background: #FAFBFC;
}

#newprofile .modal-header {
    padding: 40px 40px 32px;
    border-bottom: none;
    background: transparent;
}

#newprofile .modal-body {
    padding: 0 40px 40px;
}

#newprofile .modal-footer {
    padding: 24px 40px;
    border-top: 1px solid #E8ECF1;
    background: #fff;
    border-radius: 0 0 24px 24px;
}

.np-header {
    text-align: center;
}

    .np-header img {
        margin-bottom: 24px;
    }

.np-title {
    font-size: 32px;
    font-weight: 600;
    color: #2B2D42;
    margin-bottom: 8px;
}

.np-subtitle {
    font-size: 16px;
    color: #6B7280;
    font-weight: 400;
}

.np-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #009688 0%, #0E7C72 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.np-duplicate-info {
    font-size: 16px;
    color: #6B7280;
    font-weight: 400;
}

.np-input-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

    .np-input-card:hover {
        border-color: #009688;
        box-shadow: 0 2px 8px rgba(0, 150, 136, 0.1);
    }

    .np-input-card .form-floating {
        margin-bottom: 0;
    }

    .np-input-card .form-control {
        border: none;
        background: transparent;
        padding-left: 48px;
        font-size: 16px;
    }

        .np-input-card .form-control:focus {
            box-shadow: none;
        }

.np-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    font-size: 18px;
}

.np-setting-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

    .np-setting-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        border-color: #009688;
    }

    .np-setting-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

        .np-setting-card.disabled:hover {
            transform: none;
            box-shadow: none;
            border-color: #E8ECF1;
        }

.np-setting-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #F0F9F8 0%, #E0F2F1 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #009688;
    font-size: 20px;
    flex-shrink: 0;
}

.np-setting-content {
    flex: 1;
}

.np-setting-title {
    font-size: 16px;
    font-weight: 600;
    color: #2B2D42;
    margin-bottom: 4px;
}

.np-setting-desc {
    font-size: 14px;
    color: #6B7280;
    font-weight: 400;
    line-height: 1.5;
}

.np-setting-toggle {
    flex-shrink: 0;
}

.np-upload-card {
    background: #fff;
    border: 2px dashed #E8ECF1;
    border-radius: 16px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 10px;
    position: relative;
}

    .np-upload-card:hover {
        border-color: #009688;
        background: #F0F9F8;
    }

.np-upload-icon {
    font-size: 48px;
    color: #009688;
    margin-bottom: 16px;
}

.np-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #2B2D42;
    margin-bottom: 4px;
}

.np-upload-sub {
    font-size: 14px;
    color: #6B7280;
}

.np-upload-accept {
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
}

.np-upload-success {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid #4CAF50;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 10px;
}

.np-upload-success-icon {
    color: #4CAF50;
    font-size: 24px;
}

.np-upload-success-text {
    color: #2E7D32;
    font-size: 16px;
    font-weight: 500;
}

.stretched-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.np-section-heading {
    font-size: 18px;
    font-weight: 600;
    color: #2B2D42;
    margin: 32px 0 20px;
}

.np-dropdown-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
}

    .np-dropdown-card .e-dropdownbase {
        border-radius: 12px;
    }

.np-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .np-features-grid {
        grid-template-columns: 1fr;
    }
}

.np-feature-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

    .np-feature-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        border-color: #009688;
    }

.np-feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.np-feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F0F9F8 0%, #E0F2F1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #009688;
    font-size: 18px;
}

.np-feature-title {
    font-size: 15px;
    font-weight: 600;
    color: #2B2D42;
}

.np-feature-desc {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.4;
    margin-bottom: 12px;
}

.np-feature-toggle {
    display: flex;
    justify-content: flex-end;
}

.np-warning-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #FFF8E1;
    color: #F57C00;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.np-accordion-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

    .np-accordion-card:hover {
        border-color: #009688;
    }

.np-accordion-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.np-accordion-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.np-accordion-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F0F9F8 0%, #E0F2F1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #009688;
    font-size: 18px;
}

.np-accordion-title {
    font-size: 15px;
    font-weight: 600;
    color: #2B2D42;
}

.np-accordion-expand {
    color: #6B7280;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.np-accordion-content {
    padding: 0 20px 20px;
    border-top: 1px solid #E8ECF1;
}

.np-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.np-chip-checkbox .e-checkbox-wrapper {
    margin-right: 8px;
    margin-bottom: 8px;
}

    .np-chip-checkbox .e-checkbox-wrapper .e-frame {
        border-radius: 20px;
    }

    .np-chip-checkbox .e-checkbox-wrapper .e-label {
        padding: 8px 16px;
        background: #F0F9F8;
        border: 1px solid #E8ECF1;
        border-radius: 20px;
        font-size: 14px;
        color: #2B2D42;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .np-chip-checkbox .e-checkbox-wrapper:hover .e-label {
        background: #E0F2F1;
        border-color: #009688;
    }

    .np-chip-checkbox .e-checkbox-wrapper.e-check .e-label {
        background: linear-gradient(135deg, #009688 0%, #0E7C72 100%);
        color: white;
        border-color: #009688;
    }

.np-ai-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 576px) {
    .np-ai-cards {
        grid-template-columns: 1fr;
    }
}

.np-ai-card {
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .np-ai-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #009688, #0E7C72);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .np-ai-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 150, 136, 0.12);
        border-color: #009688;
    }

        .np-ai-card:hover::before {
            opacity: 1;
        }

    .np-ai-card.selected {
        background: none;
        box-shadow: 0 8px 16px rgba(0, 150, 136, 0.12);
        border-color: #009688;
    }

        .np-ai-card.selected::before {
            opacity: 1;
        }

    .np-ai-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

        .np-ai-card.disabled:hover {
            transform: none;
            box-shadow: none;
            border-color: #E8ECF1;
        }

            .np-ai-card.disabled:hover::before {
                opacity: 0;
            }

.np-ai-card-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F0F9F8 0%, #E0F2F1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #009688;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.np-ai-card.selected .np-ai-card-icon {
    background: linear-gradient(135deg, #009688 0%, #0E7C72 100%);
    color: white;
}

.np-ai-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2B2D42;
    flex: 1;
    transition: all 0.3s ease;
}

.np-ai-card.selected .np-ai-card-title {
    color: #009688;
}

.np-ai-card-badge {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #009688 0%, #0E7C72 100%);
    color: white;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 150, 136, 0.25);
    flex-shrink: 0;
}

.np-ai-card.selected .np-ai-card-badge {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.np-ai-mode-toggle {
    display: flex;
    background: #F0F9F8;
    padding: 6px;
    border-radius: 14px;
    gap: 6px;
    margin-bottom: 16px;
}

.np-ai-mode-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .np-ai-mode-btn:hover {
        color: #2B2D42;
    }

    .np-ai-mode-btn.selected {
        background: #fff;
        color: #009688;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

.np-alert-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    margin-top: 12px;
    margin-bottom: 10px;
}

.np-alert-icon {
    color: #F04438;
    font-size: 20px;
    flex-shrink: 0;
}

.np-alert-text {
    color: #991B1B;
    font-size: 14px;
    font-weight: 500;
}

.np-btn-ghost {
    background: transparent;
    border: 1px solid #E8ECF1;
    color: #6B7280;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .np-btn-ghost:hover {
        background: #F3F4F6;
        border-color: #D1D5DB;
        color: #2B2D42;
    }

.np-btn-primary {
    background: linear-gradient(135deg, #009688 0%, #0E7C72 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .np-btn-primary:hover {
        background: linear-gradient(135deg, #0E7C72 0%, #0B6660 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
    }

.np-empty-state {
    text-align: center;
    padding: 40px;
    color: #6B7280;
    font-size: 15px;
}

/* ============================================================
   AI WORKSHOP / AI ROADMAP — pill button used in CandidateWorkshop's
   CV document modal (View / Download / View Profile links)
   ============================================================ */
.ps-feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--ps-green);
    background: transparent;
    color: var(--ps-green) !important;
    border-radius: var(--ps-radius-pill);
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--ps-transition);
    cursor: pointer;
    text-decoration: none !important;
    margin-top: auto;
}

    .ps-feature-btn:hover {
        background: var(--ps-green-soft);
        border-color: var(--ps-green-dark);
        color: var(--ps-green-dark) !important;
    }
.as-danger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #ffffff;
    color: var(--as-danger);
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #f3b4b4;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .as-danger-btn:hover {
        background: var(--as-danger-soft);
    }

.account-settings-page {
    --as-teal: #0f7a75;
    --as-teal-soft: #e6f3f2;
    --as-page-bg: #f5f5f3;
    --as-card-border: #e5e5e5;
    --as-neutral-100: #f5f5f5;
    --as-neutral-500: #737373;
    --as-ink: #171717;
    --as-danger: #dc2626;
    --as-danger-soft: #fdecec;
    background: var(--as-page-bg);
    padding:0;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
