:root {
    --bg: #f4f7f5;
    --surface: #ffffff;
    --surface-soft: #ecf4ee;
    --text: #112018;
    --text-muted: #4e6358;
    --brand: #1f7a53;
    --brand-dark: #145239;
    --accent: #d3a22c;
    --danger: #c64d3d;
    --radius: 14px;
    --shadow: 0 18px 40px rgba(22, 61, 44, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Outfit, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% 5%, #dbe9df 0, transparent 32%),
                radial-gradient(circle at 90% 15%, #f3e7cb 0, transparent 30%),
                var(--bg);
    min-height: 100vh;
}

.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
}

.shape-one {
    width: 260px;
    height: 260px;
    left: -120px;
    top: 20%;
    background: #82bd97;
}

.shape-two {
    width: 320px;
    height: 320px;
    right: -140px;
    top: 50%;
    background: #f3cd78;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    background: linear-gradient(165deg, #11271d, #163324 65%, #1f4732);
    color: #f4f9f6;
    padding: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.7rem;
    margin: 0;
}

.sidebar p {
    color: #b4d3c2;
    margin: 10px 0 26px;
    line-height: 1.5;
    font-size: 0.93rem;
}

.user-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.user-chip strong {
    display: block;
    font-size: 0.92rem;
}

.user-chip span {
    color: #b4d3c2;
    font-size: 0.8rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar a {
    color: #e2f4eb;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, background 0.2s ease;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(2px);
}

.content {
    padding: 28px;
}

.header-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.header-block h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.02em;
}

.header-block p {
    color: var(--text-muted);
    margin: 8px 0 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.card span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card strong {
    display: block;
    font-size: 1.45rem;
    margin-top: 6px;
    font-family: "Space Grotesk", sans-serif;
}

.panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
    animation: riseIn 0.35s ease;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel h3 {
    margin: 0 0 12px;
    font-family: "Space Grotesk", sans-serif;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid #e6efe8;
    font-size: 0.92rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

a {
    color: var(--brand);
}

.status,
.priority {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.79rem;
    background: var(--surface-soft);
}

.priority.urgent,
.priority.critical {
    background: #fbe3d0;
    color: #7f4614;
}

.button {
    border: none;
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.button.ghost {
    background: #dfece4;
    color: #183625;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.alert-success {
    background: #e0f5e9;
    color: #165631;
}

.alert-error {
    background: #fde5e2;
    color: #873227;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d7e4dc;
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.form-grid h3 {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.full-width {
    grid-column: 1 / -1;
}

.actions {
    display: flex;
    gap: 10px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movement-flow {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flow-step {
    background: linear-gradient(160deg, #f7fbf8, #eef6f1);
    border: 1px solid #dce9e1;
    border-radius: 12px;
    padding: 12px;
}

.flow-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.flow-badge {
    display: inline-block;
    background: #1f7a53;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.flow-grid h4 {
    margin: 0 0 6px;
    color: #123925;
}

.flow-grid p {
    margin: 3px 0;
    font-size: 0.88rem;
    color: #456054;
}

.flow-grid p span {
    color: #2c4c3f;
    font-weight: 600;
}

.flow-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #456054;
}

.flow-arrow {
    text-align: center;
    color: #1f7a53;
    font-size: 1.2rem;
    line-height: 1;
}

.timeline-item {
    background: #f7fbf8;
    border: 1px solid #e3eee7;
    border-radius: 12px;
    padding: 12px;
}

.timeline-item h4 {
    margin: 0 0 8px;
    color: #123925;
}

.timeline-item p {
    margin: 4px 0;
    color: #456054;
    font-size: 0.88rem;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e6efe8;
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px;
    text-align: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: #335847;
    background: rgba(244, 247, 245, 0.92);
    backdrop-filter: blur(6px);
    border-top: 1px solid #dce8e0;
    z-index: 2;
}

.auth-footer {
    background: rgba(255, 255, 255, 0.92);
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-wrap {
    width: min(460px, 100%);
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 26px;
}

.auth-card h1 {
    font-family: "Space Grotesk", sans-serif;
    margin: 0;
}

.auth-card p {
    color: var(--text-muted);
    margin: 8px 0 16px;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-hint {
    margin-top: 16px;
    background: #f3f8f5;
    border: 1px solid #deece4;
    border-radius: 10px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    color: #375346;
    font-size: 0.86rem;
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .site-footer {
        position: static;
        margin-top: 8px;
    }
}
