.mail-main {
    min-height: calc(100vh - 56px);
    padding: 0;
    background: var(--background-color);
}

.mail-login-main {
    padding: 0;
    min-height: calc(100vh - 56px);
    background: #000;
    overflow-x: hidden;
}

.mail-split-login {
    min-height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    background: #030303;
}

.mail-mesh-panel {
    position: relative;
    min-height: calc(100vh - 56px);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: #050505;
}

.mail-mesh-panel canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mail-mesh-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 52% 42%, rgba(255, 90, 82, 0.08), transparent 38%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.02) 48%, rgba(0, 0, 0, 0.46)),
        radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.74));
    pointer-events: none;
}

.mail-mesh-copy {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: clamp(28px, 6vw, 76px);
    max-width: 520px;
}

.mail-mesh-copy span {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 128, 120, 0.88);
    font-size: 0.9rem;
    font-weight: 800;
}

.mail-mesh-copy strong {
    display: block;
    color: rgba(246, 247, 250, 0.96);
    font-size: clamp(2.2rem, 5vw, 5rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.mail-split-form-panel {
    min-width: 0;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(28px, 5vw, 72px);
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 90, 82, 0.08), transparent 36%),
        linear-gradient(180deg, #080808, #020202);
}

.mail-login-form-wrap {
    width: min(100%, 460px);
    animation: mail-card-reveal 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mail-login-panel-logo {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    margin-bottom: 28px;
    animation: mail-logo-pulse 900ms ease-out 160ms both;
}

.mail-split-form-panel h1 {
    margin: 0;
    color: #f7f7f8;
    font-size: clamp(2.8rem, 4.4vw, 4.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
}

.mail-split-form-panel p {
    margin: 16px 0 34px;
    color: rgba(237, 239, 244, 0.72);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.55;
}

.mail-split-form {
    display: grid;
    gap: 16px;
}

.mail-split-form input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    outline: 0;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.mail-split-form input::placeholder {
    color: rgba(237, 239, 244, 0.42);
}

.mail-split-form input:focus {
    border-color: rgba(255, 90, 82, 0.9);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 0 0 4px rgba(255, 90, 82, 0.15), 0 0 34px rgba(255, 90, 82, 0.18);
}

.mail-split-form button {
    min-height: 52px;
    color: #fff;
    border: 1px solid rgba(255, 90, 82, 0.46);
    border-radius: var(--radius-pill);
    background: #ef4c45;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 18px 42px rgba(201, 54, 47, 0.18);
    cursor: not-allowed;
}

.mail-login-meta {
    display: none;
}

@media (max-width: 980px) {
    .mail-split-login {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 56px);
    }

    .mail-mesh-panel {
        min-height: 34vh;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mail-split-form-panel {
        min-height: 520px;
        justify-content: center;
        padding: 34px 20px 56px;
    }

    .mail-mesh-copy {
        left: 24px;
        bottom: 24px;
    }

    .mail-mesh-copy strong {
        font-size: clamp(2rem, 11vw, 3.8rem);
    }
}

.mail-portal-hero {
    min-height: calc(100vh - 68px);
}

.mail-entry-button {
    min-height: 48px;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    color: #fff;
    border: 1px solid rgba(255, 90, 82, 0.46);
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #c9362f, #ef4c45);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 18px 42px rgba(201, 54, 47, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.mail-entry-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 22px 52px rgba(201, 54, 47, 0.24);
}

.mail-portal-cta {
    display: flex;
    justify-content: center;
    margin-top: 46px;
}

.mail-flow-card span {
    width: 34px;
    height: 24px;
    display: block;
    margin-bottom: 14px;
    border: 2px solid #ff5a52;
    border-radius: 5px;
    position: relative;
}

.mail-flow-card span::after {
    content: '';
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    height: 10px;
    border-left: 2px solid #ff5a52;
    border-bottom: 2px solid #ff5a52;
    transform: rotate(-45deg);
}

.mail-login-minimal {
    min-height: calc(100vh - 88px);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 90, 82, 0.18), rgba(255, 90, 82, 0.07) 24%, rgba(255, 90, 82, 0) 58%),
        #000;
}

.mail-login-minimal::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(760px, 96vw);
    height: min(760px, 96vw);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 90, 82, 0.16), rgba(255, 90, 82, 0.06) 36%, rgba(255, 90, 82, 0) 68%);
    filter: blur(12px);
    animation: mail-breathe 5.5s ease-in-out infinite;
    pointer-events: none;
}

.mail-login-core {
    width: min(560px, calc(100% - 32px));
    align-self: center;
    justify-self: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 0 48px;
    text-align: center;
    animation: mail-card-reveal 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mail-login-logo {
    width: 72px;
    height: 72px;
    image-rendering: pixelated;
    margin-bottom: 28px;
    animation: mail-logo-pulse 900ms ease-out 160ms both;
}

.mail-login-core h1 {
    margin: 0;
    color: var(--on-surface-text);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
}

.mail-login-core p {
    margin: 18px 0 34px;
    color: rgba(237, 239, 244, 0.76);
    font-size: clamp(1.05rem, 1.35vw, 1.22rem);
    font-weight: 600;
}

.mail-minimal-form {
    width: min(100%, 500px);
    display: grid;
    gap: 16px;
}

.mail-minimal-form input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    outline: 0;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.mail-minimal-form input::placeholder {
    color: rgba(237, 239, 244, 0.42);
}

.mail-minimal-form input:focus {
    border-color: rgba(255, 90, 82, 0.9);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 0 0 4px rgba(255, 90, 82, 0.15), 0 0 34px rgba(255, 90, 82, 0.18);
}

.mail-minimal-form button {
    min-height: 48px;
    color: #fff;
    border: 1px solid rgba(255, 90, 82, 0.46);
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #c9362f, #ef4c45);
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 18px 42px rgba(201, 54, 47, 0.18);
    cursor: not-allowed;
}

.mail-login-meta {
    width: min(980px, calc(100% - 32px));
    justify-self: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 0 34px;
}

.mail-login-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    color: rgba(237, 239, 244, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    font-weight: 700;
}

.mail-secure-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a52;
    box-shadow: 0 0 18px rgba(255, 90, 82, 0.75);
    animation: mail-secure-pulse 1.8s ease-in-out infinite;
}

@media (max-width: 900px) {
    .mail-login-core {
        padding-top: 42px;
    }
}

@keyframes mail-card-reveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mail-logo-pulse {
    0% {
        filter: drop-shadow(0 0 0 rgba(255, 90, 82, 0));
        transform: scale(0.96);
    }

    55% {
        filter: drop-shadow(0 0 24px rgba(255, 90, 82, 0.45));
        transform: scale(1.03);
    }

    100% {
        filter: drop-shadow(0 0 10px rgba(255, 90, 82, 0.12));
        transform: scale(1);
    }
}

@keyframes mail-breathe {
    0%, 100% {
        opacity: 0.68;
        transform: translate(-50%, -50%) scale(0.96);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes mail-secure-pulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

.mail-shell {
    width: min(1160px, calc(100% - 32px));
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 76px 0;
}

.mail-login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
    gap: 64px;
    align-items: stretch;
}

.mail-brand-column,
.mail-login-card {
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    background: var(--surface-color);
}

.mail-brand-column {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 46px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mail-kicker {
    margin: 0 0 16px;
    color: #ff5a52;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0;
}

.mail-brand-column h1 {
    max-width: 520px;
    margin: 0;
    color: var(--on-surface-text);
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.mail-copy {
    max-width: 520px;
    margin: 22px 0 0;
    color: var(--secondary-text);
    font-size: 1.08rem;
    line-height: 1.65;
}

.mail-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.mail-context div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--outline-color);
    border-radius: 6px;
    background: var(--background-color);
}

.mail-context span {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.mail-context strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--on-surface-text);
    font-size: 0.96rem;
}

.mail-login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.mail-card-header {
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--outline-color);
}

.mail-card-header h2 {
    margin: 0;
    color: var(--on-surface-text);
    font-size: 1.45rem;
    letter-spacing: 0;
}

.mail-card-header p,
.mail-preview-note {
    margin: 8px 0 0;
    color: var(--secondary-text);
    font-size: 0.94rem;
    line-height: 1.55;
}

.mail-field {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--on-surface-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.mail-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    color: var(--on-surface-text);
    border: 1px solid var(--outline-color);
    border-radius: 6px;
    background: var(--background-color);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mail-field input:focus {
    border-color: rgba(255, 90, 82, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 90, 82, 0.14);
}

.mail-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 22px;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.mail-options label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.mail-options input {
    width: 16px;
    height: 16px;
}

.mail-options a {
    color: #ff8a83;
    text-decoration: none;
    white-space: nowrap;
}

.mail-submit {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 90, 82, 0.34);
    border-radius: 6px;
    background: rgba(255, 90, 82, 0.16);
    font-weight: 800;
    cursor: not-allowed;
}

.mail-preview-note {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .mail-shell {
        min-height: calc(100vh - 72px);
        padding: 36px 0 64px;
    }

    .mail-login-panel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mail-brand-column {
        min-height: auto;
        padding: 28px;
    }

    .mail-brand-column h1 {
        font-size: clamp(2.3rem, 10vw, 3.5rem);
    }
}

@media (max-width: 560px) {
    .mail-shell {
        width: min(100% - 20px, 1160px);
    }

    .mail-context {
        grid-template-columns: 1fr;
    }

    .mail-login-card {
        padding: 24px;
    }

    .mail-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

.mail-app-main {
    min-height: calc(100vh - 56px);
    padding: 0;
    background: var(--background-color);
}

.mail-app-shell {
    width: min(1440px, calc(100% - 28px));
    height: calc(100vh - 92px);
    min-height: 680px;
    margin: 18px auto;
    display: grid;
    grid-template-columns: 250px minmax(360px, 0.95fr) minmax(360px, 1.15fr);
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-color);
}

.mail-rail,
.mail-list-pane,
.mail-reading-pane {
    min-width: 0;
    min-height: 0;
}

.mail-rail {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-right: 1px solid var(--outline-color);
    background: rgba(255, 255, 255, 0.02);
}

.mail-account {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.mail-account-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 6px;
    background: #c9362f;
    font-weight: 900;
}

.mail-account strong,
.mail-account span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-account strong {
    color: var(--on-surface-text);
}

.mail-account span {
    margin-top: 2px;
    color: var(--secondary-text);
    font-size: 0.78rem;
}

.mail-compose {
    min-height: 42px;
    color: #fff;
    border: 1px solid rgba(255, 90, 82, 0.48);
    border-radius: 6px;
    background: #b6322d;
    font-weight: 800;
    cursor: not-allowed;
}

.mail-folder-list {
    display: grid;
    gap: 4px;
}

.mail-folder-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    color: var(--secondary-text);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.92rem;
}

.mail-folder-list a.active,
.mail-folder-list a:hover {
    color: var(--on-surface-text);
    background: rgba(255, 255, 255, 0.07);
}

.mail-folder-list strong {
    color: inherit;
    font-size: 0.78rem;
}

.mail-labels {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mail-labels p {
    flex-basis: 100%;
    margin: 0 0 2px;
    color: var(--secondary-text);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mail-labels span {
    padding: 7px 9px;
    color: var(--on-surface-text);
    border: 1px solid var(--outline-color);
    border-radius: 999px;
    background: var(--background-color);
    font-size: 0.78rem;
}

.mail-list-pane {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--outline-color);
}

.mail-toolbar {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--outline-color);
}

.mail-toolbar h1 {
    margin: 0;
    color: var(--on-surface-text);
    font-size: 1.45rem;
}

.mail-toolbar p {
    margin: 4px 0 0;
    color: var(--secondary-text);
    font-size: 0.86rem;
}

.mail-search {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--outline-color);
    border-radius: 6px;
    background: var(--background-color);
}

.mail-search .material-symbols-outlined {
    color: var(--secondary-text);
    font-size: 1.25rem;
}

.mail-search input {
    width: 100%;
    color: var(--secondary-text);
    border: 0;
    background: transparent;
    outline: 0;
}

.mail-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--outline-color);
}

.mail-tabs button {
    min-height: 34px;
    color: var(--secondary-text);
    border: 1px solid var(--outline-color);
    border-radius: 999px;
    background: transparent;
    cursor: not-allowed;
}

.mail-tabs button.active {
    color: var(--on-surface-text);
    background: rgba(255, 255, 255, 0.07);
}

.mail-thread-list {
    overflow: auto;
    min-height: 0;
}

.mail-thread {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--outline-color);
    background: transparent;
}

.mail-thread.active {
    background: rgba(255, 90, 82, 0.08);
}

.mail-thread.unread h2,
.mail-thread.unread strong {
    color: #fff;
}

.mail-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: #4b1f1d;
    font-weight: 900;
}

.mail-thread-body {
    min-width: 0;
}

.mail-thread-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.mail-thread-row strong,
.mail-thread h2,
.mail-thread p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-thread-row strong {
    color: var(--on-surface-text);
    font-size: 0.92rem;
}

.mail-thread-row time {
    color: var(--secondary-text);
    font-size: 0.76rem;
}

.mail-thread h2 {
    margin: 4px 0;
    color: var(--on-surface-text);
    font-size: 0.95rem;
}

.mail-thread p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.85rem;
}

.mail-reading-pane {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--surface-color);
}

.mail-reading-header {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--outline-color);
}

.mail-reading-header p {
    margin: 0 0 8px;
    color: #ff8a83;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mail-reading-header h2 {
    margin: 0;
    color: var(--on-surface-text);
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.mail-reading-header span {
    display: block;
    margin-top: 12px;
    color: var(--secondary-text);
    overflow-wrap: anywhere;
}

.mail-message-card {
    margin-top: 26px;
    padding: 22px;
    color: var(--on-surface-text);
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    background: var(--background-color);
    line-height: 1.7;
}

.mail-message-card p {
    margin: 0 0 16px;
}

.mail-message-card p:last-child {
    margin-bottom: 0;
}

.mail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
}

.mail-actions button {
    min-height: 38px;
    padding: 0 14px;
    color: var(--secondary-text);
    border: 1px solid var(--outline-color);
    border-radius: 6px;
    background: var(--background-color);
    cursor: not-allowed;
}

@media (max-width: 1100px) {
    .mail-app-shell {
        height: auto;
        min-height: calc(100vh - 92px);
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .mail-reading-pane {
        grid-column: 1 / -1;
        border-top: 1px solid var(--outline-color);
    }
}

@media (max-width: 760px) {
    .mail-app-shell {
        width: min(100% - 20px, 1440px);
        display: block;
        overflow: visible;
    }

    .mail-rail,
    .mail-list-pane,
    .mail-reading-pane {
        border-right: 0;
    }

    .mail-rail,
    .mail-list-pane {
        border-bottom: 1px solid var(--outline-color);
    }

    .mail-folder-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mail-app-body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    color: var(--on-surface-text);
    background: #0a0a0b;
    font-family: 'Inter', sans-serif;
}

.mail-workspace {
    height: 100vh;
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr);
    background: #0a0a0b;
}

.mail-app-topbar {
    display: grid;
    grid-template-columns: 260px minmax(240px, 1fr) minmax(220px, auto);
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    border-bottom: 1px solid #2a2a2d;
    background: #111113;
}

.mail-app-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #f5f5f5;
    font-weight: 800;
    text-decoration: none;
}

.mail-app-brand img {
    width: 34px;
    height: 34px;
    image-rendering: pixelated;
}

.mail-app-brand span,
.mail-app-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mail-app-search {
    max-width: 580px;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #303035;
    border-radius: 7px;
    background: #060607;
}

.mail-app-search input {
    width: 100%;
    color: #d6d6d8;
    border: 0;
    background: transparent;
    outline: 0;
}

.mail-app-user {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: #9a9aa0;
    font-size: 0.88rem;
}

.mail-app-user button,
.mail-reader-toolbar button {
    min-height: 34px;
    padding: 0 12px;
    color: #cfcfd2;
    border: 1px solid #343438;
    border-radius: 6px;
    background: #171719;
    cursor: not-allowed;
}

.mail-app-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: 248px minmax(360px, 480px) minmax(420px, 1fr);
    background: #0a0a0b;
}

.mail-sidebar,
.mail-message-list,
.mail-reader {
    min-width: 0;
    min-height: 0;
}

.mail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border-right: 1px solid #2a2a2d;
    background: #151517;
}

.mail-sidebar .mail-compose {
    min-height: 42px;
    border-color: #a8322d;
    background: #b6322d;
}

.mail-sidebar .mail-folder-list a {
    color: #a6a6ad;
}

.mail-sidebar .mail-folder-list a.active,
.mail-sidebar .mail-folder-list a:hover {
    color: #fff;
    background: #2a2a2d;
}

.mail-sidebar-section {
    margin-top: auto;
    display: grid;
    gap: 7px;
}

.mail-sidebar-section p {
    margin: 0 0 3px;
    color: #77777f;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mail-sidebar-section a {
    color: #c7c7cc;
    text-decoration: none;
    font-size: 0.9rem;
}

.mail-message-list {
    overflow: auto;
    border-right: 1px solid #2a2a2d;
    background: #101012;
}

.mail-list-header {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #2a2a2d;
}

.mail-list-header h1 {
    margin: 0;
    color: #fff;
    font-size: 1.45rem;
}

.mail-list-header p {
    margin: 4px 0 0;
    color: #8e8e95;
    font-size: 0.86rem;
}

.mail-list-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mail-list-actions button {
    min-height: 34px;
    color: #b7b7bd;
    border: 1px solid #303035;
    border-radius: 999px;
    background: #171719;
    cursor: not-allowed;
}

.mail-message-list .mail-thread {
    border-bottom-color: #2a2a2d;
}

.mail-message-list .mail-thread.active {
    background: #2a1b1a;
}

.mail-reader {
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 24px 28px;
    background: #18181a;
}

.mail-reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 28px;
}

.mail-reader-header {
    padding-bottom: 22px;
    border-bottom: 1px solid #2f2f34;
}

.mail-reader-header p {
    margin: 0 0 10px;
    color: #ff8a83;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mail-reader-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
}

.mail-reader-header span {
    display: block;
    margin-top: 14px;
    color: #9a9aa0;
    overflow-wrap: anywhere;
}

.mail-reader-message {
    max-width: 760px;
    margin-top: 26px;
    padding: 26px;
    color: #eeeeef;
    border: 1px solid #2f2f34;
    border-radius: 8px;
    background: #09090a;
    font-size: 1rem;
    line-height: 1.78;
}

.mail-reader-message p {
    margin: 0 0 18px;
}

.mail-reader-message p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1120px) {
    .mail-app-body {
        overflow: auto;
    }

    .mail-workspace {
        min-height: 100vh;
        height: auto;
    }

    .mail-app-grid {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .mail-reader {
        grid-column: 1 / -1;
        min-height: 520px;
        border-top: 1px solid #2a2a2d;
    }
}

@media (max-width: 760px) {
    .mail-app-topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 14px;
    }

    .mail-workspace {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .mail-app-user {
        justify-content: space-between;
    }

    .mail-app-grid {
        display: block;
    }

    .mail-sidebar,
    .mail-message-list {
        border-right: 0;
        border-bottom: 1px solid #2a2a2d;
    }

    .mail-sidebar {
        min-height: auto;
    }

    .mail-reader {
        min-height: auto;
        padding: 22px;
    }
}
