:root {
    --bg: #f4efe6;
    --bg-soft: #fbf8f2;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --panel-dark: rgba(11, 49, 47, 0.94);
    --text: #173432;
    --muted: #61706e;
    --muted-strong: #49605d;
    --border: rgba(12, 91, 87, 0.11);
    --border-strong: rgba(12, 91, 87, 0.18);
    --success: #2d8a55;
    --warning: #b88225;
    --danger: #b44a32;
    --info: #1f6c9a;
    --site-ink: #0b0913;
    --site-ink-2: #161123;
    --site-orange: #ee7b06;
    --site-red: #e85b2a;
    --site-violet: #6a2be2;
    --site-magenta: #b13be2;
    --logo-orange: #f1b566;
    --logo-red: #d63e2c;
    --logo-purple: #7b2cb8;
    --logo-magenta: #b95adf;
    --radius-xs: 12px;
    --radius-sm: 16px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --radius-xl: 38px;
    --shadow-soft: 0 12px 28px rgba(19, 42, 40, 0.08);
    --shadow-md: 0 22px 52px rgba(15, 41, 39, 0.12);
    --shadow-lg: 0 34px 72px rgba(11, 34, 32, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(214, 155, 89, 0.18), transparent 28%),
        radial-gradient(circle at 88% 16%, rgba(12, 91, 87, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(214, 155, 89, 0.1), transparent 30%),
        linear-gradient(135deg, #f8f3ea 0%, #eef5f1 100%);
    overflow-x: clip;
}

body.sidebar-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

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

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: 'Prata', serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #183230;
    overflow-wrap: break-word;
}

h2 {
    font-size: clamp(2rem, 2.7vw, 3.2rem);
    line-height: 1.06;
}

h3 {
    font-size: clamp(1.2rem, 1.55vw, 1.6rem);
    line-height: 1.2;
}

p {
    margin: 0;
    line-height: 1.72;
    color: var(--muted);
}

strong {
    color: inherit;
}

.app-overlay {
    position: fixed;
    inset: 0;
    z-index: 24;
    border: 0;
    padding: 0;
    background: rgba(8, 28, 27, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.app-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.app-shell {
    display: grid;
    grid-template-columns: 308px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px 22px;
    background:
        radial-gradient(circle at 10% 8%, rgba(238, 123, 6, 0.28), transparent 24%),
        radial-gradient(circle at 22% 28%, rgba(232, 91, 42, 0.16), transparent 22%),
        radial-gradient(circle at 84% 90%, rgba(106, 43, 226, 0.24), transparent 32%),
        radial-gradient(circle at 72% 58%, rgba(177, 59, 226, 0.12), transparent 28%),
        linear-gradient(180deg, #191014 0%, var(--site-ink) 42%, var(--site-ink-2) 100%);
    color: #f7f4ee;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(238, 123, 6, 0.44), rgba(177, 59, 226, 0.4));
    border-radius: 999px;
}

.brand,
.sidebar-foot {
    padding-inline: 4px;
}

.brand-link,
.profile-card,
.nav-link,
.quick-action,
.stack-item,
.button,
.inline-link,
.calendar-item,
.kanban-card,
.metric-card,
.card {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.brand-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 2px 4px 8px;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
}

.brand-link:hover {
    background: transparent;
}

.brand-copy {
    min-width: 0;
    width: 100%;
    text-align: center;
}

.brand-link strong,
.profile-card strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.16;
}

.brand-link small,
.profile-card small {
    color: rgba(255, 255, 255, 0.64);
    line-height: 1.45;
}

.brand-mark,
.profile-avatar {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand-secondary), #f5d3a0);
    color: #14302e;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-logo-image {
    display: block;
    width: min(168px, 100%);
    height: auto;
    margin-inline: auto;
}

.sidebar-foot .profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    font-size: 1.1rem;
    box-shadow:
        0 10px 18px rgba(214, 155, 89, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 18px;
    color: rgba(247, 244, 238, 0.78);
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(238, 123, 6, 0.18), rgba(177, 59, 226, 0.2)),
        rgba(255, 255, 255, 0.03);
    border-color: rgba(238, 123, 6, 0.18);
}

.nav-link.is-active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 26px rgba(38, 19, 58, 0.2);
}

.sidebar-foot {
    margin-top: auto;
    display: grid;
    gap: 9px;
}

.profile-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background:
        linear-gradient(135deg, rgba(238, 123, 6, 0.1), rgba(177, 59, 226, 0.1)),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 18px rgba(24, 13, 31, 0.14);
}

.profile-meta {
    min-width: 0;
}

.sidebar-foot .profile-card strong {
    font-size: 0.92rem;
    line-height: 1.15;
}

.sidebar-foot .profile-card small {
    display: block;
    margin-top: 3px;
    color: rgba(247, 244, 238, 0.66);
    font-size: 0.84rem;
}

.sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-action {
    width: auto;
    min-height: 38px;
    min-width: 0;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background:
        linear-gradient(135deg, var(--site-orange) 0%, var(--site-red) 46%, var(--site-magenta) 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 10px 18px rgba(92, 36, 61, 0.18);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
}

.sidebar-action:hover {
    background:
        linear-gradient(135deg, #ff8a10 0%, #ef6431 46%, #be4af0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 12px 20px rgba(92, 36, 61, 0.22);
}

.sidebar-action .icon {
    width: 14px;
    height: 14px;
    opacity: 0.9;
}

.sidebar-action-logout {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.01);
    color: rgba(247, 244, 238, 0.84);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-action-logout:hover {
    background:
        linear-gradient(135deg, rgba(238, 123, 6, 0.08), rgba(177, 59, 226, 0.08)),
        rgba(255, 255, 255, 0.02);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 18px rgba(24, 13, 31, 0.1);
}

.content-shell {
    width: min(1560px, 100%);
    padding: 22px 28px 38px;
    margin: 0 auto;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 15;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: center;
    margin-bottom: 26px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.sidebar-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.sidebar-toggle .icon {
    width: 1.18rem;
    height: 1.18rem;
    stroke-width: 2;
}

.sidebar-toggle-icon {
    display: grid;
    place-items: center;
}

.sidebar-toggle-icon-close {
    display: none;
}

.sidebar-toggle:hover {
    border-color: rgba(12, 91, 87, 0.22);
    background: rgba(255, 255, 255, 1);
}

.sidebar-toggle.is-active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: rgba(12, 91, 87, 0.92);
    box-shadow: 0 16px 30px rgba(12, 91, 87, 0.24);
}

.sidebar-toggle.is-active .sidebar-toggle-icon-menu {
    display: none;
}

.sidebar-toggle.is-active .sidebar-toggle-icon-close {
    display: grid;
}

.topbar-copy h1 {
    font-size: clamp(1.65rem, 2.4vw, 2.8rem);
    line-height: 1.05;
}

.topbar-copy {
    min-width: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--brand-primary);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    font-weight: 800;
    text-transform: uppercase;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    justify-self: end;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(12, 91, 87, 0.12);
    border-radius: 22px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
}

.search-form input,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(12, 91, 87, 0.12);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-form input::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(73, 96, 93, 0.68);
}

.search-form input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.button:focus-visible,
.sidebar-toggle:focus-visible,
.inline-link:focus-visible {
    outline: 0;
    border-color: rgba(12, 91, 87, 0.3);
    box-shadow:
        0 0 0 4px rgba(12, 91, 87, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-form button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    border: 1px solid rgba(12, 91, 87, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    padding: 13px 18px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: none;
}

.button:hover,
.search-form button:hover {
    transform: none;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    border-color: rgba(12, 91, 87, 0.12);
    box-shadow: none;
}

.button-secondary:hover {
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.button-danger {
    background: linear-gradient(135deg, var(--danger), #8a3625);
    box-shadow: 0 16px 30px rgba(180, 74, 50, 0.16);
}

.button-block {
    width: 100%;
    text-align: center;
}

.main-content {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.card,
.metric-card,
.hero-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.card::before,
.metric-card::before,
.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card::after {
    content: "";
    position: absolute;
    top: -34px;
    right: -26px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 91, 87, 0.08) 0%, rgba(214, 155, 89, 0.08) 42%, transparent 72%);
    pointer-events: none;
    opacity: 0.75;
}

.card > *,
.metric-card > *,
.hero-panel > * {
    position: relative;
    z-index: 1;
}

.card {
    padding: clamp(20px, 2vw, 28px);
}

.card > :first-child::before {
    content: "";
    display: block;
    width: 76px;
    height: 3px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(12, 91, 87, 0.9), rgba(214, 155, 89, 0.7));
    box-shadow: 0 8px 18px rgba(12, 91, 87, 0.12);
}

.card:hover,
.metric-card:hover {
    transform: none;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 26px;
    padding: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(214, 155, 89, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(12, 91, 87, 0.14), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 252, 250, 0.78));
}

.hero-panel-copy {
    display: grid;
    gap: 14px;
    align-content: center;
    max-width: 720px;
}

.hero-panel-copy p {
    max-width: 58ch;
    font-size: 1.02rem;
}

.hero-panel-actions {
    align-content: stretch;
}

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

.quick-action {
    padding: 18px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(12, 91, 87, 0.08), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(12, 91, 87, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.quick-action .icon {
    width: 18px;
    height: 18px;
    color: var(--brand-primary);
}

.quick-action:hover {
    background: linear-gradient(135deg, rgba(12, 91, 87, 0.12), rgba(255, 255, 255, 0.96));
    box-shadow: var(--shadow-soft);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.metric-card {
    padding: 20px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 250, 0.84));
}

.metric-card::after {
    content: "";
    position: absolute;
    top: -34px;
    right: -28px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 91, 87, 0.16), transparent 70%);
    pointer-events: none;
}

.metric-card span {
    position: relative;
    z-index: 1;
    color: var(--muted-strong);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1.5;
}

.metric-card strong {
    position: relative;
    z-index: 1;
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.15;
}

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

.detail-grid .span-2,
.dashboard-grid .span-2 {
    grid-column: span 2;
}

.section-header,
.page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.page-head {
    margin-bottom: 2px;
}

.page-head > div:first-child {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.section-header > div {
    min-width: 0;
    max-width: 100%;
}

.page-head .eyebrow {
    margin-bottom: 0;
}

.page-head p,
.section-header p {
    max-width: 62ch;
}

.page-actions,
.form-actions,
.filters-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.page-actions form {
    margin: 0;
    display: inline-flex;
}

.chart-card,
.chart,
.stack-list,
.timeline,
.detail-list,
.relation-panels,
.settings-grid,
.settings-section {
    display: grid;
    gap: 14px;
}

.chart-card {
    gap: 20px;
}

.bar-item {
    display: grid;
    grid-template-columns: minmax(82px, 112px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.bar-item span {
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.bar-track {
    height: 12px;
    background: rgba(12, 91, 87, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.bar-track.warm {
    background: rgba(214, 155, 89, 0.2);
}

.bar-track.soft {
    background: rgba(15, 43, 41, 0.08);
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary), #1c9084);
}

.bar-fill.warm {
    background: linear-gradient(90deg, var(--brand-secondary), #f0c58f);
}

.bar-fill.soft {
    background: linear-gradient(90deg, #183f3d, #4c7a76);
}

.stack-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(12, 91, 87, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.stack-item:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
}

.stack-item strong {
    display: block;
    line-height: 1.4;
}

.stack-item small,
.muted {
    color: var(--muted);
}

.inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--brand-primary);
    font-weight: 800;
    background: rgba(12, 91, 87, 0.08);
    border: 1px solid rgba(12, 91, 87, 0.1);
    white-space: nowrap;
}

.inline-link:hover {
    background: rgba(12, 91, 87, 0.12);
    transform: none;
}

.inline-button {
    min-height: auto;
    padding: 10px 14px;
    background: rgba(12, 91, 87, 0.08);
    border-radius: 999px;
    font-size: 0.92rem;
    box-shadow: none;
}

.badge,
.summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.badge.success,
.summary-pill.success {
    background: rgba(45, 138, 85, 0.13);
    color: var(--success);
}

.badge.warning,
.summary-pill.warning {
    background: rgba(184, 130, 37, 0.14);
    color: var(--warning);
}

.badge.danger,
.summary-pill.danger {
    background: rgba(180, 74, 50, 0.12);
    color: var(--danger);
}

.badge.info,
.summary-pill.info {
    background: rgba(31, 108, 154, 0.12);
    color: var(--info);
}

.badge.neutral,
.summary-pill,
.summary-pill.neutral {
    background: rgba(15, 43, 41, 0.08);
    color: var(--text);
}

.summary-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

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

.form-grid > .form-field {
    grid-column: span 6;
}

.form-grid > button,
.form-grid > .form-actions {
    grid-column: 1 / -1;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text);
}

.form-field small {
    color: var(--muted);
    line-height: 1.5;
}

.form-field select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(23, 52, 50, 0.55) 50%),
        linear-gradient(135deg, rgba(23, 52, 50, 0.55) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.form-field textarea {
    min-height: 156px;
    resize: vertical;
}

.form-field input[type="file"] {
    padding: 12px 14px;
    background: rgba(248, 252, 250, 0.92);
}

.form-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 2px 0;
}

.span-2 {
    grid-column: 1 / -1;
}

.form-actions {
    padding-top: 10px;
    border-top: 1px solid rgba(12, 91, 87, 0.08);
}

.filters-actions {
    justify-content: flex-end;
}

.table-wrap {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(12, 91, 87, 0.07);
    background: rgba(255, 255, 255, 0.6);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 251, 249, 0.96);
    backdrop-filter: blur(10px);
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 15px 14px;
    border-bottom: 1px solid rgba(12, 91, 87, 0.08);
    vertical-align: top;
}

.data-table th {
    color: var(--muted-strong);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.data-table tbody tr:hover {
    background: rgba(12, 91, 87, 0.035);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table td:first-child {
    font-weight: 800;
    color: var(--text);
}

.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.flash-stack {
    display: grid;
    gap: 10px;
}

.flash {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.flash.success {
    background: rgba(45, 138, 85, 0.12);
    border-color: rgba(45, 138, 85, 0.18);
}

.flash.danger {
    background: rgba(180, 74, 50, 0.12);
    border-color: rgba(180, 74, 50, 0.18);
}

.flash.info {
    background: rgba(31, 108, 154, 0.12);
    border-color: rgba(31, 108, 154, 0.18);
}

.timeline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 14px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    margin-top: 7px;
    box-shadow: 0 0 0 5px rgba(214, 155, 89, 0.1);
}

.timeline-item small {
    color: var(--muted);
}

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

.detail-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(12, 91, 87, 0.09);
}

.detail-item span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.detail-item strong {
    line-height: 1.6;
}

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

.relation-panel {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(12, 91, 87, 0.08);
    display: grid;
    gap: 12px;
}

.relation-panel h4 {
    font-size: 1.1rem;
}

.compact-form {
    margin-top: 18px;
}

.kanban-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(12, 91, 87, 0.08);
    border-radius: 26px;
    padding: 18px;
    min-height: 520px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    box-shadow: var(--shadow-soft);
}

.kanban-column header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.kanban-column header span {
    min-width: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(12, 91, 87, 0.08);
    font-weight: 800;
}

.kanban-dropzone {
    display: grid;
    gap: 12px;
    align-content: start;
}

.kanban-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(12, 91, 87, 0.12);
    box-shadow: 0 12px 26px rgba(15, 43, 41, 0.08);
}

.kanban-card:hover,
.kanban-card.is-dragging {
    transform: none;
    box-shadow: 0 18px 32px rgba(15, 43, 41, 0.12);
}

.kanban-column.is-over {
    outline: 2px dashed rgba(12, 91, 87, 0.36);
    outline-offset: -8px;
}

.calendar-current {
    align-self: center;
    font-weight: 800;
    color: var(--text);
}

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

.calendar-head {
    padding: 10px;
    text-align: center;
    font-weight: 800;
    color: var(--muted-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.74rem;
}

.calendar-day {
    min-height: 150px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(12, 91, 87, 0.08);
    display: grid;
    gap: 8px;
    align-content: start;
}

.calendar-day strong {
    font-size: 0.94rem;
}

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

.calendar-item {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--brand-primary);
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(12, 91, 87, 0.08);
    border: 1px solid rgba(12, 91, 87, 0.08);
}

.calendar-item:hover {
    transform: none;
}

.empty-card {
    text-align: center;
    display: grid;
    gap: 12px;
    padding: 28px;
    min-height: 180px;
    place-content: center;
}

.code-panel {
    padding: 14px;
    border-radius: 18px;
    background: #132826;
    color: #e7f1ef;
    overflow: auto;
    white-space: pre-wrap;
}

.guest-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
}

.guest-body.guest-body-single {
    background:
        radial-gradient(circle at 12% 10%, rgba(214, 155, 89, 0.12), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(12, 91, 87, 0.08), transparent 22%),
        linear-gradient(135deg, #f7f1e8 0%, #eef4f1 52%, #f8f4ec 100%);
}

.guest-shell {
    width: min(1220px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.guest-shell.guest-shell-single {
    width: min(420px, 100%);
    grid-template-columns: minmax(0, 1fr);
}

.guest-panel.guest-panel-single {
    display: grid;
    width: 100%;
    gap: 18px;
    padding: 30px 26px;
}

.guest-panel-single .guest-brand {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 0;
}

.guest-brand.guest-brand-compact {
    margin-bottom: 4px;
}

.guest-panel-single .brand-mark,
.guest-panel-single .brand-logo-image {
    margin-inline: auto;
}

.guest-panel-single .brand-logo-image {
    width: min(178px, 62%);
}

.guest-panel-single .guest-brand > div {
    display: grid;
    gap: 8px;
}

.guest-panel-single .guest-brand p {
    max-width: 24ch;
    margin-inline: auto;
}

.guest-panel-single .flash-stack {
    margin-top: -6px;
}

.guest-panel,
.guest-aside {
    border-radius: var(--radius-xl);
    padding: 34px;
    box-shadow: var(--shadow-lg);
}

.guest-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.78);
    min-width: 0;
}

.guest-aside {
    background:
        radial-gradient(circle at top right, rgba(214, 155, 89, 0.18), transparent 24%),
        linear-gradient(145deg, rgba(12, 91, 87, 0.95), rgba(18, 45, 43, 0.98));
    color: #f7f4ee;
    display: grid;
    align-content: center;
    gap: 18px;
    min-width: 0;
}

.guest-aside h2 {
    color: #f7f4ee;
}

.guest-aside p,
.guest-aside li {
    color: rgba(247, 244, 238, 0.76);
}

.guest-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    min-width: 0;
}

.guest-brand > div {
    min-width: 0;
    max-width: 100%;
}

.guest-brand h1 {
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
}

.guest-points {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.auth-card {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.auth-card-login {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 18px;
}

.auth-card-login::before,
.auth-card-login::after,
.auth-card-login > :first-child::before {
    display: none;
}

.auth-card-login .section-header {
    justify-content: flex-start;
    text-align: left;
}

.auth-card-login .section-header > div {
    display: grid;
    gap: 0;
}

.auth-card-login h2 {
    font-size: clamp(2.4rem, 8vw, 3rem);
    line-height: 0.94;
}

.auth-card .section-header {
    margin-bottom: 2px;
}

.auth-card .section-header > div {
    min-width: 0;
    max-width: 100%;
}

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

.auth-card .form-grid > .form-field,
.auth-card .form-grid > button {
    grid-column: 1 / -1;
}

.auth-card .button {
    width: 100%;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 800;
    color: var(--brand-primary);
}

.auth-card-login .auth-links {
    justify-content: flex-start;
}

.auth-card-login .form-grid {
    gap: 14px;
}

.auth-card-login .button {
    margin-top: 8px;
}

@media (max-width: 560px) {
    .guest-panel.guest-panel-single {
        padding: 24px 20px;
    }
}

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

.search-group + .search-group {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid rgba(12, 91, 87, 0.08);
}

.search-group h3 {
    margin-bottom: 12px;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

@media (max-width: 1320px) {
    .hero-panel,
    .dashboard-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid .span-2,
    .dashboard-grid .span-2 {
        grid-column: auto;
    }

    .guest-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 30;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        width: min(320px, 88vw);
        transition: transform 0.22s ease;
        box-shadow: 22px 0 42px rgba(8, 28, 27, 0.22);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-grid;
        place-items: center;
    }

    .content-shell {
        width: 100%;
        padding: 16px 18px 32px;
    }

    .topbar {
        top: 14px;
        grid-template-columns: auto 1fr;
    }

    .search-form {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 780px) {
    .guest-body {
        padding: 18px;
    }

    .guest-panel,
    .guest-aside,
    .hero-panel,
    .card,
    .metric-card,
    .topbar {
        border-radius: 24px;
    }

    .topbar {
        padding: 16px;
        gap: 14px;
    }

    .guest-panel,
    .guest-aside {
        padding: 24px;
    }

    .guest-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 22px;
    }

    .page-head,
    .section-header {
        flex-direction: column;
    }

    .filters-grid,
    .detail-list,
    .relation-panels,
    .settings-grid {
        grid-template-columns: 1fr;
    }

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

    .form-grid > .form-field,
    .form-grid > button,
    .form-grid > .form-actions,
    .span-2 {
        grid-column: 1 / -1;
    }

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

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-auto-columns: minmax(250px, 86vw);
    }

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

    .calendar-head {
        display: none;
    }

    .calendar-day {
        min-height: auto;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table {
        min-width: 100%;
        border-spacing: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .data-table tbody tr {
        padding: 16px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(12, 91, 87, 0.08);
        box-shadow: var(--shadow-soft);
    }

    .data-table td {
        padding: 0;
        border: 0;
        margin-bottom: 12px;
        display: grid;
        grid-template-columns: minmax(90px, 108px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    .data-table td:last-child {
        margin-bottom: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted-strong);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .actions-cell {
        justify-content: flex-start;
    }

    .actions-cell::before {
        display: none;
    }
}

@media (max-width: 560px) {
    .content-shell {
        padding-inline: 14px;
    }

    .topbar {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        width: 44px;
        height: 44px;
    }

    .topbar-copy h1 {
        font-size: clamp(1.4rem, 8vw, 2rem);
    }

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

    .search-form button {
        width: 100%;
    }

    .guest-panel,
    .guest-aside {
        padding: 20px;
    }

    .guest-brand h1 {
        font-size: clamp(1.5rem, 8vw, 1.9rem);
    }

    .auth-card {
        gap: 18px;
    }

    .auth-card h2 {
        max-width: 9ch;
        font-size: clamp(1.7rem, 10vw, 2.35rem);
        line-height: 1.02;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .bar-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bar-item strong {
        justify-self: flex-start;
    }

    .page-actions,
    .form-actions,
    .filters-actions,
    .auth-links {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions .button,
    .page-actions form,
    .form-actions .button,
    .filters-actions .button,
    .auth-links a {
        width: 100%;
    }

    .page-actions form .button {
        width: 100%;
    }

    .data-table td {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
