/* ==========================================
   LOSTVERSE
   PROFILE STYLESHEET
   Member Account & Privacy Management
========================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

/* ==========================================
   01. DESIGN SYSTEM
========================================== */

:root {
    --navy: #101a30;
    --navy-dark: #0b192e;

    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #eff6ff;

    --text: #17233d;
    --muted: #64748b;

    --border: #e2e8f0;
    --background: #f4f6fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --success: #15803d;
    --danger: #b91c1c;
    --warning: #92400e;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);

    --transition: 180ms ease;

    --font:
        'Noto Sans Thai',
        Tahoma,
        sans-serif;
}

/* ==========================================
   02. GLOBAL RESET
========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;

    background: var(--background);
    color: var(--navy);
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #93b4ed;
    outline-offset: 3px;
}

img {
    max-width: 100%;
}

svg {
    width: 20px;
    height: 20px;

    vertical-align: middle;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;
}

::selection {
    background: #dbeafe;
    color: var(--navy);
}

/* ==========================================
   03. TOP NAVIGATION
========================================== */

.topbar {
    position: relative;

    background: var(--surface);

    border-bottom:
        1px solid var(--border);
}

.topbar nav {
    max-width: 1160px;
    min-height: 70px;

    margin: auto;
    padding: 12px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.brand {
    display: inline-flex;
    flex-direction: column;

    flex-shrink: 0;

    color: var(--navy);

    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.4px;
}

.brand small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 24px;

    font-size: 13px;
    font-weight: 600;
}

.nav-links a {
    white-space: nowrap;

    transition:
        color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue);
}

.nav-links button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px;

    border: 0;
    border-radius: 8px;

    background: transparent;
}

.nav-links button:hover {
    background: #f1f5f9;
}

/* ==========================================
   04. PAGE CONTAINER
========================================== */

.profile-container {
    width: 100%;
    max-width: 1160px;

    margin: 30px auto;
    padding: 0 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    color: var(--muted);
    font-size: 12px;
}

.breadcrumb a:hover {
    color: var(--blue);
}

.page-heading {
    margin: 24px 0 28px;
}

.page-heading h1 {
    margin: 0 0 6px;

    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.5px;
}

.page-heading p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
}

/* ==========================================
   05. PROFILE LAYOUT
========================================== */

.profile-layout {
    display: grid;

    grid-template-columns:
        265px minmax(0, 1fr);

    gap: 24px;

    align-items: start;
}

.profile-sidebar,
.panel {
    min-width: 0;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.profile-sidebar {
    position: sticky;
    top: 24px;

    overflow: hidden;
}

.profile-content {
    display: grid;

    min-width: 0;

    gap: 24px;
}

/* ==========================================
   06. MEMBER CARD
========================================== */

.member-card {
    padding: 30px 20px 24px;

    text-align: center;

    border-bottom:
        1px solid var(--border);
}

.avatar {
    width: 84px;
    height: 84px;

    margin: 0 auto 16px;

    display: grid;
    place-items: center;

    border: 3px solid #ffffff;
    border-radius: 50%;

    background: #e7eefb;
    color: #245bd5;

    box-shadow:
        0 0 0 1px #dbe5f5;

    font-size: 30px;
    font-weight: 700;

    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.member-card h2 {
    margin: 0 0 6px;

    color: var(--navy);

    font-size: 18px;
    font-weight: 700;

    overflow-wrap: anywhere;
}

.member-label {
    display: inline-block;

    color: var(--muted);

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
}

#joinedDate {
    margin: 10px 0 0;

    color: var(--muted);
    font-size: 12px;
}

/* ==========================================
   07. SIDEBAR NAVIGATION
========================================== */

.sidebar-links {
    display: grid;

    padding: 12px;

    gap: 5px;
}

.sidebar-links a,
.sidebar-links button {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 10px;

    padding: 12px 14px;

    border: 0;
    border-radius: var(--radius-sm);

    background: #ffffff;
    color: var(--text);

    font-size: 13px;
    font-weight: 500;

    text-align: left;

    transition:
        background var(--transition),
        color var(--transition);
}

.sidebar-links a:hover,
.sidebar-links button:not(:disabled):hover {
    background: #f1f5f9;
}

.sidebar-links .selected {
    background: #edf3ff;
    color: var(--blue);

    font-weight: 600;
}

.sidebar-links svg {
    width: 18px;
    height: 18px;
}

.sidebar-links .logout {
    margin-top: 8px;

    color: var(--danger);

    border-top:
        1px solid var(--border);
}

.sidebar-links .logout:not(:disabled):hover {
    background: #fef2f2;
}

.sidebar-links .admin-link {
    color: var(--blue);
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;

    margin: 6px 4px;

    background: var(--border);
}

/* ==========================================
   08. CONTENT PANELS
========================================== */

.panel {
    padding: 28px;

    scroll-margin-top: 24px;
}

.panel h2 {
    margin: 0 0 8px;

    color: var(--navy);

    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.panel h3 {
    margin: 0 0 8px;

    font-size: 15px;
    font-weight: 600;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 12px;

    margin-bottom: 20px;
}

.panel-header h2,
.panel-header p {
    margin: 0;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.panel > .muted {
    margin: 0;
}

hr {
    height: 1px;

    margin: 24px 0;

    border: 0;

    background: var(--border);
}

/* ==========================================
   09. PROFILE FORM
========================================== */

.profile-content form {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.profile-content label {
    margin-bottom: 8px;

    color: var(--text);

    font-size: 13px;
    font-weight: 600;
}

.profile-content input:not([type="checkbox"]):not([type="radio"]),
.profile-content select,
.profile-content textarea {
    width: 100%;
    min-width: 0;

    margin-bottom: 18px;
    padding: 11px 13px;

    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);

    background: #ffffff;
    color: var(--navy);

    font-size: 14px;

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.profile-content input:not([type="checkbox"]):not([type="radio"]),
.profile-content select {
    min-height: 44px;
}

.profile-content textarea {
    min-height: 110px;

    resize: vertical;
}

.profile-content input:focus,
.profile-content select:focus,
.profile-content textarea:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .09);
}

.profile-content input[readonly],
.profile-content input:disabled,
.profile-content select:disabled,
.profile-content textarea:disabled {
    background: #f1f5f9;
    color: var(--muted);
}

.profile-content input::placeholder,
.profile-content textarea::placeholder {
    color: #94a3b8;
}

.profile-content input[type="checkbox"],
.profile-content input[type="radio"] {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    accent-color: var(--blue);
}

.profile-content form small {
    margin: -10px 0 20px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.7;
}

.profile-content input[aria-invalid="true"],
.profile-content textarea[aria-invalid="true"] {
    border-color: #dc2626;
}

.form-field {
    display: grid;

    gap: 7px;

    min-width: 0;

    margin-bottom: 18px;
}

.form-field label,
.form-field input,
.form-field select,
.form-field textarea {
    margin: 0;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}

/* ==========================================
   10. BUTTONS
========================================== */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 12px;
}

.primary,
.secondary,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 13px;
    font-weight: 600;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.primary {
    background: var(--blue);
    color: #ffffff;
}

.primary:not(:disabled):hover {
    background: var(--blue-dark);
}

.secondary {
    border-color: var(--border);

    background: #ffffff;
    color: var(--text);
}

.secondary:not(:disabled):hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.danger-button {
    border-color: #fecaca;

    background: #fef2f2;
    color: var(--danger);
}

.danger-button:not(:disabled):hover {
    background: #fee2e2;
}

.text-button {
    padding: 5px 0;

    border: 0;

    background: transparent;
    color: var(--blue);

    font-size: 13px;
    font-weight: 600;
}

.text-button:hover {
    text-decoration: underline;
}

/* ==========================================
   11. PRIVACY SETTINGS
========================================== */

.privacy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 0;

    border-bottom:
        1px solid var(--border);
}

.privacy-row:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.privacy-row > div {
    min-width: 0;
}

.privacy-row strong {
    color: var(--text);

    font-size: 14px;
    font-weight: 600;
}

.privacy-row p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

.privacy-row button,
.privacy-row .status {
    flex-shrink: 0;
}

.privacy-notice {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    margin: 16px 0;
    padding: 14px 16px;

    border: 1px solid #dbeafe;
    border-radius: var(--radius-sm);

    background: #eff6ff;
    color: #1e40af;

    font-size: 12px;
    line-height: 1.8;
}

.privacy-notice p {
    margin: 0;
}

/* ==========================================
   12. STATUS LABELS
========================================== */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    width: fit-content;

    padding: 5px 10px;

    border-radius: 6px;

    background: #f1f5f9;
    color: #475569;

    font-size: 12px;
    font-weight: 500;

    white-space: nowrap;
}

.status.success,
.status.verified,
.status.approved,
.status.resolved,
.status.completed {
    background: #dcfce7;
    color: #166534;
}

.status.info,
.status.active,
.status.reviewing {
    background: #eff6ff;
    color: #1d4ed8;
}

.status.warning,
.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.danger,
.status.rejected,
.status.suspended {
    background: #fee2e2;
    color: #b91c1c;
}

.status.closed,
.status.cancelled,
.status.dismissed {
    background: #f1f5f9;
    color: #64748b;
}

/* ==========================================
   13. ACCOUNT VERIFICATION
========================================== */

.verification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    padding: 16px 0;

    border-bottom:
        1px solid var(--border);
}

.verification-row:last-child {
    border-bottom: 0;
}

.verification-info {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}

.verification-info > div {
    min-width: 0;
}

.verification-info strong {
    display: block;

    font-size: 13px;

    overflow-wrap: anywhere;
}

.verification-info small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 12px;
}

.verification-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eff6ff;
    color: var(--blue);
}

/* ==========================================
   14. REPUTATION SUMMARY
========================================== */

.reputation-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    margin: 18px 0;
}

.reputation-stat {
    min-width: 0;

    padding: 18px 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: #f8fafc;
}

.reputation-stat span {
    display: block;

    color: var(--muted);

    font-size: 12px;
}

.reputation-stat strong {
    display: block;

    margin-top: 8px;

    color: var(--navy);

    font-size: 28px;
    font-weight: 700;

    font-variant-numeric: tabular-nums;
}

.reputation-stat small {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.reputation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin-top: 12px;
    padding: 5px 10px;

    border: 1px solid #bbf7d0;
    border-radius: 6px;

    background: #f0fdf4;
    color: #166534;

    font-size: 11px;
    font-weight: 600;
}

.reputation-badge svg {
    width: 15px;
    height: 15px;
}

.reputation-description {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.8;
}

/* ==========================================
   15. MEMBER STATISTICS
========================================== */

.member-stats {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-top: 18px;
}

.member-stat {
    min-width: 0;

    padding: 10px 8px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: #f8fafc;
}

.member-stat strong {
    display: block;

    color: var(--navy);

    font-size: 20px;
    font-weight: 700;
}

.member-stat span {
    display: block;

    color: var(--muted);

    font-size: 11px;
}

/* ==========================================
   16. ACTIVITY & RETURN HISTORY
========================================== */

.activity-list,
.return-history,
.reputation-history {
    display: grid;

    gap: 0;
}

.activity-item,
.return-history-item,
.reputation-history-item {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 16px 0;

    border-bottom:
        1px solid var(--border);
}

.activity-item:last-child,
.return-history-item:last-child,
.reputation-history-item:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eff6ff;
    color: var(--blue);
}

.activity-icon.success {
    background: #dcfce7;
    color: var(--success);
}

.activity-icon.warning {
    background: #fef3c7;
    color: var(--warning);
}

.activity-icon.danger {
    background: #fee2e2;
    color: var(--danger);
}

.activity-content {
    flex: 1;

    min-width: 0;
}

.activity-content strong {
    display: block;

    font-size: 13px;
    font-weight: 600;

    overflow-wrap: anywhere;
}

.activity-content p {
    margin: 4px 0;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.7;

    overflow-wrap: anywhere;
}

.activity-content time,
.activity-content small {
    color: var(--muted);

    font-size: 11px;
}

.activity-value {
    flex-shrink: 0;

    font-size: 15px;
    font-weight: 700;
}

.activity-value.positive {
    color: var(--success);
}

.activity-value.negative {
    color: var(--danger);
}

/* ==========================================
   17. BLOCKED MEMBERS
========================================== */

.blocked-members-list {
    display: grid;

    gap: 10px;
}

.blocked-member {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    padding: 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.blocked-member-info {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}

.blocked-member-info > div {
    min-width: 0;
}

.blocked-member-avatar {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #e7eefb;
    color: var(--blue);

    font-weight: 700;
}

.blocked-member-info strong {
    display: block;

    font-size: 13px;

    overflow-wrap: anywhere;
}

.blocked-member-info small {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.blocked-member button {
    flex-shrink: 0;
}

/* ==========================================
   18. PRIVACY REQUESTS
========================================== */

.privacy-request-list {
    display: grid;

    gap: 12px;

    margin-top: 18px;
}

.privacy-request-card {
    min-width: 0;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: #ffffff;
}

.privacy-request-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 10px;
}

.privacy-request-header strong {
    font-size: 14px;

    overflow-wrap: anywhere;
}

.privacy-request-card p {
    margin: 10px 0;

    color: #475569;

    font-size: 13px;
    line-height: 1.8;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.privacy-request-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 16px;

    color: var(--muted);

    font-size: 11px;
}

.privacy-request-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 14px;
}

.request-description {
    margin: 0 0 16px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.8;
}

/* ==========================================
   19. REPORT HISTORY
========================================== */

.report-history-list {
    display: grid;

    gap: 12px;
}

.report-history-item {
    min-width: 0;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.report-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 10px;
}

.report-history-header strong {
    font-size: 13px;
}

.report-history-item p {
    margin: 8px 0;

    color: #475569;

    font-size: 12px;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

.report-history-item time {
    color: var(--muted);

    font-size: 11px;
}

/* ==========================================
   20. ACCOUNT RESTRICTIONS
========================================== */

.suspension-notice {
    padding: 18px;

    border: 1px solid #fecaca;
    border-radius: var(--radius-md);

    background: #fef2f2;
    color: var(--danger);
}

.suspension-notice h3 {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 0 0 8px;

    font-size: 15px;
}

.suspension-notice p {
    margin: 6px 0;

    font-size: 13px;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

.suspension-notice small {
    display: block;

    margin-top: 10px;

    font-size: 12px;
}

/* ==========================================
   21. ACCOUNT SECURITY
========================================== */

.security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 18px 0;

    border-bottom:
        1px solid var(--border);
}

.security-row:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.security-row > div {
    min-width: 0;
}

.security-row strong {
    font-size: 13px;
}

.security-row p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.8;
}

.security-row button {
    flex-shrink: 0;
}

/* ==========================================
   22. ACCOUNT DELETION REQUEST
========================================== */

.danger-zone {
    border-color: #fecaca;
}

.danger-zone h2 {
    color: var(--danger);
}

.danger-zone-description {
    color: #64748b;

    font-size: 13px;
    line-height: 1.8;
}

.danger-zone-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;
}

/* ==========================================
   23. SYSTEM MESSAGES
========================================== */

#message:empty,
.profile-message:empty {
    display: none;
}

#message,
.profile-message {
    padding: 13px 14px;
    margin: 16px 0 0;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 13px;
    line-height: 1.8;

    overflow-wrap: anywhere;
}

#message.success,
.profile-message.success {
    border-color: #bbf7d0;

    background: #f0fdf4;
    color: #166534;
}

#message.error,
.profile-message.error {
    border-color: #fecaca;

    background: #fef2f2;
    color: #b91c1c;
}

#message.warning,
.profile-message.warning {
    border-color: #fde68a;

    background: #fffbeb;
    color: #92400e;
}

#message.info,
.profile-message.info {
    border-color: #bfdbfe;

    background: #eff6ff;
    color: #1e40af;
}

.field-error {
    color: var(--danger);

    font-size: 12px;
    line-height: 1.7;

    overflow-wrap: anywhere;
}

/* ==========================================
   24. EMPTY STATES
========================================== */

.profile-empty {
    display: grid;
    justify-items: center;

    gap: 8px;

    padding: 32px 16px;

    color: var(--muted);

    text-align: center;
}

.profile-empty svg {
    width: 36px;
    height: 36px;

    margin-bottom: 4px;

    color: #94a3b8;
}

.profile-empty h3 {
    margin: 0;

    color: var(--text);

    font-size: 15px;
}

.profile-empty p {
    margin: 0;

    font-size: 12px;
    line-height: 1.8;
}

/* ==========================================
   25. LOADING STATES
========================================== */

.profile-loading {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 28px 16px;

    color: var(--muted);

    font-size: 13px;
}

.profile-spinner {
    width: 20px;
    height: 20px;

    flex-shrink: 0;

    border: 2px solid #dbeafe;
    border-top-color: var(--blue);
    border-radius: 50%;

    animation:
        profile-spin .8s linear infinite;
}

@keyframes profile-spin {

    to {
        transform: rotate(360deg);
    }

}

/* ==========================================
   26. PROFILE DIALOG
========================================== */

.profile-dialog {
    width: min(560px, calc(100% - 32px));

    max-height: 88vh;
    max-height: 88dvh;

    padding: 26px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: #ffffff;
    color: var(--navy);

    overflow-y: auto;

    overscroll-behavior: contain;

    box-shadow:
        0 24px 70px rgba(15, 23, 42, .18);
}

.profile-dialog::backdrop {
    background: rgba(15, 23, 42, .55);

    backdrop-filter: blur(3px);
}

.profile-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 18px;
}

.profile-dialog-header h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 700;
}

.profile-dialog-close {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f1f5f9;
    color: var(--muted);

    font-size: 22px;
}

.profile-dialog-close:hover {
    background: #e2e8f0;
}

.profile-dialog-description {
    margin: 0 0 18px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.8;
}

.profile-dialog form {
    display: grid;

    gap: 10px;
}

.profile-dialog label {
    font-size: 13px;
    font-weight: 600;
}

.profile-dialog input:not([type="checkbox"]):not([type="radio"]),
.profile-dialog select,
.profile-dialog textarea {
    width: 100%;
    min-width: 0;

    padding: 11px 13px;

    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);

    background: #ffffff;
    color: var(--navy);

    outline: none;
}

.profile-dialog input:focus,
.profile-dialog select:focus,
.profile-dialog textarea:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .09);
}

.profile-dialog textarea {
    min-height: 110px;

    resize: vertical;
}

.profile-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;
    padding-top: 18px;

    border-top:
        1px solid var(--border);
}

.profile-dialog-error {
    margin: 0;

    color: var(--danger);

    font-size: 12px;
    line-height: 1.7;
}

/* ==========================================
   27. PAGINATION
========================================== */

.profile-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;
}

.profile-pagination button {
    min-width: 36px;
    min-height: 36px;

    padding: 7px 12px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: #ffffff;
    color: var(--text);

    font-size: 12px;
}

.profile-pagination button:not(:disabled):hover {
    background: #eff6ff;
    color: var(--blue);
}

.profile-pagination button.active {
    border-color: var(--blue);

    background: var(--blue);
    color: #ffffff;
}

/* ==========================================
   28. FOOTER
========================================== */

footer {
    max-width: 1160px;

    margin: auto;
    padding: 24px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.8;
}

.profile-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px 18px;

    margin-top: 8px;
}

.profile-footer-links a:hover {
    color: var(--blue);
}

/* ==========================================
   29. TABLET RESPONSIVE
========================================== */

@media (max-width: 1000px) {

    .profile-layout {
        grid-template-columns:
            230px minmax(0, 1fr);

        gap: 18px;
    }

    .profile-content {
        gap: 18px;
    }

    .panel {
        padding: 22px;
    }

    .reputation-summary {
        gap: 8px;
    }

    .reputation-stat {
        padding: 14px 12px;
    }

    .reputation-stat strong {
        font-size: 24px;
    }

}

/* ==========================================
   30. MOBILE RESPONSIVE
========================================== */

@media (max-width: 760px) {

    .topbar nav {
        min-height: 64px;

        padding: 12px 16px;

        gap: 12px;

        flex-wrap: wrap;
    }

    .brand {
        font-size: 20px;
    }

    .brand small {
        font-size: 10px;
    }

    .nav-links {
        gap: 12px;

        font-size: 12px;
    }

    .profile-container {
        margin-top: 20px;
        padding: 0 16px;
    }

    .page-heading {
        margin: 20px 0;
    }

    .page-heading h1 {
        font-size: 26px;
    }

    .page-heading p {
        font-size: 13px;
    }

    .profile-layout {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .profile-sidebar {
        position: static;
    }

    .member-card {
        padding: 24px 18px;
    }

    .sidebar-links {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 6px;
    }

    .sidebar-links a,
    .sidebar-links button {
        padding: 11px 12px;

        font-size: 12px;
    }

    .sidebar-links .logout {
        margin-top: 0;

        border-top: 0;
    }

    .sidebar-divider {
        grid-column: 1 / -1;
    }

    .panel {
        padding: 20px;
    }

    .panel h2 {
        font-size: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .profile-content input:not([type="checkbox"]):not([type="radio"]),
    .profile-content select,
    .profile-content textarea {
        font-size: 16px;
    }

    .privacy-row,
    .security-row,
    .verification-row {
        gap: 12px;
    }

    .reputation-summary {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    footer {
        padding: 20px 16px;
    }

}

/* ==========================================
   31. SMALL MOBILE
========================================== */

@media (max-width: 480px) {

    .profile-container {
        padding: 0 12px;
    }

    .topbar nav {
        padding: 12px;
    }

    .nav-links {
        gap: 10px;

        font-size: 11px;
    }

    .brand {
        font-size: 19px;
    }

    .panel {
        padding: 18px 16px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .privacy-row,
    .security-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .privacy-row > div,
    .security-row > div {
        flex: 1 1 180px;
    }

    .status {
        font-size: 11px;
    }

    .reputation-summary {
        grid-template-columns: 1fr;
    }

    .reputation-stat {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr) auto;

        align-items: center;

        gap: 4px 10px;
    }

    .reputation-stat strong {
        margin: 0;

        font-size: 24px;
    }

    .reputation-stat small {
        grid-column: 1 / -1;

        margin: 0;
    }

    .form-actions .primary {
        width: 100%;
    }

    .blocked-member {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .blocked-member-info {
        flex: 1 1 160px;
    }

    .privacy-request-card {
        padding: 14px;
    }

    .profile-dialog {
        width: calc(100% - 24px);

        max-height: 92dvh;

        padding: 18px;
    }

    .profile-dialog-header h2 {
        font-size: 18px;
    }

    .profile-dialog-actions button {
        flex: 1;
    }

    .danger-zone-actions button {
        width: 100%;
    }

}

/* ==========================================
   32. ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

}