:root {
    --petrol: #143c40;
    --jade: #247a70;
    --turquoise: #55c5b7;
    --surface: #f1f5f4;
    --border: #dce6e2;
    --text: #243f39;
    --muted: #748a82;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: white;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

button, input { font: inherit; }

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.topbar {
    height: 64px;
    background: var(--petrol);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
}

.brand, .top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand strong {
    font-size: 23px;
    letter-spacing: 5px;
}

.brand span {
    border-left: 1px solid #649b97;
    padding-left: 20px;
    color: #b7e5df;
}

.top-actions button {
    background: transparent;
    color: white;
    padding: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #d4e9e3;
    color: var(--petrol);
}

.workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 230px 340px minmax(0, 1fr);
    min-height: calc(100dvh - 94px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.compose, .login-button {
    background: var(--jade);
    color: white;
    border-radius: 7px;
    padding: 14px 18px;
}

.section-label {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--muted);
    margin: 28px 10px 12px;
}

#folders {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#folders button,
.sidebar-bottom button {
    text-align: left;
    background: transparent;
    color: var(--text);
    padding: 12px;
    border-radius: 5px;
    font-size: 14px;
}

#folders .selected {
    background: #d9eae4;
    color: var(--jade);
    font-weight: 600;
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.connection {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-size: 11px;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c18b43;
}

.status-dot.online { background: #299c76; }

.message-list {
    border-right: 1px solid var(--border);
}

.list-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.list-header input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
}

h2 {
    font-size: 19px;
    color: var(--petrol);
    margin-bottom: 0;
}

.empty-list {
    padding: 35px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.reading-pane {
    display: grid;
    place-items: center;
    padding: 35px;
    background: #fcfdfc;
}

.welcome {
    max-width: 460px;
    text-align: center;
}

.welcome-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    margin: auto;
    font-size: 40px;
    color: var(--jade);
    background: #e4f0eb;
}

.welcome h1 {
    font-size: 30px;
    font-weight: 500;
    color: var(--petrol);
}

.welcome p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

.welcome small {
    display: block;
    margin-top: 15px;
    color: var(--muted);
}

#apps-menu {
    position: absolute;
    top: 72px;
    right: 20px;
    width: min(350px, calc(100vw - 40px));
    z-index: 10;
    background: white;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 15px 40px #143c4022;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.apps-grid button {
    padding: 20px 10px;
    background: var(--surface);
    color: var(--jade);
    border-radius: 7px;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 10px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

@media (max-width: 1000px) {
    .workspace {
        grid-template-columns: 190px 260px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .workspace { grid-template-columns: 1fr; }
    .sidebar, .message-list { display: none; }
    .topbar { padding: 0 14px; }
    .brand { gap: 10px; }
    .brand strong { font-size: 17px; }
    .brand span { padding-left: 10px; }
    .top-actions { gap: 8px; }
    .welcome h1 { font-size: 25px; }
}
