:root {
    --page-bg: #ffffff;
    --surface: #eeeeee;
    --surface-muted: #f8fafc;
    --surface-soft: var(--surface-muted);
    --surface-warm: #f7f6f3;
    --surface-warm-hover: #f0ede8;
    --surface-warm-strong: var(--surface-muted);
    --surface-overlay: rgba(255, 255, 255, 0.82);
    --text-main: #434343;
    --text-muted: #676767;
    --text-subtle: #6b7280;
    --text-warm-main: var(--text-muted);
    --text-warm-strong: var(--text-warm-main);
    --text-warm-muted: #8e8881;
    --text-warm-subtle: #a09c98;
    --text-warm-dim: var(--text-warm-subtle);
    --text-warm-placeholder: var(--text-warm-subtle);
    --text-secondary: var(--page-bg);
    --border: #dddddd;
    --border-strong: var(--border);
    --border-warm: var(--border);
    --border-warm-soft: var(--border-warm);
    --border-warm-hover: #c8c2bb;
    --accent: #BB5A61;
    --accent-strong: #A12001;
    --accent-soft: var(--surface-muted);
    --editor-link: #0f3a5f;
    --editor-link-hover: #0a5c89;
    --editor-text-strong: #213244;
    --editor-text-muted: #536273;
    --editor-media-bg: #0f172a;
    --editor-checker-bg: #e2e8f0;
    --post-it-zoom-bg: #fef9e4;
    --post-it-zoom-border: #e8d48a;
    --post-it-zoom-text: var(--text-muted);
    --shadow: #10346619;
    --shadow-soft-color: rgba(16, 52, 102, 0.1);
    --shadow-thumb-color: rgba(15, 23, 42, 0.18);
    --shadow-button-hover-color: rgba(11, 42, 88, 0.22);
    --shadow-card-hover-color: rgba(0, 0, 0, 0.1);
    --shadow-inset-soft-color: rgba(15, 23, 42, 0.08);
    --shadow-editor-soft: rgba(15, 23, 42, 0.06);
    --shadow-editor-strong: rgba(15, 23, 42, 0.22);
    --editor-overlay: rgba(15, 23, 42, 0.56);
    --editor-overlay-soft: rgba(15, 23, 42, 0.46);
    --focus-ring-accent: rgba(187, 90, 97, 0.2);
    --focus-ring-accent-soft: var(--focus-ring-accent);
    --focus-ring-accent-strong: rgba(187, 90, 97, 0.45);
    --state-success-bg: #eaf8ef;
    --state-success-text: #235d35;
    --state-success-border: #b8e0c4;
    --state-success-bg-alt: var(--state-success-bg);
    --state-success-text-alt: var(--state-success-text);
    --state-success-text-strong: var(--state-success-text);
    --state-success-border-alt: var(--state-success-border);
    --state-info-bg: #eef5ff;
    --state-info-text: #1f4f8b;
    --state-info-border: #bfd7ff;
    --state-danger-bg: #fdecec;
    --state-danger-text: #8f1d2c;
    --state-danger-border: #efb8c0;
    --state-danger-bg-strong: var(--state-danger-bg);
    --state-danger-text-strong: var(--state-danger-text);
    --state-danger-border-strong: var(--state-danger-border);
    --layout-sidebar-width: 18rem;
    --layout-content-max-width: 1550px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Ensure scrolling works on all devices including mobile */
html {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Remove blue tap highlight on mobile while preserving functionality */
a,
button,
input,
select,
textarea,
label,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    background-color: var(--page-bg);
    display: flex;
    flex-direction: column;
}

.header {
    padding: 0.25rem;
}

.main,
.main-shell {
    width: 100%;
    flex: 1;
    margin: 0 auto;
    gap: 1rem;
}

.main {
    display: flex;
    flex-direction: column;
}

.main-shell {
    padding: 0.5rem 1rem 2rem;
    display: grid;
}

.page__title {
    margin: 0.4rem 0 0;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    line-height: 1.2;
}

.card {
    background: var(--page-bg);
    border: 1px solid var(--border);
    padding: 1rem;
    box-shadow: 0 14px 26px var(--shadow);
    backdrop-filter: blur(1px);
}

.card__title {
    margin: 0 0 0.7rem;
    font-size: 1.16rem;
    color: var(--text-main);
}

.placeholder-text {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.eyebrow {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.1rem;
    border: 1px solid transparent;
    background-color: var(--accent-strong);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.button:hover {
    box-shadow: 0 12px 20px var(--shadow-button-hover-color);
}

.button-secondary {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-color: var(--border-strong);
}

.buttons-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.special-page-content > :first-child {
    margin-top: 0;
}

.special-page-content > :last-child {
    margin-bottom: 0;
}

.special-page-content img,
.special-page-content iframe,
.special-page-content video,
.special-page-content table,
.special-page-content pre {
    max-width: 100%;
    height: auto;
}

.special-page-content {
    overflow-wrap: break-word;
    word-break: break-word;
}


a {
    color: var(--accent-strong);
    text-decoration: none;
}

.page-sidebar {
    display: grid;
    align-self: start;
}

.page-sidebar__card {
    width: 100%;
}

.page-sidebar__empty {
    margin: 1rem 0 0;
    padding: 0.9rem 1rem;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    background: var(--page-bg);
}

.toggle-password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password-container,
.email-container,
.limited-width {
    width: 100%;
    max-width: 400px;
}

.toggle-password-container input {
    padding-right: 2.5rem !important;
    width: 100%;
}

.toggle-password-button,
.toggle-password-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color 0.15s ease-in-out;
    line-height: 1;
    z-index: 10;
}

.toggle-password-button:hover {
    color: var(--text-main);
}

.toggle-password-icon {
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
}

.profile-avatar {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px var(--shadow-soft-color);
    background: var(--surface-soft);
    flex-shrink: 0;
}

.profile-avatar__image {
    width: 180px;
    height: 180px;
    border-radius: 999px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex: none;
}

.profile-field--profile-image-upload {
    --profile-upload-max-width: min(100%, 520px);
    --profile-upload-radius: var(--border-radius, 4px);
    max-inline-size: none;
    justify-items: center;
    text-align: center;
}

.profile-field--profile-image-upload .ea-fileupload {
    inline-size: var(--profile-upload-max-width);
}

.profile-field--profile-image-upload .ea-fileupload .input-group {
    inline-size: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-radius: var(--profile-upload-radius);
}

.profile-field--profile-image-upload .ea-fileupload .input-group :is(
    .input-group-text,
    .btn:last-child,
    .btn:last-child:hover,
    .btn:last-child:active,
    .btn:last-child:focus
) {
    border-start-end-radius: var(--profile-upload-radius);
    border-end-end-radius: var(--profile-upload-radius);
}

.profile-field--profile-image-upload .ea-fileupload .input-group .btn {
    margin: 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.role-badge--admin {
    background: var(--state-danger-bg);
    color: var(--state-danger-text);
}

.role-badge--editor {
    background: var(--state-info-bg);
    color: var(--state-info-text);
}

.role-badge--member {
    background: var(--surface-muted);
    color: var(--text-subtle);
}

@media (min-width: 900px) {
    .main-shell {
        justify-content: center;
        width: 100%;
        padding: 0.5rem 2rem 2.5rem;
        grid-template-columns: minmax(0, var(--layout-content-max-width)) var(--layout-sidebar-width);
        column-gap: 1rem;
    }

    .main-shell--no-sidebar {
        grid-template-columns: minmax(0, calc(var(--layout-content-max-width) + var(--layout-sidebar-width))) 0;
        justify-content: center;
        column-gap: 0;
    }

    .main {
        grid-column: 1;
    }

    .page-sidebar {
        margin-top: 3rem;
        grid-column: 2;
        justify-self: end;
        width: var(--layout-sidebar-width);
    }    }
