:root {
    --bg: #010312;
    --bg-accent: radial-gradient(circle at 20% 20%, rgba(122, 226, 255, 0.25), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(244, 132, 95, 0.25), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(111, 79, 244, 0.25), transparent 55%);
    --surface: rgba(9, 12, 26, 0.85);
    --surface-alt: rgba(17, 25, 52, 0.9);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    --text: #f4f7ff;
    --muted: #9eadd8;
    --primary: #ffb347;
    --primary-dark: #f4845f;
    --accent: #7ae2ff;
    --success: #3cf0a0;
    --danger: #ff7b9c;
    font-family: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #010312;
    background-image: var(--bg-accent);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(7, 15, 40, 0.8), rgba(8, 12, 30, 0.95));
    z-index: -1;
}

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

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

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

.site-header {
    padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    background: rgba(1, 3, 18, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.brand {
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent);
}

.button {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #05070f;
    box-shadow: 0 20px 45px rgba(255, 179, 71, 0.25);
}

.button-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--accent);
}

.button-ghost {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

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

.hero {
    padding: 3rem clamp(1.5rem, 5vw, 5rem) 2rem;
}

.hero-grid {
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: clamp(2rem, 4vw, 4rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.hero-grid::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(122, 226, 255, 0.35), rgba(255, 179, 71, 0.25));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    margin: 1rem 0;
}

.hero-copy p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.eyebrow {
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-panel {
    background: var(--surface-alt);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--border);
    display: grid;
    gap: 1.5rem;
}

.hero-panel h3 {
    margin: 0.3rem 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.pill svg {
    width: 0.9rem;
    height: 0.9rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    padding: 2rem clamp(1.5rem, 5vw, 4rem);
}

.metric-card {
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.25rem;
    background: rgba(10, 15, 34, 0.85);
}

.metric-card span {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 0.35rem;
}

.panel {
    padding: clamp(2rem, 4vw, 4rem);
}

.panel h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.workflow-step {
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.workflow-step h3 {
    margin: 0 0 0.5rem;
}

.form-card {
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    background: rgba(5, 8, 22, 0.9);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--muted);
}

input,
textarea,
select {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem 1rem;
    color: var(--text);
}

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

.form-feedback {
    min-height: 1.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.form-feedback[data-state="success"] {
    color: var(--success);
}

.form-feedback[data-state="error"] {
    color: var(--danger);
}

.dashboard-body {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(7, 13, 30, 0.95), rgba(4, 7, 17, 0.95)), var(--bg-accent);
    color: var(--text);
}

.dashboard-header {
    padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-layout {
    padding: clamp(1.5rem, 4vw, 3.5rem);
    display: grid;
    gap: 2rem;
}

.dashboard-hero {
    border-radius: 1.75rem;
    padding: 2rem;
    border: 1px solid var(--border);
    background: rgba(9, 12, 30, 0.9);
    display: grid;
    gap: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stats-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.job-list {
    border-radius: 1.75rem;
    border: 1px solid var(--border);
    background: rgba(7, 10, 26, 0.9);
    padding: 2rem;
    display: grid;
    gap: 1.25rem;
}

.job-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--muted);
}

.tag-list {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

.status-chip {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-shell {
    background: linear-gradient(135deg, rgba(5, 7, 18, 0.95), rgba(9, 13, 24, 0.95));
    min-height: 100vh;
    color: var(--text);
}

.admin-header {
    padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
}

.admin-main {
    padding: clamp(1.5rem, 4vw, 4rem);
    display: grid;
    gap: 2.5rem;
}

.control-hero {
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: rgba(8, 11, 27, 0.95);
    padding: clamp(2rem, 4vw, 4rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.command-center {
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: rgba(6, 9, 22, 0.9);
    padding: clamp(2rem, 4vw, 4rem);
    display: grid;
    gap: 2rem;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.data-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.72rem;
    color: var(--muted);
}

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

.control-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ops-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feed-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ops-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.3rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
}

.notice-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.5rem;
}

.notice-card-pinned {
    border-color: rgba(255, 179, 71, 0.5);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.1);
}

.notice-card .notice-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.history-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.history-results {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.history-results p {
    margin: 0;
}

.status-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status-live {
    background: rgba(60, 240, 160, 0.2);
    color: var(--success);
}

.status-open {
    background: rgba(122, 226, 255, 0.15);
    color: var(--accent);
}

.status-assigned,
.status-submitted {
    background: rgba(255, 179, 71, 0.18);
    color: var(--primary);
}

.status-approved {
    background: rgba(60, 240, 160, 0.18);
    color: var(--success);
}

.status-paid {
    background: rgba(111, 79, 244, 0.2);
    color: #b39cff;
}

.status-pending {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.ops-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.list-meta {
    font-size: 0.9rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.5rem 0;
}

.form-feedback[data-state="pending"] {
    color: var(--accent);
}

.payout-form {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    margin-top: 1rem;
}

details summary {
    cursor: pointer;
    color: var(--accent);
}

.footer {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.timeline article {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.02);
}

.secure-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
