:root {
    --bg-1: #f4efe7;
    --bg-2: #fff9f0;
    --ink: #1a2333;
    --muted: #6b7280;
    --primary: #0f766e;
    --primary-2: #115e59;
    --accent: #ca8a04;
    --card: #ffffff;
    --danger: #991b1b;
    --ok: #166534;
    --line: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sora', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 15% 10%, #fef3c7 0%, var(--bg-1) 30%, var(--bg-2) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.22;
    z-index: 0;
}

.bg-shape-a {
    width: 280px;
    height: 280px;
    background: #14b8a6;
    right: -70px;
    top: 120px;
}

.bg-shape-b {
    width: 240px;
    height: 240px;
    background: #f59e0b;
    left: -80px;
    bottom: 80px;
}

.container {
    width: min(1500px, calc(100% - 2rem));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.topbar {
    background: linear-gradient(110deg, #0f172a, #1e293b);
    color: #fff;
    padding: 1rem 0;
    border-bottom: 4px solid #f59e0b;
}

.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(1.1rem, 1.1vw + 0.9rem, 1.6rem);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    text-decoration: none;
    color: #e2e8f0;
    padding: 0.55rem 0.8rem;
    border: 1px solid #334155;
    border-radius: 999px;
    transition: 150ms ease;
    font-size: 0.92rem;
}

nav a:hover {
    color: #fff;
    border-color: #f59e0b;
}

.card {
    background: var(--card);
    border: 1px solid #f3f4f6;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.06);
    border-radius: 16px;
    padding: 1.1rem;
    margin-top: 1.2rem;
    animation: rise 0.42s ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    margin-top: 0.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    font-size: 0.92rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0.72rem;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button,
.btn {
    border: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-radius: 10px;
    padding: 0.72rem 1rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-weight: 700;
}

.btn.alt {
    background: #fff;
    color: var(--ink);
    border: 1px solid #cbd5e1;
}

.muted {
    color: var(--muted);
}

.code {
    font-family: 'JetBrains Mono', monospace;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    display: inline-block;
}

.alert {
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    margin-top: 0.8rem;
}

.alert.error {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert.ok {
    background: #dcfce7;
    color: var(--ok);
    border: 1px solid #bbf7d0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.65rem;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
}

.row-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.footer {
    margin-top: 2rem;
    padding: 1.2rem 0 2rem;
    color: #475569;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .row-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 1700px) {
    .container {
        width: min(1720px, calc(100% - 3rem));
    }
}
