:root {
    --bg: #f2f6fb;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --surface-strong: #10233a;
    --surface-soft: #edf4ff;
    --text: #122033;
    --muted: #62748a;
    --line: #dce5f1;
    --line-strong: #c6d3e4;
    --primary: #0f62fe;
    --primary-dark: #0c4dd1;
    --secondary: #e8eef8;
    --success: #0f9f6e;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 8px 25px rgba(15, 23, 42, 0.08);
    --radius: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 98, 254, 0.1), transparent 28%),
        radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.08), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

body {
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

body.guest-shell {
    min-height: 100vh;
}

.guest-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-panel {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 24px;
    align-items: stretch;
}

.auth-panel-single {
    grid-template-columns: 1fr;
    max-width: 680px;
}

.auth-hero,
.auth-card,
.panel,
.stat-card,
.hero-panel,
.module-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(220, 229, 241, 0.94);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-hero {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(15, 98, 254, 0.92), rgba(16, 35, 58, 0.96)),
        #10233a;
    color: #fff;
}

.hero-badge,
.hero-chip {
    display: inline-flex;
    align-self: flex-start;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.14);
}

.hero-chip {
    background: rgba(15, 98, 254, 0.12);
    color: var(--primary-dark);
}

.hero-list {
    padding-left: 18px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
}

.auth-card {
    padding: 36px;
}

.auth-card-wide {
    padding: 40px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 292px;
    background:
        linear-gradient(180deg, rgba(9, 24, 42, 0.98), rgba(16, 35, 58, 0.98)),
        #10233a;
    color: #e8eef8;
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
    box-shadow: 16px 0 40px rgba(8, 17, 30, 0.16);
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 6px 8px 14px;
}

.brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2dd4bf, #0f62fe);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sidebar-brand strong {
    display: block;
}

.sidebar-brand small {
    color: #9ab0ce;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
}

.nav-group {
    display: grid;
    gap: 8px;
}

.nav-group-label {
    margin: 0;
    padding: 0 10px;
    color: #8fa7c7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 700;
}

.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #d6e4ff;
    padding: 14px 16px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid transparent;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.nav-link span {
    font-weight: 600;
}

.nav-link small {
    color: #8fa7c7;
    white-space: nowrap;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 4px;
    padding: 14px 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ab0ce;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-backdrop {
    display: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 32px 0;
}

.topbar-title {
    min-width: 0;
}

.topbar h1 {
    margin: 6px 0 0;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.topbar-description {
    margin: 8px 0 0;
    max-width: 760px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.breadcrumbs a::after,
.breadcrumbs span::after {
    content: "/";
    margin-left: 8px;
    color: #9ab0ce;
}

.breadcrumbs span:last-child::after,
.breadcrumbs a:last-child::after {
    display: none;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-chip,
.topbar-date,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.notification-button {
    position: relative;
    gap: 8px;
}

.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.icon-button {
    min-width: 44px;
    padding-left: 16px;
    padding-right: 16px;
}

.content-area {
    padding: 24px 32px 32px;
}

.page-grid {
    display: grid;
    gap: 24px;
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 255, 0.98)),
        #fff;
}

.hero-panel h2 {
    margin: 12px 0 8px;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero-panel p {
    max-width: 740px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.hero-insights {
    display: grid;
    gap: 14px;
}

.insight-box {
    padding: 18px;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(15, 98, 254, 0.08), rgba(255, 255, 255, 0.72)),
        #fff;
    border: 1px solid rgba(15, 98, 254, 0.08);
}

.insight-box small {
    color: var(--muted);
}

.insight-box strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
}

.panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head h2,
.module-card h3 {
    margin: 8px 0 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.panel-span-2 {
    grid-column: span 2;
}

.panel-span-3 {
    grid-column: span 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(15, 98, 254, 0.75), rgba(45, 212, 191, 0.75));
}

.tone-green::before {
    background: linear-gradient(90deg, rgba(15, 159, 110, 0.8), rgba(45, 212, 191, 0.8));
}

.tone-amber::before {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.8), rgba(249, 115, 22, 0.8));
}

.tone-slate::before {
    background: linear-gradient(90deg, rgba(71, 85, 105, 0.82), rgba(15, 35, 58, 0.82));
}

.stat-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.stat-card small,
.module-meta,
.muted,
.field-help,
.table-sub,
.eyebrow {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.stat-card p {
    margin: 8px 0 0;
}

.mini-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    font-weight: 700;
}

.mini-badge {
    padding: 7px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(15, 98, 254, 0.1);
    color: var(--primary-dark);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.module-card {
    padding: 20px;
    display: grid;
    gap: 14px;
    box-shadow: var(--shadow-soft);
}

.module-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.module-card h3 {
    font-size: 20px;
}

.module-meta {
    font-size: 13px;
}

.timeline-stack {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 98, 254, 0.12);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 98, 254, 0.6);
    box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.12);
    transform: translateY(-1px);
}

.password-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.button-secondary {
    background: var(--secondary);
    color: var(--text);
}

.button-light {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.button-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.button-sm {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.ghost-button {
    background: transparent;
    color: var(--primary);
    white-space: nowrap;
}

.alert {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(15, 159, 110, 0.12);
    color: #0a6f4c;
    border-color: rgba(15, 159, 110, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #9a6700;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: #a61b1b;
    border-color: rgba(220, 38, 38, 0.18);
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

.auth-links {
    margin-top: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.task-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-actions,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge {
    padding: 8px 12px;
    font-size: 12px;
}

.badge-success {
    background: rgba(15, 159, 110, 0.14);
    color: #087250;
}

.badge-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #a61b1b;
}

.badge-neutral {
    background: rgba(96, 112, 137, 0.14);
    color: #435062;
}

.empty-state {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 10px 0;
}

.empty-state-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.14), rgba(45, 212, 191, 0.16));
    color: var(--primary-dark);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.view-switch {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.task-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.task-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 16px;
}

.task-card-overdue {
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.08);
}

.task-card-head,
.task-card-footer,
.progress-label,
.task-detail-head,
.form-actions-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.task-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-alert {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.12);
    color: #a61b1b;
    font-size: 12px;
    font-weight: 700;
}

.task-card-title h3,
.task-detail-hero h2 {
    margin: 8px 0 0;
    font-size: 22px;
}

.task-card-title small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.task-meta-list,
.summary-list {
    display: grid;
    gap: 10px;
}

.task-meta-list div,
.summary-list div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(237, 244, 255, 0.66);
    border: 1px solid rgba(198, 211, 228, 0.65);
}

.progress-block {
    display: grid;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(198, 211, 228, 0.58);
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #2dd4bf);
}

.task-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.task-priority.priority-baixa {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.task-priority.priority-media {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.task-priority.priority-alta {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

.task-priority.priority-urgente {
    background: rgba(220, 38, 38, 0.14);
    color: #a61b1b;
}

.task-status.status-pendente {
    background: rgba(107, 114, 128, 0.14);
    color: #4b5563;
}

.task-status.status-em_andamento {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.task-status.status-aguardando_aprovacao {
    background: rgba(139, 92, 246, 0.14);
    color: #6d28d9;
}

.task-status.status-aguardando_retorno {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.task-status.status-concluida {
    background: rgba(15, 159, 110, 0.14);
    color: #087250;
}

.task-status.status-cancelada,
.task-status.status-atrasada {
    background: rgba(220, 38, 38, 0.14);
    color: #a61b1b;
}

.text-danger {
    color: #a61b1b;
}

.assignee-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.assignee-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.assignee-card.is-selected {
    border-color: rgba(15, 98, 254, 0.34);
    box-shadow: 0 10px 25px rgba(15, 98, 254, 0.08);
    transform: translateY(-1px);
}

.assignee-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.assignee-main input {
    width: auto;
    margin-top: 3px;
}

.assignee-main small,
.radio-inline {
    color: var(--muted);
}

.radio-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.radio-inline input {
    width: auto;
}

.task-detail-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 255, 0.98)),
        #fff;
}

.detail-side {
    min-width: 220px;
}

.detail-side-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(198, 211, 228, 0.65);
}

.detail-copy-grid {
    display: grid;
    gap: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.detail-main,
.detail-aside {
    display: grid;
    gap: 24px;
}

.task-overview-grid,
.checklist-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.detail-copy-block {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(198, 211, 228, 0.65);
}

.detail-copy-block p {
    margin: 0;
    color: var(--text);
}

.detail-copy-grid h3 {
    margin-bottom: 8px;
}

.assignee-list {
    display: grid;
    gap: 12px;
}

.assignee-list-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(237, 244, 255, 0.66);
    border: 1px solid rgba(198, 211, 228, 0.65);
}

.checklist-create-form,
.comment-composer,
.attachment-uploader {
    margin-bottom: 18px;
}

.checklist-stack,
.comment-list,
.timeline-feed,
.aside-action-stack,
.attachment-list {
    display: grid;
    gap: 14px;
}

.notification-list {
    display: grid;
    gap: 14px;
}

.notification-item {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.notification-item-unread {
    border-color: rgba(220, 38, 38, 0.18);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.06);
}

.notification-item-head,
.notification-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.notification-item h3 {
    margin: 10px 0 0;
}

.chart-card,
.export-card {
    display: grid;
    gap: 18px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.chart-rows {
    display: grid;
    gap: 14px;
}

.chart-row {
    display: grid;
    gap: 10px;
}

.chart-row-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.chart-row-bars,
.deadline-list,
.export-grid {
    display: grid;
    gap: 12px;
}

.chart-bar-group {
    display: grid;
    gap: 6px;
}

.chart-bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(198, 211, 228, 0.5);
    overflow: hidden;
}

.chart-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.chart-tone-primary {
    background: linear-gradient(90deg, var(--primary), #4f8cff);
}

.chart-tone-success {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.chart-tone-amber {
    background: linear-gradient(90deg, var(--warning), #f97316);
}

.chart-tone-slate {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}

.deadline-item,
.export-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.deadline-meta {
    display: grid;
    gap: 6px;
    text-align: right;
}

.report-link-stack,
.report-link-view-grid,
.report-link-gallery,
.report-upload-preview,
.report-detail-text {
    display: grid;
    gap: 18px;
}

.report-link-editor,
.report-link-view-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.report-link-editor-head,
.report-link-view-head,
.report-form-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.report-link-editor-head h3,
.report-link-view-head h3,
.report-detail-text h3 {
    margin: 8px 0 0;
}

.report-link-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-link-url {
    display: inline-block;
    margin-bottom: 12px;
    font-weight: 600;
    word-break: break-all;
}

.report-link-empty {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--muted);
}

.report-link-media {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.report-link-media h4 {
    margin: 0 0 14px;
}

.report-link-gallery,
.report-upload-preview {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.report-print-card,
.report-upload-preview-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.report-print-thumb,
.report-print-thumb img {
    display: block;
    width: 100%;
}

.report-print-thumb img {
    height: 180px;
    object-fit: cover;
    background: #eef3f9;
}

.report-print-file,
.report-upload-preview-file {
    min-height: 180px;
    display: grid;
    place-items: center;
    background: #eef3f9;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.report-print-body,
.report-upload-preview-item small {
    padding: 14px;
}

.report-print-body {
    display: grid;
    gap: 10px;
}

.report-upload-preview-item img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #eef3f9;
}

.report-upload-preview-item small {
    display: block;
    color: var(--muted);
    word-break: break-word;
}

.export-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checklist-item {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.checklist-item-done {
    border-color: rgba(15, 159, 110, 0.22);
    background: linear-gradient(180deg, rgba(15, 159, 110, 0.06), rgba(255, 255, 255, 0.9));
}

.checklist-item-main,
.comment-item,
.timeline-feed-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

.checklist-copy {
    display: grid;
    gap: 8px;
}

.checklist-item-tools {
    display: grid;
    gap: 12px;
}

.checklist-inline-form {
    display: block;
}

.checklist-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.8fr) auto;
    gap: 12px;
    align-items: end;
}

.checklist-action-cell {
    align-self: end;
}

.checklist-toggle-form {
    margin: 0;
}

.checklist-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.checklist-item-done .checklist-toggle {
    border-color: rgba(15, 159, 110, 0.32);
    background: linear-gradient(135deg, var(--success), #2dd4bf);
}

.comment-item {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.comment-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.16), rgba(45, 212, 191, 0.16));
    color: var(--primary-dark);
    font-weight: 800;
}

.comment-body {
    display: grid;
    gap: 8px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.comment-body p {
    margin: 0;
}

.timeline-feed-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-feed-item:first-child {
    padding-top: 0;
}

.timeline-feed-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.timeline-feed-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 98, 254, 0.12);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.timeline-feed-copy {
    display: grid;
    gap: 6px;
}

.aside-action-stack form {
    margin: 0;
}

.attachment-item {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.attachment-item-head,
.attachment-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.attachment-copy {
    display: grid;
    gap: 8px;
}

.attachment-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 98, 254, 0.1);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.attachment-actions form {
    margin: 0;
}

.topbar-actions form {
    margin: 0;
}

.aside-action-stack .button,
.aside-action-stack a {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.mobile-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
}

@media (max-width: 1180px) {
    .hero-panel,
    .auth-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .task-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .export-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .panel-span-2,
    .panel-span-3 {
        grid-column: span 1;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-overview-grid,
    .checklist-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(8, 17, 30, 0.42);
        border: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 20;
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .topbar,
    .content-area {
        padding-left: 20px;
        padding-right: 20px;
    }

    .topbar {
        padding-top: 20px;
        flex-wrap: wrap;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-grid,
    .task-filter-grid,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .task-card-grid,
    .assignee-grid,
    .report-link-view-grid,
    .report-link-gallery,
    .report-upload-preview {
        grid-template-columns: 1fr;
    }

    .checklist-edit-grid {
        grid-template-columns: 1fr;
    }

    .task-card-head,
    .task-card-footer,
    .task-detail-head,
    .form-actions-bar,
    .attachment-item-head,
    .attachment-actions,
    .notification-item-head,
    .notification-actions,
    .deadline-item,
    .report-link-editor-head,
    .report-link-view-head,
    .report-form-footer {
        flex-direction: column;
    }

    .detail-side {
        min-width: 0;
        width: 100%;
    }

    .deadline-meta {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .hero-panel h2 {
        font-size: 26px;
    }

    .auth-card,
    .auth-card-wide,
    .auth-hero,
    .panel,
    .stat-card,
    .hero-panel,
    .module-card {
        padding: 22px;
    }

    .empty-state {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-item,
    .timeline-feed-item,
    .checklist-item-main {
        grid-template-columns: 1fr;
    }
}
