:root {
    --background: #f6f1e8;
    --surface: #fffdf9;
    --surface-muted: #faf5ee;
    --border: #e7d3bb;
    --border-strong: #efc8aa;
    --text: #1f2937;
    --text-muted: #687386;
    --accent: #f05a00;
    --accent-dark: #c74700;
    --shadow: 0 2px 8px rgba(77, 54, 35, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 35%),
        var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

img,
svg {
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    border-bottom: 1px solid rgba(180, 146, 111, 0.2);
    background: rgba(255, 253, 249, 0.86);
    backdrop-filter: blur(14px);
}

.site-header__inner,
.page-shell,
.site-footer__inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand__mark {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    flex: 0 0 46px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    color: var(--accent-dark);
    background: linear-gradient(145deg, #fff3e8, #ffd9bf);
    box-shadow: 0 6px 14px rgba(240, 90, 0, 0.14);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand__mark img,
.brand__mark picture,
.brand__mark picture img,
.brand__mark svg {
    width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    max-height: 32px !important;
    display: block !important;
    object-fit: contain;
}

.brand__name,
.brand__tagline {
    display: block;
}

.brand__name {
    font-size: 1.05rem;
}

.brand__tagline {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.header-link {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.account-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.account-placeholder__avatar {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--accent-dark);
    background: #fff5ed;
    font-weight: 700;
}

.account-placeholder__avatar img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: block !important;
    object-fit: cover;
}

.profile-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.profile-link__avatar,
.profile-link__initial {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: #fff5ed;
    color: var(--accent-dark);
    font-weight: 800;
}

.profile-link__avatar {
    display: block;
    object-fit: cover;
}

.profile-link__initial {
    display: grid;
    place-items: center;
}

.profile-link img,
.profile-link picture,
.profile-link picture img,
.profile-link__avatar img {
    width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    display: block !important;
    border-radius: 50%;
    object-fit: cover;
}

.profile-link__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-link__text small {
    color: var(--text-muted);
}

.page-shell {
    padding: 54px 0 70px;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 30px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.dashboard-heading p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 1.04rem;
}

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

.module-card {
    min-height: 248px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 253, 249, 0.96);
    box-shadow: var(--shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 26px rgba(77, 54, 35, 0.1);
}

.module-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.module-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 11px;
    border: 1px solid #ffd3b8;
    border-radius: 999px;
    color: #a84616;
    background: #fff5ed;
    font-size: 0.75rem;
    font-weight: 700;
}

.module-card__icon,
.module-card__graphic {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    color: var(--accent);
    background: #fff4ea;
}

.module-card__icon {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
    color: var(--accent-dark);
    background: #fff3e8;
}

.module-card__graphic img,
.module-card__graphic picture,
.module-card__graphic picture img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: block !important;
    padding: 6px;
    object-fit: contain;
}

.module-icon,
.module-card__icon svg,
.module-card__graphic svg {
    width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    max-height: 30px !important;
    display: block;
}

.module-card h2 {
    margin: 16px 0 8px;
    font-size: 1.08rem;
    line-height: 1.3;
}

.module-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.module-card__footer {
    margin-top: 24px;
}

.module-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 750;
    text-decoration: none;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.module-card__action--access {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 6px 14px rgba(240, 90, 0, 0.19);
}

.module-card__action--access:hover {
    transform: translateY(-1px);
    background: var(--accent-dark);
}

.module-card__action--purchase {
    border: 1px solid var(--border-strong);
    color: var(--accent-dark);
    background: #fff9f4;
}

.module-card__action--purchase:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: #fff3e9;
}

.module-card__action--disabled {
    color: #8c96a5;
    background: #f1f3f5;
    cursor: not-allowed;
}

.empty-state {
    padding: 40px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(180, 146, 111, 0.2);
    color: var(--text-muted);
    background: rgba(255, 253, 249, 0.6);
    font-size: 0.84rem;
}

.site-footer__inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-admin-link {
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    height: 25px;
    min-height: 25px;
    max-height: 25px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-muted);
}

.footer-admin-link svg,
.footer-admin-link img {
    width: 14px !important;
    max-width: 14px !important;
    height: 14px !important;
    max-height: 14px !important;
    display: block !important;
    object-fit: contain;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.profile-shell {
    max-width: 760px;
}

.profile-form {
    margin-top: 24px;
}

.profile-avatar-large {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    height: 110px;
    min-height: 110px;
    max-height: 110px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #fff4ea;
    color: var(--accent);
    font-size: 2rem;
    font-weight: 800;
}

.profile-avatar-large img,
.profile-avatar-large picture,
.profile-avatar-large picture img {
    width: 110px !important;
    max-width: 110px !important;
    height: 110px !important;
    max-height: 110px !important;
    display: block !important;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 940px) {
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .page-shell,
    .site-footer__inner {
        width: min(100% - 24px, 1280px);
    }

    .site-header__inner {
        min-height: 76px;
    }

    .brand__tagline,
    .account-placeholder__text,
    .profile-link__text {
        display: none;
    }

    .page-shell {
        padding-top: 34px;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .module-card {
        min-height: 220px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}
