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

:root {
    --bg: #f3f6f1;
    --bg-strong: #dfe8dc;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --text: #183027;
    --muted: #61766e;
    --line: rgba(24, 48, 39, 0.1);
    --primary: #2160ff;
    --primary-deep: #1739b8;
    --accent: #0ea985;
    --warning: #ffca6b;
    --danger: #dd5c5c;
    --shadow: 0 24px 70px rgba(25, 54, 47, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(33, 96, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(14, 169, 133, 0.18), transparent 30%),
        linear-gradient(180deg, #f7faf5 0%, var(--bg) 100%);
    min-height: 100vh;
}

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

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

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

h1, h2, h3 {
    margin: 0;
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

p {
    margin: 0;
}

.app-shell,
.auth-shell {
    min-height: 100vh;
}

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    padding: 28px;
    background: rgba(19, 34, 29, 0.92);
    color: #f4f8f5;
    backdrop-filter: blur(20px);
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 42px;
}

.brand-mark {
    width: 18px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(180deg, #4bffb5 0%, #2160ff 100%);
    box-shadow: 0 0 24px rgba(75, 255, 181, 0.4);
}

.brand small,
.sidebar-user small {
    display: block;
    color: rgba(244, 248, 245, 0.68);
}

.nav-list {
    display: grid;
    gap: 10px;
}

.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 180ms ease, background 180ms ease;
}

.nav-link:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.1);
}

.badge-inline,
.notification-pill span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #4bffb5;
    color: #13221d;
    font-size: 0.82rem;
    font-weight: 800;
}

[data-notification-count="0"] {
    opacity: 0.45;
}

.sidebar-user {
    display: grid;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-panel {
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(24, 48, 39, 0.08);
}

.notification-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.card,
.hero-card,
.project-card,
.auth-panel,
.print-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: var(--radius-lg);
}

.card,
.print-card {
    padding: 24px;
}

.hero-card {
    display: grid;
    gap: 22px;
    padding: 28px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 236, 228, 0.92)),
        linear-gradient(120deg, rgba(33, 96, 255, 0.06), rgba(14, 169, 133, 0.12));
}

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

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

.metric-card,
.info-box {
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.metric-card strong,
.info-box strong {
    display: block;
    font-size: 1.35rem;
}

.metric-card span,
.info-box span,
.muted {
    color: var(--muted);
}

.section-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.section-heading.compact {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
}

.eyebrow {
    color: var(--primary-deep);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stack {
    display: grid;
    gap: 16px;
}

.two-col {
    grid-template-columns: 1.1fr 0.9fr;
}

.task-detail-grid {
    align-items: start;
}

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

.field span {
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

textarea {
    resize: vertical;
}

select[multiple] {
    min-height: 180px;
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #49a3ff 100%);
    color: #fff;
    box-shadow: 0 18px 30px rgba(33, 96, 255, 0.26);
}

.btn-secondary {
    background: rgba(24, 48, 39, 0.08);
    color: var(--text);
}

.btn-ghost {
    background: rgba(14, 169, 133, 0.1);
    color: #0b6c56;
}

.btn-block {
    width: 100%;
}

.inline-actions,
.between,
.input-with-action,
.checkbox-row,
.check-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.wrap {
    flex-wrap: wrap;
}

.input-with-action {
    align-items: stretch;
}

.input-with-action > *:first-child {
    flex: 1;
}

.flash {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
}

.flash.success {
    background: rgba(14, 169, 133, 0.12);
    color: #085744;
}

.flash.error {
    background: rgba(221, 92, 92, 0.12);
    color: #842c2c;
}

.project-card,
.task-row,
.comment-card,
.notification-item,
.file-card,
.timeline-item,
.status-row {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
}

.task-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.notification-item.unread {
    border-color: rgba(33, 96, 255, 0.35);
    background: rgba(33, 96, 255, 0.06);
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 36px));
}

.toast-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(33, 96, 255, 0.16);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(16, 36, 28, 0.18);
    animation: slideIn 220ms ease;
}

.toast-card strong {
    display: block;
    margin-bottom: 6px;
}

.toast-card a {
    color: var(--primary-deep);
    font-weight: 700;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pill) 12%, white);
    color: #122a22;
    border: 1px solid color-mix(in srgb, var(--pill) 28%, transparent);
    font-weight: 700;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(24, 48, 39, 0.08);
}

.warning-box,
.notice-box {
    padding: 16px;
    border-radius: 18px;
}

.warning-box {
    background: rgba(255, 202, 107, 0.26);
}

.notice-box {
    background: rgba(33, 96, 255, 0.08);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    position: relative;
    padding-left: 22px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
}

.check-row {
    align-items: flex-start;
    padding: 12px 0;
}

.check-toggle {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: white;
}

.check-toggle.done {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.file-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 18px;
}

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

.align-end {
    align-self: end;
}

.empty-state {
    color: var(--muted);
    padding: 10px 0;
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
}

.auth-hero,
.auth-panel {
    padding: 34px;
}

.auth-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top left, rgba(75, 255, 181, 0.35), transparent 30%),
        linear-gradient(145deg, #10211c 0%, #1d3830 100%);
    color: #f4f8f5;
    display: grid;
    gap: 18px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.centered {
    text-align: center;
}

.print-body {
    background: #fff;
}

.print-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.print-card {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
}

.checkbox-row {
    color: var(--muted);
}

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

@media (max-width: 1100px) {
    .app-shell,
    .auth-shell,
    .two-col,
    .hero-metrics,
    .filters-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 20;
        width: min(320px, 88vw);
        transform: translateX(-110%);
        transition: transform 220ms ease;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-panel {
        padding: 18px;
    }
}

@media (max-width: 720px) {
    .topbar,
    .section-heading.compact,
    .between,
    .inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-card,
    .card,
    .auth-hero,
    .auth-panel {
        padding: 20px;
    }
}
