@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap");
:root {
    --paper: #fff;
    --text: #222320;
    --muted: #92938f;
    --line: #eeeeeb;
    --hover: #f5f5f3;
    --accent: #4f46e5;
    --side: #272826;
    --bg: #e6edea;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 14px;
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    cursor: pointer;
    color: inherit;
    background: none;
    border: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[contenteditable]:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
}
button:hover {
    opacity: 0.8;
}
input,
textarea,
select {
    color: var(--text);
    background: var(--paper);
}
.app-shell {
    display: grid;
    grid-template-columns: 258px 360px minmax(0, 1fr);
    gap: 6px;
    background: var(--side);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    border: 6px solid var(--side);
    border-radius: 0;
    overflow: hidden;
}
.sidebar {
    color: #ededeb;
    display: flex;
    flex-direction: column;
    padding: 23px 16px 0;
}
.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    margin: 0 10px 43px;
    font:
        750 22px Manrope,
        system-ui;
}
.brand img {
    width: 38px;
    height: 38px;
}
.brand-caption {
    display: block;
    font:
        11px "DM Sans",
        sans-serif;
    color: #a2a49e;
    margin-top: 3px;
}
.section-label {
    font-size: 10px;
    letter-spacing: 1.7px;
    color: #a2a49e;
    font-weight: 600;
    margin: 0 12px 11px;
}
.account-label {
    margin-top: 35px;
    display: flex;
    justify-content: space-between;
}
.tiny {
    font-size: 17px;
    line-height: 12px;
}
.sidebar nav button,
.account-row {
    display: flex;
    gap: 13px;
    align-items: center;
    text-align: start;
    width: 100%;
    padding: 11px 13px;
    border-radius: 9px;
    font-weight: 500;
    font-size: 13px;
}
.sidebar nav button span:first-child,
.account-row > span:first-child {
    width: 19px;
    font-size: 20px;
    line-height: 20px;
    color: #ddd;
}
.sidebar nav button.selected {
    background: #3b3c39;
}
.count {
    margin-inline-start: auto;
    font-size: 11px;
    color: #aeb0aa;
}
.sidebar nav button.selected .count {
    color: #fff;
}
.account-row .account-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #948afa;
}
.account-row small {
    font-size: 10px;
    color: #a2a49e;
    display: block;
    margin-top: 4px;
}
.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
}
.sidebar-bottom > button {
    display: flex;
    width: 100%;
    gap: 14px;
    padding: 12px 13px;
    text-align: start;
}
.sidebar-bottom > button span {
    font-size: 20px;
    width: 18px;
}
kbd {
    font-size: 10px;
    color: #a5a69f;
    background: transparent;
    padding: 2px 4px;
    border: 1px solid #55564f;
    border-radius: 4px;
    margin-inline-start: auto;
}
.profile {
    border-top: 1px solid #44453e;
    margin-top: 18px;
    padding: 19px 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.profile small {
    display: block;
    font-size: 10px;
    color: #a2a49e;
    margin-top: 4px;
}
.profile-avatar {
    background: #55594d;
    color: #f3f5e9;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.online {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #79a77d;
}
.profile .online {
    margin-inline-start: auto;
}
.mail-list,
.reader {
    background: var(--paper);
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.list-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 24px 20px 18px;
}
.list-header > div {
    flex: 1;
}
.list-header h1 {
    font:
        750 21px Manrope,
        system-ui;
    margin: 0 0 4px;
    letter-spacing: -0.7px;
}
.list-header > div > span {
    font-size: 11px;
    color: var(--muted);
}
.icon {
    width: 35px;
    height: 35px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e7e7e3;
    border-radius: 50%;
    font-size: 21px;
    flex-shrink: 0;
    color: var(--text);
}
.search-wrap {
    margin: 4px 19px 16px;
    background: var(--hover);
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 9px;
    gap: 8px;
}
.search-wrap > span {
    font-size: 23px;
    color: #9b9d96;
}
.search-wrap input {
    border: 0;
    outline: none;
    background: none;
    width: 100%;
    font-size: 12px;
}
.search-wrap kbd {
    border-color: #ddd;
}
.list-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
}
.list-controls button {
    padding: 2px 0;
}
.list-controls .active {
    color: var(--text);
    font-weight: 600;
}
.list-controls span {
    background: var(--hover);
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 10px;
}
.sort-control {
    margin-inline-start: auto;
    font-size: 10px;
}
.messages {
    overflow: auto;
    flex: 1;
    padding: 8px;
}
.message {
    display: flex;
    gap: 11px;
    border-radius: 11px;
    padding: 16px 12px;
    position: relative;
    cursor: pointer;
    min-height: 109px;
    border-bottom: 1px solid var(--line);
    outline-offset: -3px;
}
.message.selected {
    background: var(--hover);
    border-bottom-color: transparent;
}
.avatar {
    width: 33px;
    height: 33px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #00000008;
}
.message-text {
    overflow: hidden;
    flex: 1;
}
.sender-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    font-size: 12px;
}
.sender-line .sender {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    flex: 1;
    font-weight: 550;
}
.sender-line time {
    font-size: 10px;
    color: var(--muted);
}
.message.unread .sender,
.message.unread .subject {
    font-weight: 700;
}
.subject {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}
.preview {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 7px;
}
.mail-account {
    font-size: 9px;
    color: var(--muted);
}
.mail-account b {
    color: #bba576;
    float: inline-end;
}
.unread-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    inset-inline-start: 5px;
    top: 25px;
}
.select-box {
    position: absolute;
    inset-inline-start: 17px;
    top: 21px;
    opacity: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
}
.message:hover .select-box,
.select-box:checked,
.select-box:focus {
    opacity: 1;
}
.message:hover .avatar {
    opacity: 0.2;
}
.list-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    padding: 14px 20px;
    font-size: 10px;
    border-top: 1px solid var(--line);
}
.list-footer > span:last-child {
    margin-inline-start: auto;
    font-size: 17px;
}
.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 23px;
    border-bottom: 1px solid var(--line);
}
.reader-toolbar > div {
    display: flex;
    gap: 8px;
    align-items: center;
}
.reader-toolbar .icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
}
.divider {
    height: 23px;
    width: 1px;
    background: var(--line);
    margin: 0 5px;
}
.reader-content {
    overflow: auto;
    flex: 1;
    padding: 37px 45px 20px;
}
.mail-title {
    font:
        750 27px Manrope,
        system-ui;
    letter-spacing: -1px;
    line-height: 1.4;
    margin: 0 0 24px;
}
.sender-info {
    display: flex;
    gap: 13px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding-bottom: 27px;
    margin-bottom: 27px;
}
.sender-info .avatar {
    width: 39px;
    height: 39px;
}
.sender-info > div:nth-child(2) {
    flex: 1;
}
.sender-info strong {
    font-size: 12px;
}
.address-chip {
    margin-inline-start: 7px;
    padding: 3px 8px;
    background: var(--hover);
    border-radius: 20px;
    color: var(--muted);
    font-size: 10px;
}
.sender-info p {
    color: var(--muted);
    font-size: 11px;
    margin: 7px 0 0;
}
.sender-info time {
    font-size: 10px;
    color: var(--muted);
}
.mail-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    font-size: 10px;
    color: var(--muted);
}
.email-frame {
    width: 100%;
    border: 0;
    min-height: 550px;
    display: block;
}
.demo-email {
    max-width: 720px;
    margin: auto;
}
.ramp-logo {
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -2px;
    margin: 20px 0 42px;
}
.ramp-logo span {
    display: inline-block;
    transform: rotate(-20deg);
    font-size: 39px;
}
.email-label {
    background: #d8f321;
    color: #252821;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
    font-weight: 500;
}
.demo-email h2 {
    font:
        750 31px Manrope,
        system-ui;
    margin: 20px 0 12px;
    letter-spacing: -1px;
}
.demo-email > p {
    font-size: 13px;
    color: #85867f;
    line-height: 1.8;
}
.chart-card {
    background: #f5f5f2;
    border: 1px solid #e7e7e2;
    border-radius: 10px;
    padding: 22px 23px 10px;
    margin-top: 26px;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chart-header h3 {
    font:
        650 14px Manrope,
        system-ui;
    margin: 0 0 5px;
}
.chart-header small {
    font-size: 8px;
    color: #8c8d85;
}
.chart-legend {
    font-size: 8px;
    color: #8c8d85;
}
.chart-legend i {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #7a8fa6;
    border-radius: 50%;
    margin-right: 4px;
}
.chart-card svg {
    width: 100%;
    margin-top: 20px;
}
.email-tips {
    border-top: 1px solid var(--line);
    margin-top: 27px;
    padding-top: 17px;
    display: flex;
    gap: 13px;
    align-items: center;
}
.email-tips > span {
    font-size: 21px;
}
.email-tips strong {
    font-size: 12px;
}
.email-tips p {
    font-size: 11px;
    color: #85867f;
    margin: 5px 0;
    line-height: 1.6;
}
.quick-reply {
    margin: 10px 25px 21px;
    border: 1px solid #e5e5e1;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 8px 9px 8px 20px;
    gap: 8px;
}
.quick-reply input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 12px;
}
.quick-reply button {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    background: var(--hover);
    font-size: 19px;
    color: #999;
}
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #272826;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 5px 30px #0002;
    font-size: 13px;
    max-width: 90vw;
}
.toast button {
    color: #c3d58a;
    margin-left: 15px;
}
dialog {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px;
    width: min(640px, 94vw);
    background: var(--paper);
    color: var(--text);
    box-shadow: 0 30px 100px #0003;
    max-height: 90dvh;
}
dialog::backdrop {
    background: #151c1c66;
    backdrop-filter: blur(4px);
}
.modal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-heading h2 {
    font:
        700 20px Manrope,
        system-ui;
    margin: 0;
}
.form-field {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin: 13px 0;
}
.form-field input,
.form-field select,
.form-field textarea {
    display: block;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 11px;
    margin-top: 6px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}
.primary {
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 11px 18px;
    font-weight: 600;
    font-size: 12px;
}
.secondary {
    background: var(--hover);
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 12px;
}
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}
.compose-toolbar {
    background: var(--hover);
    padding: 8px;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 6px;
}
.compose-toolbar button {
    width: 29px;
    height: 27px;
}
.editor {
    min-height: 180px;
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--line);
    padding: 15px;
    outline: none;
    font-size: 14px;
    line-height: 1.7;
}
.help-text {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.7;
}
.empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--muted);
    line-height: 1.8;
}
.empty strong {
    display: block;
    color: var(--text);
    font:
        700 18px Manrope,
        system-ui;
}
.bulk {
    padding: 8px 15px;
    background: var(--hover);
    font-size: 11px;
}
.bulk button {
    margin-left: 12px;
    color: var(--accent);
}
.load-more {
    padding: 10px;
    color: var(--accent);
    font-size: 12px;
}
.mobile-menu,
.mobile-back,
.sidebar-close {
    display: none;
}
.contact-row {
    display: flex;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.contact-row small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
}
.dark {
    --paper: #202220;
    --text: #ededeb;
    --muted: #a6a89f;
    --line: #363932;
    --hover: #2e312b;
    --bg: #161a17;
}
.dark .icon,
.dark .quick-reply {
    border-color: #44473d;
}
.dark .chart-card {
    background: #2e312b;
    border-color: #44473d;
}
.dark .chart-card text {
    fill: #aaa;
}
.compact .message {
    min-height: 87px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.compact .preview {
    display: none;
}
[hidden] {
    display: none !important;
}
body[dir="rtl"] .sender-info time {
    direction: ltr;
}
body[dir="rtl"] .chart-card {
    direction: ltr;
}
@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 220px 315px minmax(0, 1fr);
    }
    .sidebar {
        padding: 22px 10px 0;
    }
    .reader-content {
        padding: 30px 25px 20px;
    }
    .reader-toolbar {
        padding: 20px 16px;
    }
    .reader-toolbar .icon {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    .reader-toolbar > div {
        gap: 5px;
    }
    .mail-title {
        font-size: 23px;
    }
    .address-chip {
        display: none;
    }
    .demo-email h2 {
        font-size: 27px;
    }
}
@media (max-width: 950px) {
    .app-shell {
        grid-template-columns: 195px 285px minmax(0, 1fr);
    }
    .reader-toolbar .divider,
    .reader-toolbar [data-action="reply-all"],
    .reader-toolbar [data-action="spam"],
    .reader-toolbar [data-action="move"],
    .reader-toolbar [data-action="snooze"] {
        display: none;
    }
    .sender-info {
        flex-wrap: wrap;
    }
    .sender-info time {
        width: 100%;
        padding-left: 50px;
    }
    .sidebar nav button,
    .account-row {
        font-size: 12px;
    }
    .brand {
        font-size: 20px;
        margin-left: 5px;
    }
    .brand img {
        width: 31px;
        height: 31px;
    }
    .reader-content {
        padding: 25px 20px;
    }
    .demo-email h2 {
        font-size: 24px;
    }
    .chart-card {
        padding: 15px;
    }
    .ramp-logo {
        margin-bottom: 30px;
    }
}
@media (max-width: 760px) {
    .app-shell {
        display: block;
        margin: 0;
        border: 0;
        border-radius: 0;
        min-height: 0;
        height: 100dvh;
    }
    .sidebar {
        display: none;
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        background: var(--side);
        z-index: 8;
        box-shadow: 10px 0 40px #0005;
    }
    .sidebar.visible {
        display: flex;
    }
    .mail-list {
        height: 100dvh;
        border-radius: 0;
    }
    .reader {
        display: none;
        height: 100dvh;
        border-radius: 0;
    }
    .reading .mail-list {
        display: none;
    }
    .reading .reader {
        display: flex;
    }
    .mobile-menu,
    .mobile-back,
    .sidebar-close {
        display: inline-grid;
    }
    .brand {
        margin-bottom: 30px;
    }
    .sidebar-close {
        margin-left: auto;
        color: #fff;
        border: 0;
    }
    .reader-content {
        padding: 28px 22px;
    }
    .reader-toolbar {
        padding: 15px;
    }
    .reader-toolbar .icon {
        width: 32px;
        height: 32px;
    }
    .list-header {
        padding: 23px 20px;
    }
    .message {
        min-height: 113px;
    }
    .quick-reply {
        margin: 10px 17px 17px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .mail-title {
        font-size: 24px;
    }
    .sender-info time {
        width: auto;
        padding-left: 0;
    }
    .demo-email h2 {
        font-size: 29px;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .message,
    button {
        transition:
            background 0.16s,
            opacity 0.16s;
    }
    .toast {
        animation: appear 0.2s ease-out;
    }
    @keyframes appear {
        from {
            opacity: 0;
            translate: 0 10px;
        }
        to {
            opacity: 1;
            translate: 0 0;
        }
    }
}
.auth-card {
    background: var(--paper);
    max-width: 430px;
    margin: 10vh auto;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 60px #0001;
}
.auth-card h1 {
    font:
        750 27px Manrope,
        system-ui;
    letter-spacing: -1px;
}
.auth-card .primary {
    width: 100%;
    margin-top: 15px;
}
@media print {
    .sidebar,
    .mail-list,
    .reader-toolbar,
    .quick-reply,
    dialog,
    .toast {
        display: none !important;
    }
    .app-shell {
        display: block;
        height: auto;
        border: 0;
        margin: 0;
        box-shadow: none;
    }
    .reader {
        display: block;
    }
    .reader-content {
        overflow: visible;
    }
}

.sidebar {
    overflow-y: auto;
}
.brand {
    margin-bottom: 30px;
}
.account-label {
    margin-top: 24px;
}
.sidebar-bottom {
    padding-top: 12px;
}
.sidebar-bottom > button {
    padding-top: 10px;
    padding-bottom: 10px;
}
.profile {
    margin-top: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.demo-email {
    direction: ltr;
    text-align: left;
}
.icon svg,
.sidebar nav svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.account-row .account-dot {
    display: block;
    flex: 0 0 8px;
    height: 8px;
}

.sidebar-bottom svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-logout {
    margin-inline-start: auto;
    font-size: 21px;
    color: #d8dbcf;
}
.profile > div:nth-child(2) {
    min-width: 0;
}
.profile #profile-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
