/* CentraMEDKIT Profile — Modern */

:root {
    --pf-ink: #0f172a;
    --pf-ink-700: #334155;
    --pf-ink-500: #64748b;
    --pf-ink-400: #94a3b8;
    --pf-line: #e2e8f0;
    --pf-line-strong: #cbd5e1;
    --pf-accent: #2563eb;
    --pf-accent-dark: #1e40af;
    --pf-accent-50: #eff6ff;
}

.profile-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.5rem;
    box-sizing: border-box;
}

/* Hero */

.profile-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 60%, #1e3a8a 100%);
    border-radius: 18px;
    padding: 2.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 16px 40px -16px rgba(30, 64, 175, 0.55);
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.profile-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 30%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.profile-avatar-big {
    position: relative;
    z-index: 1;
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.profile-meta {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.profile-meta h2 {
    margin: 0 0 0.35rem;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.profile-email-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.profile-email-line span {
    font-size: 0.95rem;
    opacity: 0.92;
    word-break: break-all;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-badge svg {
    width: 12px;
    height: 12px;
}

/* Verified badges */

.pf-verified-badge,
.pf-unverified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pf-verified-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pf-unverified-badge {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.pf-verified-badge svg,
.pf-unverified-badge svg {
    width: 11px;
    height: 11px;
}

/* Grid */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.pf-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    box-shadow: 0 8px 24px -14px rgba(2, 24, 72, 0.2);
    padding: 1.5rem;
    box-sizing: border-box;
}

.pf-card-header {
    margin-bottom: 1.25rem;
}

.pf-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pf-ink);
}

.pf-card-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--pf-ink-500);
}

/* Info rows */

.pf-info-list {
    display: flex;
    flex-direction: column;
}

.pf-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--pf-line);
}

.pf-info-item:last-child {
    border-bottom: none;
}

.pf-info-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--pf-ink-500);
    font-size: 0.85rem;
    font-weight: 500;
}

.pf-info-label svg {
    width: 16px;
    height: 16px;
    color: var(--pf-ink-400);
    flex: none;
}

.pf-info-value {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--pf-ink-700);
    text-align: right;
    word-break: break-all;
}

.pf-status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.pf-status-active {
    background: #ecfdf5;
    color: #065f46;
}

.pf-status-inactive {
    background: #fef2f2;
    color: #991b1b;
}

/* Security card */

.pf-security-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.pf-security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--pf-line);
    border-radius: 12px;
}

.pf-security-info {
    min-width: 0;
}

.pf-security-info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--pf-ink);
    margin-bottom: 0.15rem;
}

.pf-security-info small {
    font-size: 0.76rem;
    color: var(--pf-ink-500);
}

.pf-security-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--pf-accent-50);
    color: var(--pf-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-security-icon svg {
    width: 18px;
    height: 18px;
}

/* Buttons */

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pf-btn svg {
    width: 15px;
    height: 15px;
}

.pf-btn:hover {
    transform: translateY(-1px);
}

.pf-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.55);
}

.pf-btn-ghost {
    background: #fff;
    color: var(--pf-ink-500);
    border: 1.5px solid var(--pf-line-strong);
}

.pf-btn-ghost:hover {
    color: var(--pf-ink);
    border-color: var(--pf-ink-400);
}

.pf-btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.pf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modals */

.pf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(8, 20, 45, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: pfFade 0.25s ease;
}

.pf-modal.show {
    display: flex;
}

.pf-modal-content {
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 80px -20px rgba(2, 24, 72, 0.45);
    padding: 1.75rem;
    box-sizing: border-box;
    animation: pfModalIn 0.25s ease;
}

.pf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.pf-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pf-ink);
}

.pf-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--pf-ink-400);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.pf-modal-close:hover {
    color: var(--pf-ink);
    background: rgba(15, 23, 42, 0.05);
}

.pf-modal-desc {
    font-size: 0.84rem;
    color: var(--pf-ink-500);
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

.pf-field {
    margin-bottom: 1.1rem;
}

.pf-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pf-ink-700);
}

.pf-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--pf-line-strong);
    border-radius: 10px;
    background: #fbfcfe;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--pf-ink);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pf-input:focus {
    outline: none;
    border-color: var(--pf-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.pf-otp-input {
    font-size: 1.3rem;
    letter-spacing: 0.6rem;
    text-align: center;
    font-weight: 700;
}

.pf-alert {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    line-height: 1.4;
}

.pf-alert.show {
    display: block;
}

.pf-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.pf-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

.pf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.pf-modal-footer .spacer {
    flex: 1;
}

/* OTP steps */

.pf-otp-box {
    background: var(--pf-accent-50);
    border: 1px dashed rgba(37, 99, 235, 0.35);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}

.pf-otp-box strong {
    color: var(--pf-accent-dark);
    word-break: break-all;
}

.pf-otp-hint {
    font-size: 0.78rem;
    color: var(--pf-ink-500);
    margin-bottom: 1.1rem;
}

.pf-otp-timer {
    font-size: 0.78rem;
    color: var(--pf-ink-400);
}

/* Toasts */

.pf-toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: min(92vw, 460px);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 16px 40px rgba(2, 24, 72, 0.25);
    animation: pfToastIn 0.3s ease forwards;
}

.pf-toast.success {
    border: 1px solid #a7f3d0;
    color: #047857;
}

.pf-toast.error {
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.pf-toast-icon {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.pf-toast.success .pf-toast-icon {
    background: #ecfdf5;
    color: #10b981;
}

.pf-toast.error .pf-toast-icon {
    background: #fef2f2;
    color: #ef4444;
}

.pf-toast-icon svg {
    width: 12px;
    height: 12px;
}

.pf-toast.hide {
    animation: pfToastOut 0.3s ease forwards;
}

/* Animations */

@keyframes pfFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pfModalIn {
    from {
        transform: translateY(16px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes pfToastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes pfToastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-16px);
    }
}

/* Responsive */

@media (max-width: 768px) {
    .profile-wrap {
        padding: 1rem;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1.25rem;
    }

    .profile-email-line {
        justify-content: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .pf-security-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pf-security-icon {
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
