@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@700;800&display=swap');

:root {
    --profile-primary: #2a9d8f;
    --profile-primary-700: #21867b;
    --profile-primary-soft: #e8f7f5;
    --profile-primary-faint: #f3fbfa;
    --profile-ink: #29413e;
    --profile-text: #4f635f;
    --profile-muted: #7b8e8a;
    --profile-line: #d9ece8;
    --profile-card: #ffffff;
    --profile-page-bg: #f7fbfa;
    --profile-danger: #dc2626;
    --profile-warning: #b7791f;
}

.profile-page {
    background:
        radial-gradient(circle at 15% 0%, rgba(42, 157, 143, .16), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--profile-page-bg) 42%, #ffffff 100%);
    padding: 56px 0 80px;
    font-family: 'Inter', sans-serif;
    color: var(--profile-text);
}

.profile-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.profile-sidebar,
.profile-panel {
    border: 1px solid var(--profile-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 50px rgba(42, 157, 143, .1);
}

.profile-sidebar {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.profile-user-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--profile-primary-faint), #ffffff);
    border: 1px solid var(--profile-line);
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--profile-primary), var(--profile-primary-700));
    color: #ffffff;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 14px 28px rgba(42, 157, 143, .24);
}

.profile-eyebrow {
    margin: 0 0 6px;
    color: var(--profile-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-user-card h2 {
    margin: 0;
    color: var(--profile-ink);
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.profile-user-card p:last-child {
    margin: 4px 0 0;
    color: var(--profile-muted);
    font-size: 13px;
    word-break: break-word;
}

.profile-menu {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.profile-menu-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--profile-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}

.profile-menu-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary);
}

.profile-menu-link:hover,
.profile-menu-link.active {
    background: var(--profile-primary-soft);
    border-color: rgba(42, 157, 143, .22);
    color: var(--profile-primary-700);
    transform: translateX(3px);
}

.profile-menu-link.active i {
    background: var(--profile-primary);
    color: #ffffff;
}

.profile-panel {
    padding: 30px;
}

.profile-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.profile-panel-head h1 {
    margin: 0;
    color: var(--profile-ink);
    font-family: 'Sora', sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
}

.profile-panel-head p:not(.profile-eyebrow),
.profile-section-head p {
    margin: 8px 0 0;
    color: var(--profile-muted);
    font-size: 15px;
}

.profile-action-link,
.profile-card-action,
.profile-soft-btn,
.profile-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}

.profile-action-link {
    padding: 11px 15px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary-700);
    white-space: nowrap;
}

.profile-action-link:hover,
.profile-card-action:hover,
.profile-soft-btn:hover {
    color: var(--profile-primary-700);
    transform: translateY(-2px);
}

.profile-primary-btn {
    border: 0;
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--profile-primary), var(--profile-primary-700));
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(42, 157, 143, .2);
}

.profile-primary-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(42, 157, 143, .28);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.profile-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--profile-line);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, var(--profile-primary-faint));
}

.profile-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary);
    flex: 0 0 44px;
}

.profile-stat-card p {
    margin: 0;
    color: var(--profile-muted);
    font-size: 13px;
    font-weight: 700;
}

.profile-stat-card strong {
    display: block;
    margin-top: 5px;
    color: var(--profile-ink);
    font-family: 'Sora', sans-serif;
    font-size: 24px;
}

.profile-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-section-head h2 {
    margin: 0;
    color: var(--profile-ink);
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
}

.profile-list {
    display: grid;
    gap: 14px;
}

.enrollment-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--profile-line);
    border-radius: 16px;
    background: #ffffff;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.enrollment-card:hover {
    border-color: rgba(42, 157, 143, .35);
    box-shadow: 0 16px 34px rgba(42, 157, 143, .1);
    transform: translateY(-2px);
}

.enrollment-icon,
.profile-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary);
}

.enrollment-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.enrollment-main h3 {
    margin: 0;
    color: var(--profile-ink);
    font-size: 16px;
    font-weight: 800;
}

.profile-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 9px;
    color: var(--profile-muted);
    font-size: 13px;
}

.profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.enrollment-side {
    text-align: right;
    white-space: nowrap;
}

.enrollment-side strong {
    display: block;
    margin-bottom: 7px;
    color: var(--profile-ink);
    font-size: 18px;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary-700);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.profile-status-pending {
    background: #fff7e6;
    color: var(--profile-warning);
}

.profile-status-failed,
.profile-status-cancelled {
    background: #fff1f2;
    color: var(--profile-danger);
}

.profile-card-action {
    padding: 10px 13px;
    border: 1px solid var(--profile-line);
    color: var(--profile-primary-700);
    background: #ffffff;
    white-space: nowrap;
}

.profile-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--profile-line);
    border-radius: 16px;
    background: #ffffff;
}

.profile-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.profile-table th,
.profile-table td {
    padding: 17px 18px;
    border-bottom: 1px solid var(--profile-line);
    vertical-align: middle;
}

.profile-table th {
    background: var(--profile-primary-faint);
    color: var(--profile-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.profile-table tbody tr:last-child td {
    border-bottom: 0;
}

.profile-table-title strong {
    display: block;
    color: var(--profile-ink);
    font-size: 14px;
}

.profile-table-title span,
.profile-invoice {
    color: var(--profile-muted);
    font-size: 13px;
}

.profile-soft-btn {
    padding: 9px 13px;
    border: 1px solid var(--profile-line);
    background: var(--profile-primary-faint);
    color: var(--profile-primary-700);
    font-size: 13px;
}

.profile-form {
    border: 1px solid var(--profile-line);
    border-radius: 16px;
    background: #ffffff;
    padding: 22px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-field-full {
    grid-column: 1 / -1;
}

.profile-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--profile-ink);
    font-size: 13px;
    font-weight: 800;
}

.profile-field input {
    width: 100%;
    border: 1px solid var(--profile-line);
    border-radius: 13px;
    background: #f8fcfb;
    color: var(--profile-ink);
    padding: 13px 14px;
    outline: 0;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.profile-field input:focus {
    border-color: rgba(42, 157, 143, .65);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(42, 157, 143, .12);
}

.profile-field small {
    display: block;
    margin-top: 7px;
    color: var(--profile-danger);
    font-size: 12px;
    font-weight: 700;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.profile-alert,
.profile-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    font-weight: 700;
}

.profile-alert.success {
    border: 1px solid rgba(42, 157, 143, .24);
    background: var(--profile-primary-soft);
    color: var(--profile-primary-700);
}

.profile-security-note {
    margin: 18px 0 0;
    border: 1px solid var(--profile-line);
    background: var(--profile-primary-faint);
    color: var(--profile-text);
    font-size: 13px;
}

.profile-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
    padding: 46px 24px;
    border: 1px dashed rgba(42, 157, 143, .34);
    border-radius: 16px;
    background: var(--profile-primary-faint);
}

.profile-empty h3 {
    margin: 8px 0 0;
    color: var(--profile-ink);
    font-family: 'Sora', sans-serif;
    font-size: 19px;
}

.profile-empty p {
    margin: 0;
    color: var(--profile-muted);
}

@media (max-width: 991px) {
    .profile-page {
        padding: 38px 0 64px;
    }

    .profile-shell {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
    }

    .profile-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .profile-panel,
    .profile-sidebar {
        border-radius: 14px;
        padding: 18px;
    }

    .profile-user-card,
    .profile-panel-head,
    .enrollment-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-panel-head h1 {
        font-size: 24px;
    }

    .profile-action-link {
        width: 100%;
    }

    .profile-menu,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .enrollment-card {
        grid-template-columns: 1fr;
    }

    .enrollment-side {
        text-align: left;
    }

    .profile-card-action,
    .profile-primary-btn {
        width: 100%;
    }

    .profile-form-actions {
        justify-content: stretch;
    }
}
