:root {
    --bg: #07111f;
    --bg-soft: #0d1830;
    --panel: rgba(10, 19, 40, 0.88);
    --panel-strong: #11203f;
    --line: rgba(255, 255, 255, 0.08);
    --text: #eef4ff;
    --muted: #9bb0d0;
    --primary: #61d2ff;
    --primary-strong: #2fb4ea;
    --accent: #90f6c8;
    --danger: #ff8d8d;
    --success: #86efac;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(97, 210, 255, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(144, 246, 200, 0.15), transparent 22%),
        linear-gradient(180deg, #06101d 0%, #0a1427 55%, #07111f 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-shell,
.dashboard-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px;
}

.site-header,
.site-footer,
.dashboard-topbar,
.content-card,
.job-card,
.company-card,
.metric-card,
.pill-card,
.auth-panel,
.filters-panel,
.listing-panel,
.cta-card,
.mini-card {
    backdrop-filter: blur(18px);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.site-header,
.site-footer,
.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
}

.site-header,
.dashboard-topbar {
    position: sticky;
    top: 16px;
    z-index: 20;
}

.page,
.dashboard-main {
    padding: 28px 0;
}

.brand-mark {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.site-nav,
.site-actions,
.footer-links,
.auth-links {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a,
.dashboard-nav a,
.footer-links a,
.auth-links a,
.mini-link {
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-nav a:hover,
.dashboard-nav a:hover,
.footer-links a:hover,
.auth-links a:hover,
.mini-link:hover {
    color: var(--text);
}

.dashboard-nav {
    display: grid;
    gap: 8px;
}

.dashboard-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.dashboard-nav a:hover {
    border-color: rgba(97, 210, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #021018;
}

.button-muted {
    background: rgba(255, 255, 255, 0.05);
}

.button-outline {
    border-color: rgba(97, 210, 255, 0.35);
    background: transparent;
}

.button-block {
    width: 100%;
}

.button-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.button-link-danger {
    color: var(--danger);
}

.hero,
.page-hero {
    padding: 42px;
    border-radius: 36px;
    background: linear-gradient(140deg, rgba(17, 32, 63, 0.95), rgba(8, 18, 36, 0.95));
    border: 1px solid rgba(97, 210, 255, 0.14);
    box-shadow: var(--shadow);
}

.hero-home {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 28px;
    align-items: center;
}

.hero h1,
.page-hero h1 {
    margin: 8px 0 0;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1;
}

.hero-title {
    font-size: 1.2rem;
    color: var(--text);
}

.hero-subtitle {
    max-width: 720px;
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 800;
}

.search-shell,
.filter-form,
.stack-form {
    display: grid;
    gap: 14px;
}

.search-shell {
    position: relative;
    grid-template-columns: 1fr auto;
    margin-top: 28px;
}

.search-input,
input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(97, 210, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    outline: none;
}

.search-input {
    box-shadow: 0 0 0 1px rgba(97, 210, 255, 0.18), 0 0 42px rgba(97, 210, 255, 0.18);
}

.autocomplete-box {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 120px;
    display: none;
    background: #0f1d38;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    z-index: 15;
}

.autocomplete-box.active {
    display: block;
}

.autocomplete-item {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.autocomplete-item span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.cta-grid,
.card-grid,
.metric-grid,
.stats-grid,
.dashboard-grid,
.pill-grid {
    display: grid;
    gap: 18px;
}

.cta-grid,
.metric-grid,
.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid,
.pill-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cta-card,
.company-card,
.job-card,
.content-card,
.metric-card,
.pill-card,
.mini-card {
    padding: 22px;
}

.cta-card {
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.metric-card {
    display: grid;
    gap: 10px;
    align-content: start;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.metric-card strong {
    display: block;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1;
    letter-spacing: 0.02em;
}

.cta-card:hover,
.job-card:hover,
.company-card:hover {
    transform: translateY(-4px);
    border-color: rgba(97, 210, 255, 0.34);
}

.cta-card span,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(97, 210, 255, 0.12);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cta-card-accent span {
    background: rgba(144, 246, 200, 0.12);
    color: var(--accent);
}

.content-section {
    margin-top: 26px;
}

.section-heading,
.job-card-footer,
.job-inline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.job-detail-layout,
.filters-layout,
.two-column,
.auth-shell,
.dashboard-shell {
    display: grid;
    gap: 20px;
}

.job-detail-layout,
.filters-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
}

.two-column,
.dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-hero {
    margin-bottom: 22px;
}

.salary-pill {
    display: inline-flex;
    padding: 8px 12px;
    background: rgba(144, 246, 200, 0.13);
    color: var(--accent);
    border-radius: 999px;
    font-weight: 800;
    margin: 12px 0;
}

.detail-list,
.flash-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.sticky-card {
    position: sticky;
    top: 110px;
}

.pagination-wrap {
    margin-top: 20px;
}

.pagination-wrap .pagination {
    display: flex;
    gap: 8px;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.flash {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.flash-success {
    background: rgba(134, 239, 172, 0.1);
    color: var(--success);
}

.flash-error {
    background: rgba(255, 141, 141, 0.1);
    color: var(--danger);
}

.auth-body,
.dashboard-body {
    padding: 24px;
}

.auth-shell {
    max-width: 1180px;
    margin: 0 auto;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: calc(100vh - 48px);
    align-items: stretch;
}

.maintenance-shell {
    min-height: calc(100vh - 48px);
    display: grid;
    place-items: center;
}

.auth-panel {
    padding: 42px;
}

.maintenance-panel {
    width: min(100%, 460px);
}

.auth-brand h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-label {
    display: grid;
    gap: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.form-label-checkbox {
    align-items: center;
}

.form-label-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-help {
    color: var(--muted);
    font-size: 0.86rem;
}

.table-card {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.cv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.mini-card-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.inline-link-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.dashboard-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 24px;
    padding: 24px;
    border-radius: 30px;
    background: rgba(8, 17, 32, 0.92);
    border: 1px solid var(--line);
}

.sidebar-role {
    margin: 12px 0 22px;
}

@media (max-width: 1024px) {
    .hero-home,
    .job-detail-layout,
    .filters-layout,
    .dashboard-shell,
    .auth-shell,
    .two-column,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sticky-card,
    .site-header,
    .dashboard-topbar {
        position: static;
    }
}

@media (max-width: 720px) {
    .site-shell,
    .dashboard-shell,
    .auth-body,
    .dashboard-body {
        padding: 16px;
    }

    .site-header,
    .site-footer,
    .dashboard-topbar,
    .hero,
    .page-hero,
    .auth-panel {
        padding: 20px;
    }

    .search-shell,
    .cta-grid,
    .metric-grid,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .autocomplete-box {
        right: 0;
    }
}

.hero-home-centered {
    grid-template-columns: 1fr;
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
}

.hero-copy-centered {
    max-width: 880px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.hero-copy-centered .hero-title,
.hero-copy-centered .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.hero-search-centered {
    max-width: 760px;
    margin: 12px auto 0;
}

.hero-actions-centered {
    max-width: 720px;
    margin: 0 auto;
}

.section-heading-center {
    justify-content: center;
    text-align: center;
}

.jobs-hero {
    text-align: center;
}

.jobs-page-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.listing-panel-wide {
    padding: 24px;
}

.filters-panel-desktop {
    padding: 24px;
}

.filter-form-shell {
    display: grid;
    gap: 18px;
}

.filter-group {
    display: grid;
    gap: 10px;
}

.filter-group-title {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

.filter-actions {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.active-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.active-filter-chip,
.active-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.active-filter-clear {
    color: var(--primary);
    border: 1px solid rgba(97, 210, 255, 0.2);
}

.job-result-list {
    display: grid;
    gap: 16px;
}

.job-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

.job-result-main,
.job-result-side {
    display: grid;
    gap: 12px;
}

.job-result-side {
    justify-items: end;
    min-width: 180px;
}

.empty-state-card {
    text-align: center;
}

.mobile-filter-button {
    display: none;
    gap: 10px;
}

.filter-toggle-icon {
    position: relative;
    width: 16px;
    height: 12px;
}

.filter-toggle-icon::before,
.filter-toggle-icon::after,
.filter-toggle-icon {
    border-top: 2px solid currentColor;
}

.filter-toggle-icon::before,
.filter-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
}

.filter-toggle-icon::before {
    top: 4px;
}

.filter-toggle-icon::after {
    top: 10px;
}

.filter-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 79;
}

.filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    padding: 24px;
    background: #081224;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 80;
    overflow-y: auto;
}

.filter-drawer.is-open {
    transform: translateX(0);
}

.filter-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.drawer-close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

body.filters-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .jobs-page-shell {
        grid-template-columns: 1fr;
    }

    .filters-panel-desktop {
        display: none;
    }

    .mobile-filter-button {
        display: inline-flex;
    }

    .cv-grid,
    .form-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .hero-search-centered,
    .hero-actions-centered {
        max-width: none;
    }

    .job-result-card {
        grid-template-columns: 1fr;
    }

    .job-result-side {
        justify-items: stretch;
    }

    .cv-grid,
    .form-grid,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .table-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(97, 210, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 18, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 84;
}

.drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    display: none;
}

.mobile-drawer-header,
.dashboard-sidebar-header,
.dashboard-topbar-main,
.dashboard-topbar-actions,
.entity-head,
.profile-media-row,
.account-panel,
.mobile-drawer-nav,
.mobile-drawer-actions {
    display: flex;
    gap: 16px;
}

.mobile-drawer-header,
.dashboard-sidebar-header,
.dashboard-topbar-main,
.dashboard-topbar-actions,
.entity-head,
.profile-media-row,
.account-panel {
    align-items: center;
}

.mobile-drawer-nav,
.mobile-drawer-actions {
    flex-direction: column;
}

.mobile-drawer-nav a {
    color: var(--text);
    font-weight: 600;
}

.mobile-drawer-actions {
    margin-top: auto;
}

.dashboard-sidebar-header,
.mobile-drawer-header {
    justify-content: space-between;
}

.account-panel {
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.account-panel-copy,
.account-chip-text,
.entity-head-copy {
    display: grid;
    gap: 4px;
}

.account-panel-copy strong,
.account-chip-text strong {
    color: var(--text);
}

.account-panel-copy small,
.account-chip-text small {
    color: var(--muted);
}

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.account-chip-panel {
    width: 100%;
    justify-content: flex-start;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 24px;
}

.account-chip-compact {
    padding-right: 14px;
}

.avatar-frame {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(97, 210, 255, 0.2), rgba(144, 246, 200, 0.18));
    border: 1px solid rgba(97, 210, 255, 0.25);
    flex-shrink: 0;
}

.avatar-frame-small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.avatar-frame-large {
    width: 86px;
    height: 86px;
    border-radius: 24px;
}

.avatar-frame-hero {
    width: 120px;
    height: 120px;
    border-radius: 32px;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-fallback {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.profile-media-row {
    align-items: flex-start;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.entity-head {
    margin-bottom: 16px;
}

.company-hero {
    display: flex;
    gap: 24px;
    align-items: center;
}

.hero-home-centered {
    max-width: 1180px;
}

.hero-copy-centered {
    max-width: 1040px;
}

.hero-search-centered {
    max-width: 1120px;
    width: 100%;
}

.hero-search-home {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.hero-search-home .search-input {
    min-height: 0;
    font-size: 1rem;
}

.hero-search-button {
    min-width: 148px;
    align-self: center;
}

.dashboard-topbar {
    justify-content: space-between;
}

.dashboard-topbar-main {
    min-width: 0;
}

.dashboard-topbar-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.dashboard-sidebar {
    display: grid;
    gap: 12px;
}

.dashboard-drawer-close {
    display: none;
}

body.drawer-open {
    overflow: hidden;
}

@media (min-width: 1025px) {
    .drawer-backdrop,
    .mobile-drawer {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .site-nav-desktop,
    .site-actions-desktop {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(380px, 100vw);
        padding: 24px;
        display: flex;
        flex-direction: column;
        gap: 18px;
        background: #081224;
        border-left: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateX(102%);
        transition: transform 0.28s ease;
        z-index: 85;
        overflow-y: auto;
    }

    .mobile-drawer.is-open {
        transform: translateX(0);
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 100vw);
        padding: 22px;
        z-index: 85;
        overflow-y: auto;
        transform: translateX(-104%);
        transition: transform 0.28s ease;
    }

    .dashboard-sidebar.is-open {
        transform: translateX(0);
    }

    .dashboard-drawer-close {
        display: inline-flex;
    }

    .dashboard-topbar-actions .account-chip-text {
        display: none;
    }
}

@media (max-width: 720px) {
    .company-hero,
    .profile-media-row,
    .dashboard-topbar,
    .dashboard-topbar-main,
    .dashboard-topbar-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-topbar-actions,
    .dashboard-topbar-actions .button,
    .dashboard-topbar-actions .account-chip {
        width: 100%;
    }

    .hero-search-home {
        grid-template-columns: 1fr;
    }
}
