﻿:root {
    --bg: #0f172a;
    --surface: #1a2848;
    --surface-alt: #0f1d3b;
    --primary: #22c55e;
    --primary-soft: rgba(34, 197, 94, 0.15);
    --text: #ffffff;
    --muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 20px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 163, 127, 0.12), transparent 25%),
        var(--bg);
    color: var(--text);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 2rem;
    background: rgba(8, 21, 52, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.nav-link {
    color: var(--muted);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active-link {
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
}

.hidden {
    display: none !important;
}

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 2rem auto 3rem;
    display: grid;
    gap: 1.75rem;
}

.page-header-block,
.auth-card,
.profile-card,
.admin-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.page-header-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-header-block h1,
.auth-head h1,
.profile-head h1,
.admin-card h2,
.admin-form-card h2 {
    margin: 0;
}

.page-header-block p,
.auth-head p,
.profile-head p,
.admin-card p,
.profile-card p {
    margin-top: 0.6rem;
    color: var(--muted);
}

.page-alert,
.form-message {
    color: var(--danger);
    min-height: 1.4rem;
    margin: 0;
}

.jobs-grid {
    display: grid;
    gap: 1.25rem;
}

.job-card,
.admin-job-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.job-card h3,
.admin-job-card h3 {
    margin: 0 0 0.5rem;
}

.job-card p,
.admin-job-card p {
    margin: 0.45rem 0;
    color: var(--muted);
}

.job-meta,
.admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.job-meta span,
.admin-meta span {
    font-size: 0.95rem;
    color: var(--muted);
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 0.5rem;
}

label {
    color: var(--muted);
    font-size: 0.95rem;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    background: var(--surface-alt);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.primary-button,
.secondary-button {
    border: none;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: var(--primary);
    color: white;
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.15);
}

.secondary-button {
    background: var(--surface-alt);
    color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.small-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.profile-details {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-alt);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    padding: 1rem 1.15rem;
}

.profile-item strong {
    color: var(--muted);
    font-weight: 600;
}

.profile-item span {
    color: var(--text);
}

.admin-grid {
    display: grid;
    gap: 1.5rem;
}

.admin-form-card {
    max-width: 540px;
}

.admin-job-list {
    display: grid;
    gap: 1rem;
}

.admin-job-card {
    border-radius: 18px;
    padding: 1.3rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.admin-job-card .admin-controls {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-job-card button {
    min-width: 100px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 900px) {
    .admin-grid {
        grid-template-columns: 380px 1fr;
    }

    .jobs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .nav-bar {
        width: 100%;
    }

    .job-meta,
    .admin-meta,
    .form-actions {
        flex-direction: column;
    }
}
