:root {
    --profile-bg: #f0f4f2;
    --profile-surface: #ffffff;
    --profile-surface-soft: #f5f8f6;
    --profile-border: #c4d0cb;
    --profile-text: #1C352D;
    --profile-muted: #4a6058;
    --profile-primary: #1C352D;
    --profile-primary-dark: #111f1a;
    --profile-success: #1f8b4c;
    --profile-danger: #c14848;
    --profile-shadow: 0 12px 30px rgba(28, 53, 45, 0.08);
}

.profile-page {
    color: var(--profile-text);
}

.profile-toolbar {
    margin-bottom: 1.5rem;
}

.profile-back-btn,
.profile-primary-btn,
.profile-outline-danger-btn,
.profile-outline-success-btn,
.profile-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: none;
}

.profile-back-btn {
    background: var(--profile-surface);
    border: 1px solid var(--profile-border);
    color: var(--profile-text);
}

.profile-back-btn:hover {
    background: #f9fbfd;
    color: var(--profile-text);
}

.profile-primary-btn {
    background: var(--profile-primary);
    border: 1px solid var(--profile-primary);
    color: #fff;
}

.profile-primary-btn:hover {
    background: var(--profile-primary-dark);
    border-color: var(--profile-primary-dark);
    color: #fff;
}

.profile-outline-danger-btn {
    background: #fff;
    border: 1px solid #e7b5b5;
    color: var(--profile-danger);
}

.profile-outline-success-btn {
    background: #fff;
    border: 1px solid #b8dec6;
    color: var(--profile-success);
}

.profile-danger-btn {
    background: var(--profile-danger);
    border: 1px solid var(--profile-danger);
    color: #fff;
}

.profile-header {
    background: linear-gradient(135deg, #111f1a 0%, #1C352D 62%, #2a4e42 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow: var(--profile-shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-avatar,
.avatar-placeholder {
    width: 104px;
    height: 104px;
    border-radius: 18px;
    object-fit: cover;
}

.profile-avatar {
    border: 3px solid rgba(255, 255, 255, 0.28);
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.18);
}

.profile-header h2 {
    font-size: 2rem;
}

.profile-header .text-muted,
.profile-header .small,
.profile-header .border-start {
    color: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.profile-header .badge {
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
}

.profile-header .progress {
    background: rgba(255, 255, 255, 0.2);
}

.profile-nav-card,
.profile-content-card {
    background: var(--profile-surface);
    border: 1px solid var(--profile-border);
    border-radius: 12px;
    box-shadow: var(--profile-shadow);
}

.profile-nav-card {
    padding: 0.9rem;
    position: sticky;
    top: 92px;
}

.profile-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
    color: var(--profile-text);
    background: transparent;
    font-weight: 600;
    text-align: left;
    margin-bottom: 0.35rem;
}

.profile-nav .nav-link i {
    width: 18px;
    text-align: center;
    color: var(--profile-primary);
}

.profile-nav .nav-link:hover {
    background: #f5f8f6;
    border-color: #d0dbd7;
    color: var(--profile-text);
}

.profile-nav .nav-link.active {
    background: #e8efec;
    color: var(--profile-primary-dark);
    border-color: #b8c8c2;
}

.profile-content-card {
    padding: 1.4rem;
}

.tab-pane {
    animation: profileFade 0.18s ease;
}

@keyframes profileFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--profile-text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e8eef4;
}

.section-header .btn,
.edit-section-btn {
    border-radius: 8px !important;
    font-weight: 600;
}

.info-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--profile-muted);
    margin-bottom: 0.35rem;
}

.info-value {
    min-height: 2.4rem;
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e6edf3;
    border-radius: 8px;
    background: var(--profile-surface-soft);
    color: var(--profile-text);
    line-height: 1.45;
}

.restricted-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff5f5;
    color: #9e3131;
    border: 1px solid #edc6c6;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline > div {
    padding: 1rem 0;
    border-bottom: 1px solid #e8eef4 !important;
}

.timeline > div:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0;
}

.btn-group > .btn.btn-light {
    background: #fff;
}

.list-group-item {
    border: 1px solid #e6edf3;
    border-radius: 8px !important;
    margin-bottom: 0.6rem;
    padding: 0.9rem 1rem;
}

.table-custom th {
    color: var(--profile-muted);
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}

.table-custom td,
.table-custom th {
    padding: 0.85rem 0.6rem;
    border-color: #e8eef4;
}

.profile-content-card .card.bg-light {
    background: #f7fafc !important;
    border: 1px solid #dfe8f0 !important;
    border-radius: 12px !important;
}

.modal-content {
    border-radius: 14px !important;
}

@media (max-width: 991px) {
    .profile-nav-card {
        position: static;
    }
}

@media (max-width: 767px) {
    .profile-header {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .profile-header h2 {
        font-size: 1.5rem;
    }

    .profile-avatar,
    .avatar-placeholder {
        width: 84px;
        height: 84px;
        border-radius: 14px;
    }

    .profile-content-card,
    .profile-nav-card {
        padding: 1rem;
    }

    .section-header {
        align-items: flex-start !important;
        gap: 0.75rem;
    }
}
