:root {
    --bg: #c8d4c2;
    --shell: #f7f7f6;
    --sidebar: #f3f3f1;
    --text: #252a28;
    --muted: #7d8580;
    --line: #e7e7e2;
    --shadow: 0 22px 55px rgba(42, 55, 45, 0.18);
    --yellow: #fff3af;
    --blue: #cfeef2;
    --pink: #ffd5d8;
    --orange: #ffd0a0;
    --gray: #e9e9e7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #d8e1d1 0, var(--bg) 55%, #b8c6b1 100%);
    color: var(--text);
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 420px);
    padding: 34px;
    border-radius: 8px;
    background: rgba(247, 247, 246, 0.96);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.02;
    letter-spacing: 0;
}

.login-copy {
    margin: 14px 0 24px;
    color: #59625c;
    line-height: 1.55;
}

.login-form,
.panel-form {
    display: grid;
    gap: 15px;
}

label {
    display: grid;
    gap: 7px;
    color: #4c554f;
    font-size: 13px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #dfdfda;
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

input,
select {
    min-height: 42px;
    padding: 0 12px;
}

textarea {
    resize: vertical;
    padding: 11px 12px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #a9b8a3;
    box-shadow: 0 0 0 3px rgba(169, 184, 163, 0.24);
}

.primary-button,
.secondary-button,
.ghost-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0 16px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
}

.primary-button {
    background: #252a28;
    color: #ffffff;
}

.secondary-button {
    background: #d9e8dd;
    color: #263129;
}

.ghost-button {
    background: #ffffff;
    color: #505a54;
    border: 1px solid #e1e1dc;
}

.app-shell {
    width: min(100% - 40px, 1040px);
    min-height: min(82vh, 720px);
    margin: 46px auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    overflow: hidden;
    border-radius: 8px;
    background: var(--shell);
    box-shadow: var(--shadow);
}

.sidebar {
    display: grid;
    grid-template-rows: auto auto auto auto auto 1fr;
    gap: 18px;
    padding: 26px 18px 22px;
    border-right: 1px solid var(--line);
    background: rgba(243, 243, 241, 0.88);
}

.sidebar-top,
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar h2 {
    margin: 0;
    font-size: 20px;
}

.menu-mark {
    color: #8b928d;
    font-weight: 900;
}

.search-box {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #ecece8;
    border-radius: 6px;
    background: #f8f8f7;
    color: #969d98;
}

.search-box input {
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
}

.nav-section {
    display: grid;
    gap: 8px;
}

.nav-section p {
    margin: 0 0 3px;
    color: #737c76;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-item,
.nav-button {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #515a55;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.nav-item strong,
.nav-button strong {
    font-size: 13px;
}

.nav-item em {
    font-style: normal;
    color: #7d8580;
    font-size: 12px;
    font-weight: 800;
}

.nav-item.active,
.nav-button:hover,
.nav-item:hover {
    background: #ececea;
}

.nav-item.muted {
    cursor: default;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.dot.yellow {
    background: #e9c875;
}

.dot.blue {
    background: #acd9dc;
}

.dot.orange {
    background: #efc074;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
}

.tag {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 900;
}

.tag.blue {
    background: var(--blue);
}

.tag.pink {
    background: var(--pink);
}

.sidebar-footer {
    align-self: end;
    display: grid;
    gap: 6px;
}

.content {
    padding: 26px 30px 34px;
    overflow: auto;
}

.content-header {
    margin-bottom: 28px;
}

.content-header h1 {
    font-size: clamp(34px, 5vw, 42px);
}

.user-badge {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #252a28;
    color: #ffffff;
    font-weight: 900;
}

.alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 800;
}

.alert-success {
    background: #dff0e4;
    color: #1d6a39;
}

.alert-error {
    background: #ffe1e2;
    color: #9f2730;
}

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

.note {
    position: relative;
    min-height: 230px;
    padding: 22px 18px;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(44, 48, 45, 0.06);
}

.note-yellow {
    background: var(--yellow);
}

.note-blue {
    background: var(--blue);
}

.note-pink {
    background: var(--pink);
}

.note-orange {
    background: var(--orange);
}

.note-gray {
    background: var(--gray);
}

.note h2 {
    margin: 0 32px 12px 0;
    font-size: 19px;
}

.note p {
    margin: 0;
    color: #3f4944;
    font-size: 13px;
    line-height: 1.45;
}

.note time {
    position: absolute;
    left: 18px;
    bottom: 16px;
    color: #6d756f;
    font-size: 11px;
    font-weight: 800;
}

.delete-form {
    position: absolute;
    top: 10px;
    right: 10px;
}

.delete-form button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    color: #353b38;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.note-add {
    display: grid;
    gap: 12px;
    background: var(--gray);
}

.plus {
    justify-self: center;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #252a28;
    font-size: 56px;
    font-weight: 200;
    line-height: 1;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

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

.panel-form,
.empty-panel {
    padding: 22px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.panel-form h2,
.empty-panel h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.empty-panel p {
    color: #667069;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
        margin: 18px auto;
        width: min(100% - 20px, 680px);
    }

    .sidebar {
        grid-template-rows: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-footer {
        align-self: auto;
    }

    .notes-grid,
    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .login-card,
    .content {
        padding: 22px;
    }

    .notes-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .content-header h1 {
        font-size: 32px;
    }

    .note {
        min-height: 210px;
    }
}
