@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;600;700&family=Spectral:wght@600&display=swap');

:root {
    --bg-top: #f3f0ea;
    --bg-bottom: #e4eef0;
    --ink: #1e2a32;
    --muted: #5b6c75;
    --accent: #1d6f6a;
    --accent-soft: #d7f0ee;
    --card: #ffffff;
    --border: #d5dde3;
    --shadow: 0 12px 30px rgba(30, 42, 50, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Assistant', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top right, #fef9f3 0%, transparent 45%),
        linear-gradient(150deg, var(--bg-top), var(--bg-bottom));
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 24px clamp(20px, 4vw, 48px);
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(130deg, #1d6f6a, #6fb1a4);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.brand-title {
    font-family: 'Spectral', 'Times New Roman', serif;
    font-size: 22px;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    font-weight: 600;
}

.nav a {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav a:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.6);
}

.nav .ghost {
    border: 1px solid var(--border);
}

.user-chip {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    font-size: 13px;
}

.user-role {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 11px;
    color: var(--muted);
}

.content {
    flex: 1;
    padding: 0 clamp(20px, 4vw, 48px) 48px;
}

.section-title {
    font-family: 'Spectral', 'Times New Roman', serif;
    font-size: 28px;
    margin: 0 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    animation: rise 0.6s ease both;
}

.card + .card {
    margin-top: 20px;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 15px;
}

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

.table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.table tr:last-child td {
    border-bottom: none;
}

.status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-new {
    background: #fdf1d6;
    color: #7a5a00;
}

.status-in_progress {
    background: #e3edf7;
    color: #1d4b7a;
}

.status-done {
    background: #d9f3e3;
    color: #1f5a3a;
}

.form {
    display: grid;
    gap: 14px;
}

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

label {
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font: inherit;
    background: rgba(255, 255, 255, 0.8);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
.button:hover {
    filter: brightness(1.05);
}

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

.status-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.flash-success {
    background: #e0f7ee;
    color: #1f5a3a;
}

.flash-error {
    background: #fde7e4;
    color: #8a2f25;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.site-footer {
    padding: 18px clamp(20px, 4vw, 48px) 36px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    max-width: 420px;
    width: 100%;
}

.helper-text {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .nav {
        justify-content: flex-start;
    }

    .user-chip {
        justify-self: start;
    }

    .site-footer {
        flex-direction: column;
        gap: 8px;
    }
}
