:root {
    --p2-blue: #457EFF;
    --p2-blue-hover: #3366E6;
    --p2-blue-light: #EBF1FF;
    --p2-green: #16A34A;
    --p2-green-light: #DCFCE7;
    --p2-orange: #F97316;
    --p2-orange-light: #FFF7ED;
    --p2-orange-border: #FED7AA;
    --p2-red: #EF4444;
    --p2-bg: #F5F6FA;
    --p2-surface: #FFFFFF;
    --p2-text: #1A1A1A;
    --p2-text-secondary: #555;
    --p2-text-muted: #999;
    --p2-border: #E8E8E8;
    --p2-radius: 12px;
    --p2-radius-sm: 8px;
    --p2-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --p2-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--p2-font);
    background-color: var(--p2-bg);
    color: var(--p2-text);
    margin: 0;
}

/* ---------- Loading Overlay ---------- */
.p2-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.p2-loading-overlay p {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--p2-text-secondary);
    font-weight: 500;
}

.p2-loader-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid var(--p2-border);
    border-top-color: var(--p2-blue);
    border-radius: 50%;
    animation: p2spin 0.8s linear infinite;
}

@keyframes p2spin {
    to { transform: rotate(360deg); }
}

.p2-main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.p2-header-card {
    background: var(--p2-surface);
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--p2-shadow);
    margin-bottom: 1.5rem;
}

.p2-header-left {
    display: flex;
    gap: 1.75rem;
    flex: 1;
    min-width: 0;
}

/* Avatar & Progress Ring */
.p2-avatar-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.p2-progress-ring {
    width: 110px;
    height: 110px;
    transform: rotate(-90deg);
}

.p2-ring-bg {
    fill: none;
    stroke: #EEE;
    stroke-width: 5;
}

.p2-ring-fg {
    fill: none;
    stroke: var(--p2-blue);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease;
}

.p2-avatar-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
}

.p2-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p2-pct-badge {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--p2-surface);
    border: 1px solid var(--p2-border);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--p2-orange);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.p2-pct-badge i {
    font-size: 0.65rem;
}

/* Header Info */
.p2-header-info {
    flex: 1;
    min-width: 0;
}

.p2-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.15rem;
}

.p2-display-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--p2-text);
    margin: 0;
    line-height: 1.3;
}

.p2-edit-pen {
    color: var(--p2-text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.p2-edit-pen:hover {
    color: var(--p2-blue);
}

.p2-updated {
    font-size: 0.82rem;
    color: var(--p2-text-muted);
    margin-bottom: 1rem;
}

.p2-header-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
}

.p2-header-summary {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid #F1F3F5;
}

.p2-header-summary-label {
    font-size: 0.78rem;
    color: var(--p2-text-muted);
    margin-bottom: 0.25rem;
}

.p2-header-summary-text {
    font-size: 0.88rem;
    color: var(--p2-text-secondary);
    line-height: 1.45;
}

.p2-hd-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--p2-text-secondary);
}

.p2-hd-item i:first-child {
    color: var(--p2-text-muted);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.p2-hd-link {
    color: var(--p2-blue);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.p2-hd-link:hover {
    text-decoration: underline;
}

.p2-verified {
    color: var(--p2-green) !important;
    font-size: 0.75rem;
    margin-left: 0.2rem;
}

/* Missing Details Right Card */
.p2-header-right {
    width: 260px;
    flex-shrink: 0;
    background: var(--p2-orange-light);
    border: 1px solid var(--p2-orange-border);
    border-radius: var(--p2-radius-sm);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.p2-missing-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.p2-missing-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.84rem;
    color: var(--p2-text-secondary);
}

.p2-missing-row i {
    color: var(--p2-text-muted);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.p2-missing-row .p2-boost-sm {
    margin-left: auto;
    color: var(--p2-orange);
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
}

.p2-missing-cta {
    display: block;
    text-align: center;
    background: var(--p2-orange);
    color: #fff;
    border-radius: 24px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.p2-missing-cta:hover {
    background: #E8630E;
}

.p2-body-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Sidebar */
.p2-sidebar {
    background: var(--p2-surface);
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    padding: 1.25rem;
    position: sticky;
    top: calc(70px + 1.5rem);
    box-shadow: var(--p2-shadow);
}

.p2-sidebar h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--p2-text);
}

.p2-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.p2-ql {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--p2-text);
    text-decoration: none;
    transition: background 0.15s;
}

.p2-ql:hover {
    background: var(--p2-blue-light);
}

.p2-ql-action {
    color: var(--p2-blue);
    font-size: 0.78rem;
    font-weight: 600;
}

.p2-card {
    background: var(--p2-surface);
    border: 1px solid var(--p2-border);
    border-radius: var(--p2-radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    box-shadow: var(--p2-shadow);
    transition: box-shadow 0.2s;
}

.p2-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.p2-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.p2-card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.p2-boost {
    display: inline-block;
    background: var(--p2-orange-light);
    color: var(--p2-orange);
    border: 1px solid var(--p2-orange-border);
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.p2-boost-optional {
    display: inline-block;
    background: var(--p2-blue-light);
    color: var(--p2-blue);
    border: 1px solid #bbd0ff;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.p2-card-action {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--p2-blue);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    white-space: nowrap;
}

.p2-card-action:hover {
    color: var(--p2-blue-hover);
}

.p2-card-sub {
    font-size: 0.85rem;
    color: var(--p2-text-muted);
    margin: 0 0 1rem;
}

.p2-edit-icon {
    color: var(--p2-text-muted);
    font-size: 0.8rem;
}

.p2-card-form {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
}

.p2-card-form.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.p2-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.p2-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
}

.p2-form-row.p2-full-width {
    grid-column: 1 / -1;
}

.p2-form-row label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--p2-text-secondary);
    margin-bottom: 0.35rem;
}

.p2-form-row input,
.p2-form-row select,
.p2-form-row textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--p2-border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--p2-font);
    color: var(--p2-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.p2-form-row input:focus,
.p2-form-row select:focus,
.p2-form-row textarea:focus {
    outline: none;
    border-color: var(--p2-blue);
    box-shadow: 0 0 0 3px rgba(69, 126, 255, 0.12);
}

.p2-form-row input:hover,
.p2-form-row select:hover,
.p2-form-row textarea:hover {
    border-color: #CCC;
}

.p2-char-count {
    margin-top: 0.35rem;
    text-align: right;
    font-size: 0.8rem;
    color: var(--p2-text-muted);
}

.p2-form-row input[disabled] {
    background: #F9F9F9;
    color: var(--p2-text-muted);
    cursor: default;
}

/* Upload Zone */
.p2-upload-zone {
    border: 2px dashed #D0D5DD;
    border-radius: var(--p2-radius-sm);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: #FAFBFC;
    transition: all 0.25s ease;
    position: relative;
}

.p2-upload-zone:hover {
    border-color: var(--p2-blue);
    background: var(--p2-blue-light);
}

.p2-upload-zone.hover {
    border-color: var(--p2-blue);
    background: var(--p2-blue-light);
    transform: scale(1.01);
}

.p2-upload-zone i.fa-cloud-upload-alt {
    font-size: 2rem;
    color: var(--p2-blue);
    margin-bottom: 0.5rem;
}

.p2-upload-zone p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    color: var(--p2-text);
}

.p2-upload-zone span {
    font-size: 0.78rem;
    color: var(--p2-text-muted);
}

.p2-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* File Tag */
.p2-file-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--p2-blue-light);
    color: var(--p2-blue);
    border: 1px solid #bbd0ff;
    padding: 0.45rem 1rem;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
}

.p2-file-tag i.fa-file-pdf {
    color: var(--p2-red);
}

.p2-remove-file {
    background: none;
    border: none;
    color: var(--p2-text-muted);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 50%;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.p2-remove-file:hover {
    background: #FEE2E2;
    color: var(--p2-red);
}

/* Save Bar */
.p2-save-bar {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0;
    border-top: 1px solid var(--p2-border);
    margin-top: 0.5rem;
}

.p2-save-btn {
    background: linear-gradient(135deg, var(--p2-blue) 0%, #3A6FE0 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(69, 126, 255, 0.35);
    font-family: var(--p2-font);
}

.p2-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(69, 126, 255, 0.45);
}

.p2-save-btn:active {
    transform: translateY(0);
}

.p2-save-btn:disabled {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 900px) {
    .p2-header-card {
        flex-direction: column;
    }

    .p2-header-right {
        width: 100%;
    }

    .p2-body-layout {
        grid-template-columns: 1fr;
    }

    .p2-sidebar {
        position: static;
        display: none;
    }

    .p2-header-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .p2-main {
        padding: 1rem 0.5rem;
        padding-top: calc(0px + 1rem);
    }

    .p2-header-card {
        padding: 1.25rem;
    }

    .p2-header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .p2-header-details {
        justify-items: center;
    }

    .p2-name-row {
        justify-content: center;
    }

    .p2-updated {
        text-align: center;
    }

    .p2-card {
        padding: 1.15rem 1rem;
    }

    .p2-form-grid {
        grid-template-columns: 1fr;
    }

    .p2-career-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .p2-personal-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .p2-lang-table th,
    .p2-lang-table td {
        font-size: 0.85rem;
    }

    .p2-lang-editor-head,
    .p2-lang-editor-row {
        grid-template-columns: 1fr;
    }

    .lang-check-wrap {
        justify-content: flex-start;
    }

    .p2-save-btn {
        width: 100%;
        justify-content: center;
    }
}

.p2-card[id] {
    scroll-margin-top: calc(70px + 1.5rem);
}

#section-header {
    scroll-margin-top: calc(70px + 1.5rem);
}

.p2-saved-display {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.p2-saved-entry {
    padding: 1rem 0;
    border-bottom: 1px solid #F3F4F6;
}

.p2-saved-entry:last-child {
    border-bottom: none;
}

.p2-saved-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.p2-saved-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--p2-text);
    margin-bottom: 0.2rem;
}

.p2-saved-meta {
    font-size: 0.82rem;
    color: var(--p2-text-muted);
    line-height: 1.5;
}

.p2-entry-edit {
    color: var(--p2-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}

.p2-entry-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.p2-entry-edit:hover {
    color: var(--p2-blue);
    background: var(--p2-blue-light);
}

.p2-entry-remove {
    color: #B0B7C3;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 0;
}

.p2-entry-remove:hover {
    color: #DC2626;
    background: #FEF2F2;
}

.p2-add-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.p2-add-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--p2-blue);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0.35rem 0;
}

.p2-add-link:hover {
    color: var(--p2-blue-hover);
}

.p2-add-link i {
    font-size: 0.85rem;
}

.p2-display-clickable {
    cursor: pointer;
}

.p2-career-display {
    margin-top: 0.75rem;
}

.p2-career-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

.p2-career-item {
    min-height: 3rem;
}

.p2-career-label {
    font-size: 0.8rem;
    color: var(--p2-text-muted);
    margin-bottom: 0.2rem;
}

.p2-career-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--p2-text);
    line-height: 1.35;
}

.p2-personal-display {
    margin-top: 0.75rem;
}

.p2-personal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

.p2-personal-item {
    min-height: 3rem;
}

.p2-personal-label {
    font-size: 0.8rem;
    color: var(--p2-text-muted);
    margin-bottom: 0.2rem;
}

.p2-personal-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--p2-text);
    line-height: 1.35;
}

.p2-personal-sep {
    margin: 1rem 0;
    border-top: 1px solid var(--p2-border);
}

.p2-personal-lang-head h3 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--p2-text);
}

.p2-lang-table {
    width: 100%;
    border-collapse: collapse;
}

.p2-lang-table th,
.p2-lang-table td {
    padding: 0.45rem 0.2rem;
    text-align: left;
    font-size: 0.92rem;
}

.p2-lang-table th {
    color: var(--p2-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--p2-border);
}

.p2-lang-table td {
    color: var(--p2-text);
    font-weight: 600;
}

.p2-lang-empty {
    color: var(--p2-blue) !important;
    font-weight: 600;
}

.p2-lang-editor {
    border: 1px solid var(--p2-border);
    border-radius: 8px;
    padding: 0.65rem;
    background: #fff;
}

.p2-lang-editor-head,
.p2-lang-editor-row {
    display: grid;
    grid-template-columns: 1.7fr 1.2fr 0.6fr 0.6fr 0.6fr 0.35fr;
    gap: 0.5rem;
    align-items: center;
}

.p2-lang-editor-head {
    font-size: 0.76rem;
    color: var(--p2-text-muted);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.p2-lang-editor-row {
    margin-bottom: 0.45rem;
}

.p2-lang-editor-row input[type="text"],
.p2-lang-editor-row select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--p2-border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--p2-font);
}

.lang-check-wrap {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.lang-remove {
    border: none;
    background: transparent;
    color: var(--p2-text-muted);
    cursor: pointer;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-remove:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* Inline Form Title */
.p2-inline-form-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--p2-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--p2-blue-light);
}

/* Inline Actions (Cancel / Save buttons inside section) */
.p2-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid #F3F4F6;
}

.p2-inline-cancel {
    background: none;
    border: 1px solid var(--p2-border);
    color: var(--p2-text-secondary);
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--p2-font);
    transition: all 0.15s;
}

.p2-inline-cancel:hover {
    background: #F9F9F9;
    border-color: #CCC;
}

.p2-inline-save {
    background: var(--p2-blue);
    color: #fff;
    border: 1px solid var(--p2-blue);
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--p2-font);
    transition: all 0.15s;
}

.p2-inline-save:hover {
    background: var(--p2-blue-hover);
    border-color: var(--p2-blue-hover);
}

/* Card form as Modal when expanded */
body.p2-modal-open {
    overflow: hidden;
}

.p2-global-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.p2-card-form {
    display: none;
}

.p2-card-form:not(.collapsed) {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    max-width: 95vw;
    background: var(--p2-surface);
    z-index: 1001;
    padding: 2rem;
    border-radius: var(--p2-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
    display: block;
    border: none;
}

.p2-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--p2-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.p2-modal-close:hover {
    background: #F3F4F6;
    color: #111827;
}

.p2-radio-group { display: flex; gap: 1.5rem; margin-top:0.25rem; }
.p2-radio-group label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--p2-text-secondary); font-size:0.9rem;}

.p2-chip-group { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top:0.25rem; }
.p2-chip { padding: 0.4rem 1rem; border: 1px solid var(--p2-border); border-radius: 20px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; color: var(--p2-text-secondary); background: var(--p2-surface); }
.p2-chip:hover { border-color: var(--p2-blue); background: var(--p2-blue-light); color: var(--p2-blue); }
.p2-chip.selected { border-color: #333; background: #fefefe; text-decoration: underline; color: #111; font-weight:600; box-shadow: 0 0 0 1px #333 inset; }

.p2-skills-container { border: 1px solid var(--p2-border); border-radius: var(--p2-radius-sm); padding: 0.4rem 0.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; background: var(--p2-surface); transition: border-color 0.2s;}
.p2-skills-container:focus-within { border-color: var(--p2-blue); outline: 1px solid var(--p2-blue); }
.p2-skill-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border: 1px solid var(--p2-border); border-radius: 12px; font-size: 0.82rem; font-weight: 500; background: #F3F4F6; color: var(--p2-text); }
.p2-skill-tag i { cursor: pointer; color: var(--p2-text-muted); font-size: 0.8rem; }
.p2-skill-tag i:hover { color: var(--p2-text); }
#skills_input { flex: 1; border: none !important; box-shadow:none !important; padding: 0.2rem; outline: none; min-width: 120px; font-size: 0.9rem; font-family: var(--p2-font); color: var(--p2-text); background:transparent; }

/* ========== Toast Notifications ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.p2-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: var(--p2-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--p2-surface);
    border-left: 4px solid var(--p2-blue);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.p2-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.p2-toast.p2-toast-success {
    border-left-color: var(--p2-green);
}

.p2-toast.p2-toast-error {
    border-left-color: var(--p2-red);
}

.p2-toast.p2-toast-warning {
    border-left-color: var(--p2-orange);
}

.p2-toast.p2-toast-info {
    border-left-color: var(--p2-blue);
}

.p2-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.p2-toast-success .p2-toast-icon {
    color: var(--p2-green);
}

.p2-toast-error .p2-toast-icon {
    color: var(--p2-red);
}

.p2-toast-warning .p2-toast-icon {
    color: var(--p2-orange);
}

.p2-toast-info .p2-toast-icon {
    color: var(--p2-blue);
}

.p2-toast-content {
    flex: 1;
    min-width: 0;
}

.p2-toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--p2-text);
}

.p2-toast-message {
    font-size: 0.875rem;
    color: var(--p2-text-secondary);
    line-height: 1.4;
}

.p2-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--p2-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    padding: 0;
}

.p2-toast-close:hover {
    background: #f0f0f0;
}

.p2-toast.is-exiting {
    opacity: 0;
    transform: translateX(24px);
}

.p2-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: rgba(79, 70, 229, 0.22);
    transform-origin: left center;
}

.p2-toast-success .p2-toast-progress {
    background: rgba(5, 150, 105, 0.28);
}

.p2-toast-error .p2-toast-progress {
    background: rgba(220, 38, 38, 0.28);
}

.p2-toast-warning .p2-toast-progress {
    background: rgba(234, 88, 12, 0.28);
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .p2-toast {
        min-width: unset;
        max-width: unset;
        width: 100%;
        transform: translateY(-16px);
    }

    .p2-toast.is-visible {
        transform: translateY(0);
    }

    .p2-toast.is-exiting {
        transform: translateY(-16px);
    }
}


.p2-btn-save { background: var(--p2-blue); color: white; border: none; padding: 0.5rem 1.5rem; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: var(--p2-font); outline: none; margin-left: 0.5rem;}
.p2-btn-save:hover { background: var(--p2-blue-hover); }

/* ===== DPDP Consent Card ===== */
.p2-consent-card {
    margin-top: 1.25rem;
    border: 1.5px solid #D1FAE5;
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.p2-consent-card:has(#cvSharingConsent:checked) {
    border-color: var(--p2-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

.p2-consent-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.p2-consent-shield {
    color: var(--p2-green);
    font-size: 1rem;
}

.p2-consent-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #065F46;
    letter-spacing: 0.01em;
}

.p2-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0;
    margin: 0;
}

.p2-consent-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: var(--p2-green);
    cursor: pointer;
}

.p2-consent-text {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.55;
}

.p2-consent-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #D1FAE5;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.p2-consent-link {
    font-size: 0.78rem;
    color: var(--p2-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s;
}

.p2-consent-link:hover {
    color: var(--p2-blue-hover);
    text-decoration: underline;
}

.p2-consent-status {
    font-size: 0.75rem;
    color: var(--p2-text-muted);
    font-style: italic;
}

/* ===== Consent Popup Modal ===== */
.p2-consent-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
}

.p2-consent-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: p2consentFadeIn 0.3s ease;
}

@keyframes p2consentFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.p2-consent-modal .consent-icon {
    font-size: 2.5rem;
    color: var(--p2-orange);
    margin-bottom: 1rem;
}

.p2-consent-modal h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--p2-text);
    margin-bottom: 0.75rem;
}

.p2-consent-modal p {
    font-size: 0.88rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.p2-consent-modal .consent-action-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--p2-font);
    transition: all 0.2s;
}

.p2-consent-modal .consent-accept-btn {
    background: linear-gradient(135deg, var(--p2-green) 0%, #15803D 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.p2-consent-modal .consent-accept-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}

/* ===== Data Privacy & Account Card ===== */
.p2-privacy-card {
    border-left: 4px solid var(--p2-green);
}

.p2-privacy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.p2-privacy-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid #F3F4F6;
}

.p2-privacy-item > i {
    font-size: 1.1rem;
    color: var(--p2-green);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.p2-privacy-label {
    font-size: 0.75rem;
    color: var(--p2-text-muted);
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.p2-privacy-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--p2-text);
}

.p2-privacy-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.p2-privacy-link {
    font-size: 0.85rem;
    color: var(--p2-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: color 0.15s;
}

.p2-privacy-link:hover {
    color: var(--p2-blue-hover);
    text-decoration: underline;
}

.p2-danger-link {
    color: #DC2626 !important;
}

.p2-danger-link:hover {
    color: #B91C1C !important;
}

@media (max-width: 600px) {
    .p2-privacy-grid {
        grid-template-columns: 1fr;
    }
    .p2-consent-modal {
        padding: 1.5rem;
    }
}
