:root {
    --bg: #f4efe6;
    --surface: #fffaf3;
    --surface-strong: #fff;
    --ink: #1f1b18;
    --muted: #6f675f;
    --line: #dccfbe;
    --accent: #c96442;
    --accent-dark: #9f4a2e;
    --success: #1ea84a;
    --warning: #bb7a14;
    --info: #2d6d86;
    --danger: #a63f3f;
    --shadow: 0 18px 40px rgba(83, 54, 28, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(201, 100, 66, 0.10), transparent 24%),
        linear-gradient(180deg, #f6f1e8 0%, #efe7d9 100%);
    color: var(--ink);
}

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

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 22px 32px;
    border-bottom: 1px solid rgba(111, 103, 95, 0.15);
    background: rgba(255, 250, 243, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand { font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.brand-subtitle, .muted, .meta-label, .hint { color: var(--muted); }
.top-nav, .hero-actions, .dashboard-actions, .form-actions, .table-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px;
}

.hero, .auth-card, .panel, .summary-card, .progress-donut-card {
    background: rgba(255, 250, 243, 0.88);
    border: 1px solid rgba(220, 207, 190, 0.85);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    padding: 34px;
    min-height: 360px;
}

.hero-copy h1, .dashboard-head h1, .auth-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.eyebrow {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(201, 100, 66, 0.12);
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-panel { display: grid; gap: 16px; align-content: center; }

.mini-stat, .summary-card {
    padding: 20px;
    border-radius: 18px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.mini-stat strong, .summary-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.3rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.button.primary { background: var(--accent); color: white; }
.button.secondary { background: transparent; border-color: var(--line); color: var(--ink); }

.auth-card { max-width: 680px; margin: 0 auto; padding: 28px; }
.auth-card.wide { max-width: 920px; }

.form-grid { display: grid; gap: 18px; margin-top: 24px; }
.form-grid.two-column, .task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label { display: grid; gap: 8px; font-weight: 600; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: white;
    font: inherit;
}

.checkbox-row { display: flex; align-items: center; gap: 12px; }
.checkbox-row input { width: auto; }
.dashboard-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 24px; }

.summary-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.progress-donut-card {
    padding: 22px;
    display: grid;
    place-items: center;
    text-align: center;
}

.donut {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}

.donut-inner {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: var(--surface-strong);
    display: grid;
    place-items: center;
    text-align: center;
}

.donut-inner strong { font-size: 2rem; }

.panel { padding: 22px; margin-bottom: 24px; }
.panel-header { margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.task-stack, .flash-stack { display: grid; gap: 16px; }
.task-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
}

.task-card.task-card-pending {
    background: rgba(111, 103, 95, 0.06);
    border-color: rgba(111, 103, 95, 0.28);
}

.task-card.task-card-in-progress {
    background: rgba(45, 109, 134, 0.08);
    border-color: rgba(45, 109, 134, 0.28);
}

.task-card.task-card-completed {
    background: rgba(30, 168, 74, 0.14);
    border-color: rgba(30, 168, 74, 0.38);
}

.task-card.task-card-waiting-for-review-from-client {
    background: rgba(187, 122, 20, 0.10);
    border-color: rgba(187, 122, 20, 0.30);
}

.task-card.editable { display: grid; gap: 16px; }

.task-main, .task-meta, .task-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.task-meta {
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.task-fields { display: grid; gap: 14px; }
.task-fields .full { grid-column: 1 / -1; }
.task-index { display: inline-block; margin-bottom: 8px; font-size: 0.85rem; color: var(--accent-dark); font-weight: 700; }
.task-card h3 { margin: 0 0 6px; font-size: 1.1rem; }

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
}

.status-pill.pending { background: rgba(111, 103, 95, 0.12); color: var(--muted); }
.status-pill.in-progress { background: rgba(45, 109, 134, 0.12); color: var(--info); }
.status-pill.completed { background: rgba(30, 168, 74, 0.18); color: #0d6b2a; }
.status-pill.waiting-for-review-from-client { background: rgba(187, 122, 20, 0.14); color: var(--warning); }

.task-notes {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
}

.flash.success { background: rgba(47, 125, 77, 0.14); color: var(--success); }
.flash.error { background: rgba(166, 63, 63, 0.14); color: var(--danger); }

@media (max-width: 980px) {
    .hero, .summary-grid, .form-grid.two-column, .task-fields { grid-template-columns: 1fr; }
    .dashboard-head, .task-main, .task-meta, .task-footer, .site-header { flex-direction: column; align-items: stretch; }
}
