:root {
    --bg: #f4efe4;
    --bg-soft: #fff8eb;
    --text: #1d1f22;
    --muted: #5b5f65;
    --primary: #0f766e;
    --primary-dark: #0a4f4a;
    --accent: #e85d04;
    --danger: #b42318;
    --card: rgba(255, 255, 255, 0.86);
    --border: rgba(15, 118, 110, 0.2);
    --shadow: 0 20px 45px rgba(15, 118, 110, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(232, 93, 4, 0.16), transparent 38%),
        radial-gradient(circle at 85% 20%, rgba(15, 118, 110, 0.17), transparent 40%),
        linear-gradient(160deg, var(--bg), var(--bg-soft));
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    filter: blur(35px);
    z-index: -1;
    opacity: 0.25;
    animation: float 10s ease-in-out infinite;
}

.bg-shape-1 {
    background: #ff8c42;
    top: -140px;
    right: -80px;
}

.bg-shape-2 {
    background: #1f9d92;
    bottom: -160px;
    left: -120px;
    animation-delay: 2s;
}

.container {
    width: min(1200px, calc(100% - 2rem));
    margin: 2rem auto 3rem;
    display: grid;
    gap: 1.25rem;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.35rem 1.5rem;
    animation: reveal 0.7s ease;
}

.eyebrow {
    margin: 0;
    color: var(--primary-dark);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0.2rem 0 0.35rem;
}

.subtitle {
    margin: 0;
    color: var(--muted);
}

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1rem;
    animation: reveal 0.8s ease;
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field.wide {
    grid-column: span 2;
}

label {
    font-size: 0.82rem;
    color: var(--muted);
}

input,
select {
    width: 100%;
    padding: 0.62rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.75);
    font-family: inherit;
}

input:focus,
select:focus {
    outline: 2px solid rgba(15, 118, 110, 0.25);
    border-color: var(--primary);
}

.btn {
    border: none;
    background: linear-gradient(120deg, var(--primary), #16a394);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.14);
    display: inline-flex;
    align-items: center;
}

.btn-danger {
    background: linear-gradient(120deg, var(--danger), #cf3f3f);
}

.table-wrapper {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
    background: #fff;
}

th,
td {
    padding: 0.7rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
}

th {
    background: #f6faf8;
    color: #374151;
    position: sticky;
    top: 0;
}

.table-footer {
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.pagination {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.page-btn {
    border: 1px solid rgba(0, 0, 0, 0.16);
    background: #fff;
    color: var(--text);
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
}

.page-btn.active {
    border-color: var(--primary);
    background: #daf4f1;
    color: var(--primary-dark);
}

.hidden {
    display: none !important;
}

.grid-form {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.75rem;
    margin-bottom: 1.1rem;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.3rem;
}

.link-chip {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.link-chip:hover {
    text-decoration: underline;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: #111827;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    box-shadow: 0 12px 25px rgba(17, 24, 39, 0.35);
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field.wide {
        grid-column: span 2;
    }

    .three-col,
    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero,
    .hero-admin {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
