:root {
    --bg: #f7f1e7;
    --bg-strong: #efe5d4;
    --surface: rgba(255, 252, 246, 0.86);
    --surface-strong: #fffaf2;
    --line: rgba(74, 58, 33, 0.12);
    --line-strong: rgba(74, 58, 33, 0.18);
    --text: #1f2937;
    --muted: #6b7280;
    --heading: #13212f;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --warm: #ea580c;
    --warm-soft: rgba(234, 88, 12, 0.14);
    --shadow: 0 24px 80px rgba(57, 41, 18, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 204, 153, 0.55), transparent 28%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
        linear-gradient(180deg, #fff7eb 0%, #f5efe3 40%, #f7f1e7 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(14px);
    opacity: 0.55;
}

body::before {
    width: 18rem;
    height: 18rem;
    top: 3rem;
    right: 6rem;
    background: rgba(15, 118, 110, 0.18);
}

body::after {
    width: 22rem;
    height: 22rem;
    left: -5rem;
    bottom: -4rem;
    background: rgba(234, 88, 12, 0.14);
}

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

button {
    cursor: pointer;
}

#root {
    min-height: 100vh;
}

.shell {
    width: min(1440px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.2rem 0 2rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.45fr 0.95fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-card,
.mini-card,
.panel,
.note-card,
.category-row,
.empty-state,
.alert {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -4rem -5rem auto;
    width: 12rem;
    height: 12rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.22), transparent 70%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-title,
.panel-title,
.metric-value {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.hero-title {
    margin: 0.9rem 0 0.55rem;
    font-size: clamp(2rem, 2.4vw, 3.15rem);
    line-height: 1.02;
    color: var(--heading);
}

.hero-copy {
    max-width: 48rem;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.hero-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.hero-chip {
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: var(--heading);
    font-weight: 600;
}

.hero-summary {
    display: grid;
    gap: 1rem;
}

.mini-card {
    padding: 1.2rem 1.25rem;
    border-radius: var(--radius-lg);
}

.mini-card--accent {
    background: linear-gradient(160deg, rgba(15, 118, 110, 0.16), rgba(255, 250, 242, 0.92));
}

.mini-card--warm {
    background: linear-gradient(160deg, rgba(234, 88, 12, 0.14), rgba(255, 250, 242, 0.92));
}

.mini-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-value {
    margin: 0.45rem 0 0.2rem;
    font-size: 2rem;
    color: var(--heading);
}

.mini-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius-lg);
}

.metric-label {
    display: block;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
}

.metric-copy {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.95fr);
    gap: 1rem;
    align-items: start;
}

.sidebar {
    display: grid;
    gap: 1rem;
}

.panel {
    border-radius: var(--radius-xl);
    padding: 1.3rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.panel-title {
    margin: 0;
    font-size: 1.45rem;
    color: var(--heading);
}

.panel-copy {
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.month-label {
    min-width: 11rem;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    font-weight: 700;
    text-transform: capitalize;
    text-align: center;
}

.button,
.button-secondary,
.button-ghost,
.button-danger {
    border: 0;
    border-radius: 999px;
    padding: 0.82rem 1.15rem;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
    font-weight: 700;
}

.button-secondary {
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-strong);
    font-weight: 700;
}

.button-ghost {
    background: transparent;
    color: var(--heading);
    border: 1px solid var(--line);
    font-weight: 600;
}

.button-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    font-weight: 700;
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-danger:hover {
    transform: translateY(-1px);
}

.button:disabled,
.button-secondary:disabled,
.button-ghost:disabled,
.button-danger:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.8rem;
}

.calendar-weekday {
    padding: 0.35rem 0.55rem;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.calendar-day {
    min-height: 9.25rem;
    padding: 0.85rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(74, 58, 33, 0.11);
    background: rgba(255, 255, 255, 0.58);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.24);
}

.calendar-day.is-selected {
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.72));
    border-color: rgba(15, 118, 110, 0.3);
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 1px rgba(234, 88, 12, 0.28);
}

.calendar-day.is-muted {
    opacity: 0.62;
}

.calendar-day__top {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
}

.calendar-day__number {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--heading);
    background: rgba(255, 255, 255, 0.78);
}

.calendar-day__count {
    color: var(--muted);
    font-size: 0.8rem;
}

.calendar-day__events,
.tag-row,
.filter-row,
.actions-row,
.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.event-pill,
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.58rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(74, 58, 33, 0.12);
    font-size: 0.78rem;
    color: var(--heading);
    font-weight: 600;
}

.event-pill::before,
.tag::before,
.category-dot {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: var(--pill-color, var(--accent));
    flex: 0 0 auto;
}

.event-pill--more::before {
    display: none;
}

.agenda-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.95fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.list-card,
.form-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    padding: 1rem;
}

.section-title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--heading);
}

.section-copy {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.event-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.event-item {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.95rem;
}

.event-item__top,
.note-card__top,
.category-row__top {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.event-title,
.note-title {
    margin: 0;
    color: var(--heading);
    font-size: 1rem;
}

.event-meta,
.note-date,
.category-counts {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.event-description,
.note-content {
    margin: 0.7rem 0 0;
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
}

.form-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

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

.field {
    display: grid;
    gap: 0.38rem;
}

.field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--heading);
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid rgba(74, 58, 33, 0.14);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    padding: 0.86rem 0.95rem;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.textarea {
    min-height: 7.4rem;
    resize: vertical;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-weight: 600;
}

.sidebar-grid {
    display: grid;
    gap: 1rem;
}

.notes-board {
    display: grid;
    gap: 0.9rem;
}

.note-card {
    border-radius: var(--radius-lg);
    padding: 1rem;
    border-left: 5px solid var(--note-color, var(--accent));
}

.note-card.is-pinned {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 230, 0.92));
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(15, 118, 110, 0.1);
    color: var(--accent-strong);
}

.badge--warm {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.filter-chip {
    border: 1px solid rgba(74, 58, 33, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    padding: 0.5rem 0.8rem;
    color: var(--heading);
    font-weight: 600;
}

.filter-chip.is-active {
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.25);
    color: var(--accent-strong);
}

.category-row {
    border-radius: var(--radius-lg);
    padding: 0.95rem 1rem;
}

.category-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.category-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.empty-state {
    border-radius: var(--radius-lg);
    padding: 1.1rem 1rem;
    color: var(--muted);
    line-height: 1.6;
}

.alert {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    color: var(--heading);
}

.alert.is-error {
    background: rgba(254, 242, 242, 0.9);
    border-color: rgba(220, 38, 38, 0.14);
}

.alert.is-success {
    background: rgba(240, 253, 250, 0.92);
    border-color: rgba(15, 118, 110, 0.14);
}

@media (max-width: 1180px) {
    .hero,
    .layout,
    .agenda-columns,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 8.4rem;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 1rem, 100%);
    }

    .panel,
    .hero-card,
    .mini-card {
        padding: 1rem;
    }

    .calendar-grid {
        gap: 0.45rem;
    }

    .calendar-day {
        min-height: 7rem;
        padding: 0.65rem;
    }

    .calendar-day__events {
        gap: 0.28rem;
    }

    .event-pill {
        font-size: 0.72rem;
        padding: 0.3rem 0.5rem;
    }

    .form-grid--two {
        grid-template-columns: 1fr;
    }
}
