@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --bg: #07111f;
    --bg-soft: #0d1b2f;
    --surface: rgba(11, 22, 40, 0.82);
    --surface-strong: #0f1f36;
    --surface-light: rgba(255, 255, 255, 0.08);
    --surface-elevated: rgba(15, 28, 47, 0.9);
    --text: #e5eefb;
    --muted: #93a4bd;
    --border: rgba(165, 180, 252, 0.12);
    --primary: #59c3c3;
    --primary-strong: #22c55e;
    --accent: #ffb84d;
    --danger: #f87171;
    --success: #34d399;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

html[data-theme='light'] {
    --bg: #f2f7fb;
    --bg-soft: #e8eff7;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --surface-light: rgba(8, 15, 28, 0.04);
    --surface-elevated: rgba(255, 255, 255, 0.98);
    --text: #122033;
    --muted: #58677b;
    --border: rgba(17, 24, 39, 0.08);
    --primary: #0f766e;
    --primary-strong: #15803d;
    --accent: #d97706;
    --danger: #dc2626;
    --success: #059669;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at top left, rgba(89, 195, 195, 0.16), transparent 26%),
        radial-gradient(circle at top right, rgba(255, 184, 77, 0.12), transparent 22%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
    color: var(--text);
}

body {
    position: relative;
    transition: background 0.28s ease, color 0.28s ease;
}

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

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

.ambient-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
}

.auth-shell__content,
.page {
    position: relative;
    z-index: 1;
}

.auth-shell__content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
}

.auth-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    width: min(1180px, 100%);
    align-items: center;
}

.auth-panel--centered {
    grid-template-columns: 1fr;
    justify-items: center;
}

.auth-panel__intro,
.auth-card,
.hero__content,
.hero__preview,
.panel,
.dashboard-hero,
.sidebar,
.topbar {
    backdrop-filter: blur(18px);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dashboard-hero,
.panel,
.topbar,
.sidebar,
.auth-card,
.auth-panel__intro,
.hero__content,
.hero__preview {
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before,
.panel::before,
.topbar::before,
.sidebar::before,
.auth-card::before,
.auth-panel__intro::before,
.hero__content::before,
.hero__preview::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%),
        radial-gradient(circle at top right, rgba(89, 195, 195, 0.12), transparent 34%);
    opacity: 0.9;
}

.auth-panel__intro,
.hero__content,
.dashboard-hero,
.panel {
    border-radius: var(--radius-xl);
    padding: 36px;
}

.auth-card {
    border-radius: var(--radius-xl);
    padding: 32px;
}

.auth-note,
.metric-card,
.kpi,
.roadmap-card,
.kanban-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(89, 195, 195, 0.14);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin: 18px 0 16px;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #7ce1c3);
    color: #04131f;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.16);
}

.button:hover,
.icon-button:hover,
.theme-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.button--ghost,
.theme-button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.button--block {
    width: 100%;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    width: min(1280px, 100%);
}

.hero__actions,
.quick-stats,
.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero__stats {
    margin-top: 30px;
}

.metric-card,
.kpi {
    padding: 18px;
    min-width: 180px;
}

.metric-card strong,
.kpi strong,
.roadmap-card strong,
.kanban-card strong {
    display: block;
    margin-bottom: 8px;
}

.board-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero__preview {
    border-radius: var(--radius-xl);
    padding: 28px;
}

.board-preview__top {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.board-column {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.board-column header {
    margin-bottom: 14px;
    font-weight: 700;
}

.kanban-card {
    padding: 16px;
}

.kanban-card small {
    color: var(--muted);
    line-height: 1.6;
}

.kanban-card__label {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 184, 77, 0.16);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.kanban-card__label--accent {
    background: rgba(89, 195, 195, 0.16);
    color: var(--primary);
}

.kanban-card__label--success {
    background: rgba(52, 211, 153, 0.16);
    color: var(--success);
}

.form-stack {
    display: grid;
    gap: 18px;
}

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

.form-group label {
    font-size: 0.92rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea,
.topbar__search input,
.inline-form input,
.inline-form select {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    padding: 0 16px;
    color: var(--text);
    outline: none;
}

.form-group textarea {
    min-height: 140px;
    padding: 14px 16px;
    resize: vertical;
}

.app-shell {
    display: grid;
    grid-template-columns: 310px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
    min-height: 100vh;
    padding: 28px 22px;
    border-right: 1px solid var(--border);
    border-radius: 0 28px 28px 0;
}

.brand,
.user-pill,
.topbar,
.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand__mark,
.user-pill__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #7ce1c3);
    color: #04131f;
    font-weight: 800;
}

.brand span,
.user-pill span,
.sidebar__link small,
.badge {
    color: var(--muted);
}

.sidebar__nav {
    display: grid;
    gap: 10px;
}

.sidebar__link {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar__link:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
}

.sidebar__link--active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), rgba(255, 255, 255, 0.06));
    border-color: color-mix(in srgb, var(--primary) 46%, transparent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sidebar__link--active span {
    color: var(--text);
}

.sidebar__link--muted {
    opacity: 0.78;
}

.app-shell__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 10;
    margin: 16px 20px 0;
    padding: 16px 18px;
    border-radius: 22px;
}

.topbar__search {
    flex: 1;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.user-chip:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: rgba(255, 255, 255, 0.06);
}

.user-chip__avatar,
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7ce1c3);
    color: #04131f;
    font-weight: 800;
    object-fit: cover;
}

.user-chip__avatar {
    width: 32px;
    height: 32px;
}

.avatar--xs {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.avatar--sm {
    width: 42px;
    height: 42px;
}

.avatar--xl {
    width: 88px;
    height: 88px;
}

.user-pill__avatar--image {
    object-fit: cover;
}

.icon-button,
.theme-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-button__label {
    white-space: nowrap;
    font-weight: 700;
}

.badge,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
}

.pill--accent {
    background: rgba(89, 195, 195, 0.14);
    color: var(--primary);
}

.page {
    padding: 26px 20px 32px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
}

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

.quick-stats {
    margin-top: 28px;
}

.panel {
    border-radius: var(--radius-xl);
    transition: border-color 0.2s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.panel--kanban {
    overflow: hidden;
}

.panel__header--stack {
    align-items: flex-start;
}

.panel__description,
.table-meta {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.panel__actions,
.inline-form,
.table-actions,
.profile-avatar-card,
.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    min-height: 48px;
}

.checkbox input {
    width: 18px;
    height: 18px;
}

.form-group--checkbox {
    align-content: end;
}

.form-layout {
    display: grid;
    gap: 22px;
}

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

.form-group--full {
    grid-column: 1 / -1;
}

.profile-avatar-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.workspace-grid,
.info-grid {
    display: grid;
    gap: 18px;
}

.workspace-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 22px;
}

.workspace-card,
.info-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.workspace-card:hover,
.info-card:hover,
.workflow-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.12);
}

.workspace-card h3 {
    margin: 16px 0 10px;
    font-size: 1.15rem;
}

.board-card {
    position: relative;
    overflow: hidden;
}

.board-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: color-mix(in srgb, var(--workspace-color) 90%, white 10%);
}

.board-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kanban-lists {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(300px, 320px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-top: 22px;
}

.kanban-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 340px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    cursor: grab;
}

.kanban-list.is-dragging {
    opacity: 0.55;
    transform: rotate(1deg);
}

.kanban-list--composer {
    cursor: default;
    background: linear-gradient(180deg, rgba(89, 195, 195, 0.08), rgba(255, 255, 255, 0.04));
}

.kanban-list__header,
.kanban-list__title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kanban-list__title-group {
    justify-content: flex-start;
}

.kanban-list__header h3 {
    margin: 0 0 4px;
    font-size: 1.02rem;
}

.kanban-list__header small {
    color: var(--muted);
}

.kanban-list__accent {
    width: 12px;
    min-width: 12px;
    align-self: stretch;
    border-radius: 999px;
    background: color-mix(in srgb, var(--list-color) 90%, white 10%);
}

.kanban-list__body {
    display: flex;
    flex: 1;
}

.kanban-cards {
    display: grid;
    gap: 12px;
    width: 100%;
    align-content: start;
    min-height: 120px;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kanban-cards.is-drop-target {
    background: rgba(89, 195, 195, 0.08);
    box-shadow: inset 0 0 0 1px rgba(89, 195, 195, 0.22);
}

.kanban-placeholder-card,
.list-editor {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--border);
}

.kanban-placeholder-card strong {
    display: block;
    margin-bottom: 8px;
}

.kanban-placeholder-card p {
    margin-bottom: 0;
}

.list-editor summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.list-editor[open] summary {
    margin-bottom: 14px;
}

.list-editor summary::-webkit-details-marker {
    display: none;
}

.card-quick-form {
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.task-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.task-card[draggable='true'] {
    cursor: grab;
}

.task-card:hover {
    transform: translateY(-2px);
    border-color: rgba(89, 195, 195, 0.28);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.16);
}

.task-card.is-dragging {
    opacity: 0.48;
    transform: rotate(1deg) scale(0.98);
    box-shadow: 0 18px 32px rgba(2, 6, 23, 0.28);
}

.task-card p {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.task-card__top,
.task-card__meta,
.task-card__assignees,
.task-card__labels,
.progress-panel,
.assignee-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.task-card__top {
    justify-content: space-between;
}

.task-card__meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.task-card__assignees {
    margin-top: -2px;
}

.task-card__labels {
    gap: 8px;
}

.detail-labels {
    margin-top: 18px;
}

.label-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--label-color) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--label-color) 42%, transparent);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.priority-badge--baixa {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.priority-badge--media {
    background: rgba(89, 195, 195, 0.16);
    color: var(--primary);
}

.priority-badge--alta {
    background: rgba(255, 184, 77, 0.18);
    color: var(--accent);
}

.priority-badge--urgente {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}

.progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #7ce1c3);
}

.progress-track--lg {
    height: 12px;
    margin-top: 8px;
}

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

.checkbox--panel {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.workspace-card__top,
.workspace-card__footer,
.workspace-hero__top,
.workspace-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.workspace-card__footer {
    margin-top: 18px;
}

.workspace-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 54px;
    padding: 0 12px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--workspace-color) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--workspace-color) 38%, transparent);
    color: var(--text);
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-icon--lg {
    min-width: 72px;
    min-height: 72px;
    font-size: 1.2rem;
}

.workspace-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.workspace-metrics div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.workspace-metrics strong,
.info-card strong {
    display: block;
    margin-bottom: 6px;
}

.workspace-metrics span,
.info-card span,
.workspace-card small {
    color: var(--muted);
}

.info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.table-wrap {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.data-table th,
.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-badge--success {
    background: rgba(52, 211, 153, 0.16);
    color: var(--success);
}

.status-badge--danger {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}

.status-badge--warning {
    background: rgba(255, 184, 77, 0.16);
    color: var(--accent);
}

.status-badge--muted {
    color: var(--muted);
}

.button--danger {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.button--sm {
    min-height: 38px;
    padding-inline: 14px;
}

.check-list {
    display: grid;
    gap: 12px;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.6;
}

.roadmap-card {
    padding: 18px;
}

.workflow-stack {
    display: grid;
    gap: 18px;
}

.workflow-card,
.workflow-empty {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.workflow-card--compact {
    display: grid;
    gap: 16px;
}

.workflow-card {
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.workflow-card__header,
.workflow-item,
.workflow-item__top,
.workflow-item__controls {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.workflow-card__header h3 {
    margin: 0 0 4px;
}

.workflow-inline-form {
    margin-top: 16px;
}

.workflow-items {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.workflow-item {
    align-items: flex-start;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.workflow-item__content {
    display: grid;
    gap: 12px;
    flex: 1;
    min-width: 240px;
}

.workflow-item__content input,
.workflow-item__controls select,
.workflow-item__controls input {
    width: 100%;
}

.workflow-item__top input {
    flex: 1;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    padding: 0 14px;
    color: var(--text);
}

.workflow-item__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.checkbox-toggle {
    display: inline-flex;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.checkbox-toggle.is-checked {
    background: linear-gradient(135deg, var(--primary), #7ce1c3);
    border-color: transparent;
}

.checkbox-toggle.is-checked::after {
    content: '';
    width: 10px;
    height: 10px;
    margin: auto;
    border-radius: 999px;
    background: #04131f;
}

.checkbox--label {
    justify-content: flex-start;
}

.attachment-preview {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.comment-body {
    color: var(--text);
    line-height: 1.7;
}

.mention {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(89, 195, 195, 0.14);
    color: var(--primary);
    font-weight: 700;
}

.activity-feed {
    display: grid;
    gap: 14px;
}

.activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.activity-item__content {
    display: grid;
    gap: 6px;
}

.analytics-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.analytics-bars,
.analytics-list,
.notification-list,
.trend-grid {
    display: grid;
    gap: 14px;
}

.analytics-bars--compact {
    gap: 12px;
}

.analytics-bar {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.analytics-bar__meta,
.notification-menu__header,
.analytics-list__item,
.notification-card,
.notification-menu__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.analytics-bar__track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.analytics-bar__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #7ce1c3);
}

.analytics-bar__track--accent span {
    background: linear-gradient(90deg, var(--accent), #ffd68a);
}

.trend-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.trend-card,
.notification-card,
.notification-menu__item,
.notification-menu__empty,
.analytics-list__item {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.trend-card__stats,
.analytics-list__item span,
.notification-card span,
.notification-menu__item small {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.analytics-list__item--link {
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.analytics-list__item--link:hover {
    transform: translateY(-1px);
    border-color: rgba(89, 195, 195, 0.28);
}

.analytics-list__metric {
    display: grid;
    gap: 6px;
    text-align: right;
}

.notification-menu {
    position: relative;
}

.notification-menu summary {
    list-style: none;
}

.notification-menu summary::-webkit-details-marker {
    display: none;
}

.notification-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(420px, 88vw);
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    z-index: 40;
}

.notification-menu__actions {
    display: flex;
}

.notification-menu__list {
    display: grid;
    gap: 12px;
    max-height: 440px;
    overflow: auto;
}

.notification-menu__item p,
.notification-card p,
.notification-menu__empty p {
    margin: 6px 0 0;
}

.notification-menu__item--unread,
.notification-card--unread {
    border-color: rgba(89, 195, 195, 0.28);
    background: rgba(89, 195, 195, 0.08);
}

.badge--accent {
    background: rgba(89, 195, 195, 0.16);
    color: var(--primary);
}

.activity-item__content p {
    margin: 0;
}

.board-view-switcher {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.calendar-grid--head {
    margin-bottom: 12px;
}

.calendar-weekday {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 180px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.calendar-day--muted {
    opacity: 0.5;
}

.calendar-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.calendar-day__cards {
    display: grid;
    gap: 10px;
}

.calendar-card {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(89, 195, 195, 0.1);
    border: 1px solid rgba(89, 195, 195, 0.18);
}

.calendar-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.table-progress {
    display: grid;
    gap: 8px;
    min-width: 160px;
}

.timeline-board {
    display: grid;
    gap: 16px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: center;
}

.timeline-row__meta {
    display: grid;
    gap: 6px;
}

.timeline-row__track {
    position: relative;
    min-height: 48px;
    border-radius: var(--radius-md);
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0,
            rgba(255, 255, 255, 0.03) calc(100% / 14),
            transparent calc(100% / 14),
            transparent calc((100% / 14) * 2)
        ),
        rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.timeline-row__bar {
    position: absolute;
    top: 8px;
    bottom: 8px;
    min-width: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7ce1c3);
    color: #04131f;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.18);
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.08);
}

.alert--success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

.alert--danger {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.only-mobile {
    display: none;
}

.app-shell__backdrop {
    display: none;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

body[data-ui-ready='true'] .topbar,
body[data-ui-ready='true'] .sidebar {
    transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

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

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

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(90vw, 320px);
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        z-index: 40;
    }

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

    .app-shell__backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(2, 6, 23, 0.55);
    }

    .only-mobile {
        display: inline-flex;
    }

    .topbar {
        margin-inline: 16px;
    }

    .page,
    .auth-shell__content {
        padding: 18px 16px 24px;
    }
}

.template-grid {
    align-items: start;
}

.info-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-card--soft {
    background: rgba(148, 163, 184, 0.08);
}

@media (max-width: 720px) {
    .hero__stats,
    .quick-stats,
    .topbar,
    .topbar__actions,
    .inline-form,
    .panel__actions,
    .form-grid,
    .workspace-card__top,
    .workspace-card__footer,
    .workspace-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .board-preview__columns {
        grid-template-columns: 1fr;
    }

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

    .analytics-filters {
        grid-template-columns: 1fr;
    }

    .workspace-metrics,
    .info-grid,
    .kanban-lists {
        grid-template-columns: 1fr;
    }

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

    .workflow-card__header,
    .workflow-item,
    .workflow-item__top,
    .workflow-item__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-panel__intro,
    .auth-card,
    .hero__content,
    .hero__preview,
    .dashboard-hero,
    .panel {
        padding: 24px;
    }

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

    .timeline-row {
        grid-template-columns: 1fr;
    }
}
