:root {
    --bg: #f3f1ec;
    --bg-deep: #e7e3da;
    --surface: #fffcf7;
    --ink: #1c241e;
    --muted: #6a736c;
    --line: #ddd6cb;
    --brand: #1b5c45;
    --brand-dark: #123d2e;
    --brand-soft: #e4efe9;
    --accent: #9a7b3c;
    --danger: #a33b2d;
    --warn: #9a5b12;
    --ok: #1f6b45;
    --radius: 14px;
    --font: "DM Sans", system-ui, sans-serif;
    --display: "Fraunces", Georgia, serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(ellipse 70% 50% at 0% 0%, rgba(27, 92, 69, 0.07), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 10%, rgba(154, 123, 60, 0.08), transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    min-height: 100vh;
    letter-spacing: -0.01em;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1.25rem 0; line-height: 1.5; }

/* ─── Shell ─── */
.app-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: rgba(255, 252, 247, 0.82);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(221, 214, 203, 0.9);
    color: var(--ink);
    padding: 1.75rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0 0.35rem;
}
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background:
        linear-gradient(145deg, #2a7a5c 0%, #1b5c45 55%, #9a7b3c 130%);
    position: relative;
    flex-shrink: 0;
}
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    border-top: 0;
    border-left: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}
.brand-name {
    font-family: var(--display);
    font-size: 1.28rem;
    font-weight: 650;
    line-height: 1.15;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    padding: 0.72rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    flex-shrink: 0;
    opacity: 0.85;
}
.nav-icon svg { width: 100%; height: 100%; }
.nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 2px;
    height: 0;
    background: var(--brand);
    border-radius: 2px;
    transform: translateY(-50%);
    transition: height 0.25s var(--ease);
}
.nav-link:hover {
    color: var(--ink);
    background: rgba(27, 92, 69, 0.05);
    text-decoration: none;
}
.nav-link.is-active {
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-weight: 600;
}
.nav-link.is-active::before { height: 55%; }
.nav-link.is-active .nav-icon { opacity: 1; color: var(--brand); }

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.user-chip {
    padding: 0.15rem 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.user-avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #2a7a5c, #1b5c45 70%);
    color: #f7f4ee;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.user-meta {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}
.user-chip strong {
    font-size: 0.92rem;
    font-weight: 600;
}
.user-chip span {
    font-size: 0.75rem;
    color: var(--muted);
    word-break: break-all;
}
.sidebar .btn-ghost {
    color: var(--muted);
    border-color: var(--line);
    font-weight: 500;
}
.sidebar .btn-ghost:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 2rem 0.35rem;
}
.page-title {
    flex: 1;
    font-size: 1.55rem;
    font-weight: 600;
}
.page-title.is-hidden { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
.content {
    padding: 0.85rem 2rem 2.5rem;
    display: grid;
    gap: 1.35rem;
}
.btn.menu-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 60;
}
.burger {
    width: 1.15rem;
    height: 0.85rem;
    display: grid;
    align-content: space-between;
}
.burger span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s ease;
}
body.menu-open .burger span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
body.menu-open .burger span:nth-child(2) {
    opacity: 0;
}
body.menu-open .burger span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}
.btn-plus {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1;
    margin-right: 0.15rem;
}
.btn-new { padding-inline: 1rem; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Surfaces ─── */
.panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    animation: rise 0.45s var(--ease) both;
}
.panel-surface {
    background: var(--surface);
    border: 1px solid rgba(221, 214, 203, 0.75);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
}
.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--font);
    font-weight: 650;
    letter-spacing: -0.01em;
}
.panel-head a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
}
.panel-head a:hover { color: var(--brand); }

/* Keep interaction panels with subtle surface */
.filters,
.form-panel,
.detail,
.table-wrap {
    background: var(--surface);
    border: 1px solid rgba(221, 214, 203, 0.75);
    border-radius: var(--radius);
}
.filters { padding: 1rem 1.15rem; }
.form-panel, .detail { padding: 1.35rem 1.45rem; }
.table-wrap { padding: 0.35rem 1rem 0.75rem; }

.stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem 2.5rem;
    padding: 0.25rem 0 0.5rem;
    border-bottom: 1px solid var(--line);
    animation: rise 0.4s var(--ease) both;
}
.stat-inline {
    display: grid;
    gap: 0.15rem;
}
.stat-inline .stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-inline .stat-value {
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ─── Dashboard hero ─── */
.dash-hero {
    display: grid;
    gap: 1.5rem;
    padding: 0.5rem 0 0.25rem;
    animation: rise 0.5s var(--ease) both;
}
.dash-greeting .eyebrow {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}
.dash-greeting h1 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 600;
    line-height: 1.12;
    margin: 0 0 0.4rem;
    max-width: 18ch;
}
.dash-greeting p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 42ch;
}

.destaque {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius);
    background:
        linear-gradient(120deg, rgba(27, 92, 69, 0.08), transparent 55%),
        var(--surface);
    border: 1px solid rgba(27, 92, 69, 0.18);
    color: inherit;
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
    animation: rise 0.55s var(--ease) 0.08s both;
}
.destaque:hover {
    transform: translateY(-2px);
    border-color: rgba(27, 92, 69, 0.35);
}
.destaque.is-completed { opacity: 0.7; }
.destaque-time {
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    min-width: 4.5rem;
}
.destaque-body { display: grid; gap: 0.2rem; min-width: 0; }
.destaque-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 600;
}
.destaque-title {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    text-decoration: none;
}
.destaque-title:hover { color: var(--brand-dark); }
.destaque-meta {
    font-size: 0.88rem;
    color: var(--muted);
}
.destaque-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}
.destaque-cta {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand);
    white-space: nowrap;
}

.empty-state {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
    padding: 1.5rem 0;
}
.empty-state p { margin: 0; color: var(--muted); max-width: 36ch; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 10px;
    padding: 0.68rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }

/* ─── Forms ─── */
.form { display: grid; gap: 0.95rem; }
.form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}
.form-panel { max-width: 820px; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.field { display: grid; gap: 0.4rem; font-size: 0.92rem; }
.field span { color: var(--muted); font-weight: 500; font-size: 0.84rem; }
.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(221, 214, 203, 0.95);
    border-radius: 10px;
    padding: 0.72rem 0.9rem;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27, 92, 69, 0.12);
}
.error { color: var(--danger); font-size: 0.84rem; }

.filters {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}
.filters-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-bottom: 0.1rem;
}

.table { width: 100%; border-collapse: collapse; }
.table th,
.table td {
    text-align: left;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.table tbody tr { transition: background 0.2s ease; }
.table tbody tr:hover { background: rgba(27, 92, 69, 0.04); }
.table th {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.actions { display: flex; gap: 0.65rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.link-danger {
    background: none;
    border: 0;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.status-text {
    font-size: 0.84rem;
    font-weight: 600;
}
.status-pendente { color: var(--warn); }
.status-concluido { color: var(--ok); }
.status-cancelado { color: var(--danger); }

.status-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    line-height: 1;
}
.status-chip.status-pendente {
    color: #8a4b0f;
    background: rgba(154, 91, 18, 0.1);
}
.status-chip.status-concluido {
    color: var(--ok);
    background: rgba(31, 107, 69, 0.1);
}
.status-chip.status-cancelado {
    color: var(--danger);
    background: rgba(163, 59, 45, 0.1);
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}
.badge-pendente { color: var(--warn); }
.badge-concluido { color: var(--ok); }
.badge-cancelado { color: var(--danger); }

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: var(--ink);
}
.cat-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cat);
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.15rem;
}
.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.2rem;
    border-bottom: 1px solid rgba(221, 214, 203, 0.55);
    transition: opacity 0.25s ease;
}
.list-row:last-child { border-bottom: 0; }
.list-row.is-completed { opacity: 0.55; }
.list-main {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.85rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    transition: padding-left 0.25s var(--ease);
}
.list-main:hover {
    color: var(--brand-dark);
    padding-left: 0.35rem;
}
.list a {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem 0.4rem;
    border-bottom: 1px solid rgba(221, 214, 203, 0.55);
    border-radius: 0;
    color: inherit;
    text-decoration: none;
    transition: padding-left 0.25s var(--ease), background 0.2s ease;
}
.list li:last-child a { border-bottom: 0; }
.list a:hover {
    background: transparent;
    padding-left: 0.65rem;
    color: var(--brand-dark);
}
.list-time {
    color: var(--muted);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.list-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }

.btn-complete {
    appearance: none;
    -webkit-appearance: none;
    background: var(--brand);
    border: 0;
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}
.btn-complete:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}
.btn-complete:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.action-link {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    padding: 0.35rem 0.45rem;
    margin: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.action-link:hover {
    color: var(--brand-dark);
    background: rgba(27, 92, 69, 0.08);
    text-decoration: none;
}
.action-link.action-danger {
    color: var(--muted);
}
.action-link.action-danger:hover {
    color: var(--danger);
    background: rgba(163, 59, 45, 0.08);
}

.calendar-hint {
    margin: -0.35rem 0 0.25rem;
    font-size: 0.9rem;
}
.form-hint {
    margin: 0 0 1rem;
    font-size: 0.92rem;
}

.toast-root {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    display: grid;
    gap: 0.55rem;
    pointer-events: none;
}
.toast {
    min-width: 220px;
    max-width: min(360px, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--ink);
    color: #f7f4ee;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 12px 40px rgba(18, 28, 22, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.toast-success { background: #16382c; }
.toast-error { background: #6f2b22; }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 1.1rem 0 1.35rem;
}
.meta-grid dt {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}
.meta-grid dd { margin: 0; font-weight: 600; }
.description h3 {
    font-family: var(--font);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.alert {
    margin: 0 2rem;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    animation: rise 0.35s var(--ease) both;
}
.alert-success { background: #eaf6ef; color: var(--ok); border-color: rgba(31, 107, 69, 0.15); }
.alert-error { background: #f8ebe8; color: var(--danger); border-color: rgba(163, 59, 45, 0.15); }
.alert-info { background: #eef4f1; color: var(--brand-dark); border-color: rgba(27, 92, 69, 0.15); }

/* ─── Calendar stage ─── */
.cal-stage {
    display: grid;
    gap: 1.15rem;
    animation: rise 0.45s var(--ease) both;
}
.cal-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 0.35rem 0 0.15rem;
}
.cal-hero-copy .eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}
.cal-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    line-height: 1.05;
}
.cal-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    max-width: 40ch;
}
.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.seg {
    display: inline-flex;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.9);
    border: 1px solid rgba(221, 214, 203, 0.9);
    gap: 0.1rem;
}
.seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.seg label {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.seg input:checked + label {
    background: var(--brand);
    color: #fff;
}
.seg label:hover {
    color: var(--ink);
}
.cal-cat {
    min-width: min(220px, 100%);
    margin: 0;
}
.cal-cat select {
    border-radius: 999px;
    padding: 0.55rem 1rem;
    background: rgba(255, 252, 247, 0.95);
}
.cal-board {
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(255, 252, 247, 0.98));
    border: 1px solid rgba(221, 214, 203, 0.7);
    border-radius: 18px;
    padding: 0.85rem 1rem 1.15rem;
    animation: rise 0.55s var(--ease) 0.06s both;
}
#calendar {
    min-height: 620px;
    background: transparent;
    border: 0;
    padding: 0;
}
.fc {
    --fc-border-color: rgba(221, 214, 203, 0.65);
    --fc-button-bg-color: transparent;
    --fc-button-border-color: var(--line);
    --fc-button-text-color: var(--ink);
    --fc-button-hover-bg-color: var(--brand-soft);
    --fc-button-hover-border-color: var(--line);
    --fc-button-active-bg-color: var(--brand);
    --fc-button-active-border-color: var(--brand);
    --fc-today-bg-color: rgba(27, 92, 69, 0.07);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: rgba(27, 92, 69, 0.04);
    --fc-event-border-color: transparent;
    font-family: var(--font);
}
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1rem !important;
    gap: 0.65rem;
}
.fc .fc-toolbar-title {
    font-family: var(--display);
    font-size: 1.2rem !important;
    font-weight: 600;
}
.fc .fc-button {
    border-radius: 9px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    box-shadow: none !important;
    padding: 0.42rem 0.78rem !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    color: #fff !important;
}
.fc .fc-col-header-cell-cushion {
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0.7rem 0.25rem !important;
}
.fc .fc-daygrid-day {
    transition: background 0.2s var(--ease);
}
.fc .fc-daygrid-day:hover {
    background: rgba(27, 92, 69, 0.035);
}
.fc .fc-daygrid-day.fc-day-today {
    box-shadow: inset 0 0 0 1.5px rgba(27, 92, 69, 0.28);
}
.fc .fc-daygrid-day.fc-day-sat,
.fc .fc-daygrid-day.fc-day-sun {
    background: rgba(154, 123, 60, 0.035);
}
.fc .fc-daygrid-day-number {
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--display);
    padding: 0.55rem 0.6rem !important;
    color: var(--ink);
}
.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--brand);
}
.fc .fc-event {
    border-radius: 7px !important;
    border: 0 !important;
    border-left: 3px solid rgba(255, 255, 255, 0.55) !important;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 5px;
    box-shadow: 0 1px 0 rgba(18, 28, 22, 0.06);
}
.fc .fc-daygrid-event-dot { display: none; }
.fc-highlight {
    background: rgba(27, 92, 69, 0.12) !important;
}

.panel-surface canvas,
.panel canvas { max-height: 280px; }

/* ─── Auth (full-bleed) ─── */
.auth-body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: block;
}
.auth-stage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}
.auth-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: #f7f4ee;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(2rem, 5vw, 4rem);
}
.auth-visual-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 28, 22, 0.2) 0%, rgba(12, 28, 22, 0.68) 52%, rgba(12, 28, 22, 0.9) 100%),
        linear-gradient(120deg, rgba(27, 92, 69, 0.35), transparent 45%),
        url("https://images.unsplash.com/photo-1484480974693-6ca0a78fb36b?auto=format&fit=crop&w=1800&q=80") center / cover no-repeat;
    transform: scale(1.04);
    animation: kenburns 22s var(--ease) infinite alternate;
}
.auth-visual-content {
    position: relative;
    z-index: 1;
    max-width: 28rem;
    animation: rise 0.7s var(--ease) both;
}
.auth-visual .brand-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.auth-visual h1 {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    line-height: 0.98;
    margin: 0 0 0.85rem;
    font-weight: 650;
    color: #fff;
}
.auth-visual p {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    max-width: 28ch;
}
.auth-panel {
    display: grid;
    align-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 80% 0%, rgba(27, 92, 69, 0.07), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(154, 123, 60, 0.08), transparent 40%),
        linear-gradient(180deg, #f7f4ee, #efeae1);
    animation: slideIn 0.55s var(--ease) both;
}
.auth-panel-inner {
    width: min(400px, 100%);
    margin: 0 auto;
}
.auth-head {
    margin-bottom: 1.35rem;
}
.auth-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}
.auth-panel .muted { margin-bottom: 0; }
.auth-form { gap: 1.05rem; }
.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}
.field-aside-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}
.field-aside-link:hover { color: var(--brand); }
.field-hint {
    color: var(--muted);
    font-size: 0.8rem;
}
.password-wrap {
    position: relative;
    display: grid;
}
.password-wrap input {
    padding-right: 4.6rem;
}
.password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
}
.password-toggle:hover {
    color: var(--brand);
    background: rgba(27, 92, 69, 0.06);
}
.btn-auth {
    margin-top: 0.35rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
}
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.35rem;
    font-size: 0.9rem;
}
.auth-links a { font-weight: 600; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 28, 22, 0.35);
    z-index: 40;
    backdrop-filter: blur(2px);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes kenburns {
    from { transform: scale(1.04) translate(0, 0); }
    to { transform: scale(1.1) translate(-1.5%, -1%); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        width: min(300px, 88vw);
        transform: translateX(-105%);
        transition: transform 0.3s var(--ease);
        background: var(--surface);
        box-shadow: 8px 0 40px rgba(18, 28, 22, 0.12);
    }
    .sidebar.is-open { transform: translateX(0); }
    .btn.menu-toggle { display: inline-flex; }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 55;
        background:
            linear-gradient(180deg, rgba(243, 241, 236, 0.96), rgba(243, 241, 236, 0.88));
        backdrop-filter: blur(10px);
        padding-top: 0.85rem;
        padding-bottom: 0.65rem;
    }
    body.menu-open {
        overflow: hidden;
    }
    .topbar, .content, .alert { padding-left: 1.15rem; padding-right: 1.15rem; }
    .grid-2, .form-row, .meta-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
    .cal-toolbar { flex-direction: column; align-items: stretch; }
    .seg { width: 100%; overflow-x: auto; }
    .cal-cat { width: 100%; }
    .cal-board { padding: 0.65rem 0.55rem 0.9rem; border-radius: 14px; }
    .auth-stage { grid-template-columns: 1fr; }
    .auth-visual {
        min-height: 42vh;
        padding: 1.5rem;
        justify-content: flex-end;
    }
    .auth-visual h1 { font-size: 2.4rem; }
    .destaque {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .destaque-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ─── Report / list / form premium ─── */
.section-title {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 650;
    margin: 0;
}
.toolbar-sub { margin: 0.2rem 0 0; font-size: 0.92rem; }

.report-hero,
.form-hero,
.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 0.35rem 0 0.5rem;
    animation: rise 0.45s var(--ease) both;
}
.report-hero-copy h1,
.form-hero h1,
.detail-hero h1 {
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    margin: 0.2rem 0 0.45rem;
    line-height: 1.08;
}
.report-hero-copy p,
.form-hero p { margin: 0; max-width: 42ch; }
.report-period {
    display: flex;
    gap: 0.65rem;
    align-items: end;
    flex-wrap: wrap;
}
.report-period .field { min-width: 120px; }
.report-stats { margin-top: 0.25rem; }
.export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.15rem 0 0.35rem;
}
.export-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 650;
}
.report-charts .chart-panel { min-height: 280px; }

.list-toolbar .toolbar-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.filters-drawer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s var(--ease);
}
.filters-drawer.is-open { grid-template-rows: 1fr; }
.filters-drawer > .filters {
    overflow: hidden;
    min-height: 0;
}
.filters-compact {
    grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)) auto;
}

.agenda-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}
.agenda-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 0.15rem;
    border-bottom: 1px solid rgba(221, 214, 203, 0.7);
    transition: background 0.2s ease, padding-left 0.25s var(--ease);
}
.agenda-item:last-child { border-bottom: 0; }
.agenda-list-interactive .agenda-item:hover {
    padding-left: 0.35rem;
    background: linear-gradient(90deg, rgba(27, 92, 69, 0.04), transparent 70%);
}
.agenda-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.agenda-date {
    width: 3.1rem;
    text-align: center;
    display: grid;
    gap: 0.05rem;
}
.agenda-date strong {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
}
.agenda-date span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 650;
}
.agenda-body { min-width: 0; display: grid; gap: 0.2rem; }
.agenda-title {
    font-weight: 650;
    font-size: 1.02rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agenda-meta {
    color: var(--muted);
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cat);
    display: inline-block;
}
.agenda-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    min-width: 7.5rem;
}
.agenda-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.agenda-item:hover .agenda-actions,
.agenda-item:focus-within .agenda-actions {
    opacity: 1;
    transform: translateY(0);
}
.agenda-actions form { margin: 0; display: inline-flex; }

.form-panel.form-split {
    max-width: 960px;
    padding: 1.5rem 1.6rem;
}
.form-cols {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 1.75rem;
}
.form-col-title {
    font-family: var(--font);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.85rem;
    font-weight: 650;
}
.form-col-side .form-col-title:not(:first-child) {
    margin-top: 1.35rem;
}
.form-row-2 {
    grid-template-columns: 1fr 1fr;
}
.cat-select {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 0.65rem;
    align-items: center;
}
.cat-preview {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.detail-sheet {
    max-width: 760px;
    animation: rise 0.45s var(--ease) both;
}
.detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.detail-when {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    color: var(--muted);
    margin: 0.35rem 0 0;
}
.detail-clock {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--brand);
}
.detail-meta {
    display: flex;
    gap: 1.5rem;
    padding: 1.15rem 0;
}
.meta-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.35rem;
    font-weight: 650;
}
.detail-sheet .description {
    padding: 0.5rem 0 1rem;
}
.detail-foot { margin-top: 1.25rem; }

.empty-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(27, 92, 69, 0.12), rgba(154, 123, 60, 0.12));
    position: relative;
    margin-bottom: 0.25rem;
}
.empty-mark::after {
    content: "";
    position: absolute;
    inset: 14px 12px 18px;
    border: 1.5px solid rgba(27, 92, 69, 0.45);
    border-radius: 4px;
    border-top-width: 3px;
}
.empty-compact { padding: 1.5rem 0.25rem; }

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}
.history-list li {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr auto;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(221, 214, 203, 0.65);
    align-items: baseline;
}
.history-list li:last-child { border-bottom: 0; }
.history-list span { color: var(--muted); font-size: 0.9rem; }
.history-list em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    .form-cols,
    .history-list li,
    .agenda-item { grid-template-columns: 1fr; }
    .agenda-side { align-items: flex-start; }
    .agenda-actions { opacity: 1; transform: none; }
    .filters-compact { grid-template-columns: 1fr 1fr; }
    .report-hero,
    .form-hero,
    .list-toolbar,
    .detail-hero { align-items: flex-start; }
}
