:root {
    
    --bg-black: #0D0D0D; 
    --panel-dark: #222222; 
    --accent-neon: #CCFF00; 
    
    
    --text-light: #F0F0F0;
    --text-muted: #888888;
    --text-dark: #0D0D0D;
    --font-family: 'Inter', sans-serif;
    
    
    --radius-main: 24px;
    --radius-pill: 99px;
    --radius-small: 12px;
    --grout-thickness: 6px;
    /* запас под фиксированный bottom-nav (bottom 24px + высота пилюли + отступ) */
    --bottom-nav-spacer: calc(32px + 56px + 24px + env(safe-area-inset-bottom, 0px));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-black);
    color: var(--text-light);
    
    padding: var(--grout-thickness);
    padding-bottom: 100px; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}


.panel {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.panel-neon {
    background-color: var(--accent-neon);
    color: var(--text-dark);
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.logo-dot {
    width: 24px;
    height: 24px;
    background-color: var(--accent-neon);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.lucide-icon {
    flex-shrink: 0;
    stroke-width: 2;
}

.lucide-icon--logo {
    width: 12px;
    height: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
}

.lucide-icon--avatar {
    width: 18px;
    height: 18px;
}


.hero-action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.hero-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: auto;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 32px;
}

.tag {
    background-color: rgba(0,0,0,0.1);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
}

.play-btn-wrapper {
    width: 48px;
    height: 48px;
    background-color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-neon);
}

.lucide-icon--play {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}


.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grout-thickness);
    
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.stat-card {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -1px;
    color: var(--text-light);
}

.stat-value.highlight {
    color: var(--accent-neon);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.3;
}

.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lucide-icon--stat {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    opacity: 0.85;
}

.stat-card:first-child .lucide-icon--stat {
    color: var(--accent-neon);
    opacity: 1;
}


.section-header {
    padding: 16px 8px 8px 8px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 13px;
    color: var(--accent-neon);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lucide-icon--view {
    width: 12px;
    height: 12px;
    opacity: 0.9;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}

.history-item {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lucide-icon--history {
    width: 13px;
    height: 13px;
    color: var(--text-muted);
    opacity: 0.7;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.history-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-neon);
}

.status-dot.needs-work {
    background-color: #FF5E5E; 
}

.history-score {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: var(--radius-small);
}


.bottom-nav-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.bottom-nav {
    background-color: var(--accent-neon);
    padding: 8px;
    border-radius: var(--radius-pill);
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
}

.nav-item {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition:
        background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease;
}

.nav-item:active {
    transform: scale(0.97);
}

.nav-item.active {
    background-color: var(--text-dark);
    color: var(--accent-neon);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.lucide-icon--nav {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item.active .lucide-icon--nav {
    transform: scale(1.06);
}


.ai-feedback {
    border-radius: var(--radius-main);
    padding: 24px;
    background-color: var(--panel-dark);
    position: relative;
}

.ai-feedback::before {
    content: '';
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 4px;
    background-color: var(--accent-neon);
    border-radius: 0 4px 4px 0;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-avatar {
    width: 24px;
    height: 24px;
    background-color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lucide-icon--ai {
    width: 14px;
    height: 14px;
    color: var(--text-dark);
}

.feedback-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.feedback-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-light);
}

.tab-panels {
    width: 100%;
}

.tab-panel {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: var(--grout-thickness);
}

.tab-panel.active {
    display: flex;
    animation: tabFadeIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tab-panel {
        animation: none;
    }
    .nav-item,
    .nav-item .lucide-icon--nav {
        transition-duration: 0.01ms;
    }
    .nav-item:active {
        transform: none;
    }
    .save-pill--pending {
        animation: none;
    }
    .vac-card:hover,
    .vac-card:focus-visible {
        transform: none;
    }
}

.nav-item {
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: transparent;
}

.nav-item:focus-visible {
    outline: 2px solid var(--text-dark);
    outline-offset: 2px;
}

.hr-field-panel {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hr-field-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-neon);
    letter-spacing: 0.02em;
}

.hr-field-label {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.hr-field-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.hr-field-hint em {
    font-style: normal;
    color: var(--text-light);
    opacity: 0.85;
}

.hr-input,
.hr-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-light);
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.hr-input {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    resize: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    line-height: 1.35;
}

.hr-textarea {
    height: 118px;
    min-height: 118px;
    max-height: 118px;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.45;
    -webkit-overflow-scrolling: touch;
}

.hr-textarea--tall {
    height: 168px;
    min-height: 168px;
    max-height: 168px;
}

.hr-input::placeholder,
.hr-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.9;
}

.hr-input:focus,
.hr-textarea:focus {
    outline: none;
    border-color: var(--accent-neon);
    background: rgba(204, 255, 0, 0.06);
}

.hr-saved {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

.hr-saved.visible {
    color: var(--accent-neon);
}

/* --- MVP: слоты вакансий, чат, модалка --- */

.auth-banner {
    background: rgba(204, 255, 0, 0.12);
    border: 1px solid rgba(204, 255, 0, 0.35);
    border-radius: var(--radius-main);
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-banner--err {
    border-color: rgba(255, 94, 94, 0.5);
    background: rgba(255, 94, 94, 0.08);
}

.hidden {
    display: none !important;
}

.vacancy-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.slot-chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border-radius: var(--radius-pill);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.slot-chip.active {
    border-color: var(--accent-neon);
    background: rgba(204, 255, 0, 0.12);
    color: var(--accent-neon);
}

.play-btn-wrapper {
    cursor: pointer;
}

body.chat-open {
    padding-bottom: 24px;
}

body.chat-open .bottom-nav-container {
    display: none;
}

body.sheet-open {
    overflow: hidden;
}

/* Bottom sheet (как Tailwind / Headless UI) */
.sheet-root {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 0.38s;
}

.sheet-root.sheet-root--open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s linear 0s;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.32s ease;
}

.sheet-root--open .sheet-backdrop {
    opacity: 1;
}

.sheet-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    max-height: min(88dvh, 560px);
    display: flex;
    flex-direction: column;
    padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55);
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-root--open .sheet-panel {
    transform: translateY(0);
}

.sheet-grabber {
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px auto 6px;
    flex-shrink: 0;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sheet-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.sheet-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.sheet-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sheet-lead {
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px 20px 8px;
    line-height: 1.4;
}

.sheet-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet-empty {
    text-align: center;
    padding: 28px 20px 36px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.sheet-empty strong {
    color: var(--text-light);
    font-weight: 600;
}

.sheet-row {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-main);
    background: rgba(0, 0, 0, 0.25);
    padding: 16px 18px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition:
        border-color 0.2s,
        background 0.2s,
        transform 0.15s;
}

.sheet-row:hover,
.sheet-row:focus-visible {
    border-color: rgba(204, 255, 0, 0.35);
    background: rgba(204, 255, 0, 0.06);
}

.sheet-row:active {
    transform: scale(0.99);
}

.sheet-row:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

.sheet-row__main {
    flex: 1;
    min-width: 0;
}

.sheet-row__slot {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-neon);
    margin-bottom: 4px;
}

.sheet-row__title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.25px;
    line-height: 1.25;
}

.sheet-row__sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sheet-row .lucide-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .sheet-root,
    .sheet-backdrop,
    .sheet-panel {
        transition-duration: 0.01ms;
    }
}

.chat-layer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-black);
    display: none;
    flex-direction: column;
    padding: var(--grout-thickness);
    padding-bottom: calc(var(--grout-thickness) + env(safe-area-inset-bottom, 0));
    gap: var(--grout-thickness);
}

.chat-layer.open {
    display: flex;
}

.chat-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--panel-dark);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
}

.chat-title-block {
    flex: 1;
    min-width: 0;
}

.chat-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.chat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-done {
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--accent-neon);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 13px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 4px 120px;
}

.chat-bubble {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble--assistant {
    align-self: flex-start;
    background: var(--panel-dark);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-bubble--user {
    align-self: flex-end;
    background: rgba(204, 255, 0, 0.14);
    border: 1px solid rgba(204, 255, 0, 0.35);
    color: var(--text-light);
}

.chat-bubble--system {
    align-self: center;
    max-width: 100%;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    border: none;
}

.chat-compose {
    position: fixed;
    left: var(--grout-thickness);
    right: var(--grout-thickness);
    bottom: calc(24px + env(safe-area-inset-bottom, 0));
    display: flex;
    gap: 8px;
    align-items: flex-end;
    z-index: 210;
}

.chat-compose textarea {
    flex: 1;
    min-height: 48px;
    max-height: 120px;
    resize: none;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-family: inherit;
    font-size: 15px;
    padding: 12px 14px;
}

.chat-compose textarea:focus {
    outline: none;
    border-color: var(--accent-neon);
}

.chat-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-neon);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

button.history-item {
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--panel-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.history-item:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
}

.modal-overlay.open {
    display: flex;
}

.modal-sheet {
    background: var(--panel-dark);
    border-radius: var(--radius-main);
    max-height: 78vh;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
    white-space: pre-wrap;
}

/* --- Настройки: меню вакансий и редактор анкеты --- */

.settings-hero {
    padding: 22px 24px;
    background: linear-gradient(145deg, rgba(204, 255, 0, 0.14) 0%, rgba(34, 34, 34, 1) 42%, rgba(34, 34, 34, 1) 100%);
    border: 1px solid rgba(204, 255, 0, 0.22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.settings-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dark);
    background: var(--accent-neon);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.settings-hero__title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.6px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.settings-hero__text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 36rem;
}

.vacancy-menu-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vacancies-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-sessions-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vac-add-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-main);
    border: 1px dashed rgba(204, 255, 0, 0.4);
    background: rgba(204, 255, 0, 0.07);
    color: var(--accent-neon);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.15s;
}

.vac-add-more:hover {
    background: rgba(204, 255, 0, 0.12);
    border-color: rgba(204, 255, 0, 0.55);
}

.vac-add-more:active {
    transform: scale(0.99);
}

.vac-add-more__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.vac-add-more-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    padding: 2px 8px 0;
    line-height: 1.4;
}

.settings-sessions-lead {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 8px 10px;
    line-height: 1.4;
}

.vac-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 420px) {
    .vac-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.vac-card {
    position: relative;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(34, 34, 34, 0.96) 55%);
    border-radius: var(--radius-main);
    padding: 18px 18px 16px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.22s ease,
        box-shadow 0.22s ease;
    overflow: hidden;
}

.vac-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: radial-gradient(120% 80% at 100% 0%, rgba(204, 255, 0, 0.12), transparent 55%);
}

.vac-card:hover,
.vac-card:focus-visible {
    border-color: rgba(204, 255, 0, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.vac-card:hover::before,
.vac-card:focus-visible::before {
    opacity: 1;
}

.vac-card:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

.vac-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.vac-card__slot {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-neon);
}

.vac-card__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.vac-card__badge--empty {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.vac-card__badge--draft {
    background: rgba(255, 193, 7, 0.15);
    color: #ffd666;
}

.vac-card__badge--ready {
    background: rgba(204, 255, 0, 0.16);
    color: var(--accent-neon);
}

.vac-card__title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.25;
    min-height: 2.5em;
}

.vac-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

.vac-card__bar {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.vac-card__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(204, 255, 0, 0.25), var(--accent-neon));
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.vac-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-neon);
    margin-top: 2px;
}

.vac-card__cta .lucide-icon {
    width: 14px;
    height: 14px;
}

.vacancy-editor {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    flex: 1;
    min-height: 0;
}

.vacancy-editor.hidden {
    display: none;
}

.vac-editor-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vac-editor-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}

.vac-editor-back:active {
    transform: scale(0.96);
}

.vac-editor-back:hover {
    background: rgba(204, 255, 0, 0.12);
}

.vac-editor-head__center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vac-editor-heading {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.vac-editor-tagline {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.3;
}

.vac-editor-save {
    flex-shrink: 0;
    align-self: center;
    max-width: 40%;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
}

.save-pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.save-pill--idle {
    color: var(--text-muted);
}

.save-pill--pending {
    border-color: rgba(204, 255, 0, 0.35);
    color: var(--accent-neon);
    animation: savePulse 1.1s ease-in-out infinite;
}

.save-pill--saving {
    border-color: rgba(120, 200, 255, 0.4);
    color: #9bdcff;
}

.save-pill--saved {
    border-color: rgba(204, 255, 0, 0.5);
    background: rgba(204, 255, 0, 0.12);
    color: var(--accent-neon);
}

.save-pill--error {
    border-color: rgba(255, 94, 94, 0.45);
    background: rgba(255, 94, 94, 0.1);
    color: #ff9b9b;
}

@keyframes savePulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

.vac-editor-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 28px;
    max-height: min(72vh, calc(100dvh - 200px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.form-section {
    border-radius: var(--radius-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(34, 34, 34, 0.65);
    overflow: visible;
}

.form-section__summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.form-section__summary::-webkit-details-marker {
    display: none;
}

.form-section__chev {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.25s ease;
}

.form-section[open] .form-section__chev {
    transform: translateY(-35%) rotate(-135deg);
}

.form-section__icon {
    width: 22px;
    height: 22px;
    color: var(--accent-neon);
    flex-shrink: 0;
}

.form-section__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 28px;
}

.form-section__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.form-section__sub {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

.form-section__body {
    padding: 0 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hr-field-panel--inset {
    margin: 0;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Редактор вакансии: явная вёрстка (Telegram WebView / сбросы summary) */
#vacancy-editor-view {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
    -webkit-tap-highlight-color: transparent;
}

/* Убираем «синее выделение» текста и лишний фокус WebView (кроме полей ввода) */
#vacancy-editor-view ::selection {
    background: rgba(204, 255, 0, 0.22);
    color: var(--text-light);
}

#vacancy-editor-view .vac-editor-head,
#vacancy-editor-view .vac-editor-heading,
#vacancy-editor-view .vac-editor-tagline,
#vacancy-editor-view .save-pill,
#vacancy-editor-view summary.form-section__summary,
#vacancy-editor-view .form-section__title,
#vacancy-editor-view .form-section__sub,
#vacancy-editor-view .hr-field-num,
#vacancy-editor-view .hr-field-label {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

#vacancy-editor-view .hr-input,
#vacancy-editor-view .hr-textarea {
    -webkit-user-select: text;
    user-select: text;
}

#vacancy-editor-view *:focus {
    outline: none;
}

#vacancy-editor-view .vac-editor-back:focus-visible,
#vacancy-editor-view summary.form-section__summary:focus-visible {
    outline: 2px solid rgba(204, 255, 0, 0.5);
    outline-offset: 2px;
}

#vacancy-editor-view .hr-input:focus,
#vacancy-editor-view .hr-textarea:focus {
    outline: none;
    border-color: var(--accent-neon);
    background: rgba(204, 255, 0, 0.06);
}

#vacancy-editor-view .vac-editor-head.panel {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    overflow: visible;
}

#vacancy-editor-view details.form-section {
    display: block;
    width: 100%;
    box-sizing: border-box;
    /* overflow:hidden на <details> ломает высоту раскрытого контента в WebKit / Telegram */
    overflow: visible !important;
    flex-shrink: 0;
    margin: 0;
    position: relative;
    z-index: 0;
    background: rgba(34, 34, 34, 0.92);
    border-radius: var(--radius-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#vacancy-editor-view summary.form-section__summary {
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    list-style: none;
}

#vacancy-editor-view summary.form-section__summary::-webkit-details-marker {
    display: none;
}

#vacancy-editor-view .form-section__body {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    padding: 4px 14px 16px !important;
}

#vacancy-editor-view .hr-field-panel,
#vacancy-editor-view .hr-field-panel.hr-field-panel--inset {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 18px 20px !important;
    background-color: rgba(0, 0, 0, 0.32) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-main) !important;
}

#vacancy-editor-view .hr-field-num {
    display: block;
    width: 100%;
}

#vacancy-editor-view .hr-field-label {
    display: block;
    width: 100%;
}

#vacancy-editor-view .hr-field-hint {
    display: block;
    width: 100%;
    margin: 0;
}

#vacancy-editor-view .hr-input,
#vacancy-editor-view .hr-textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}

#vacancy-editor-view .vac-editor-scroll {
    flex: 1 1 auto;
    min-height: 180px;
    max-height: min(75dvh, calc(100dvh - 168px));
    width: 100%;
    box-sizing: border-box;
    gap: 16px !important;
    padding-top: 4px;
    /* контент не уезжает под плавающее меню */
    padding-bottom: max(28px, var(--bottom-nav-spacer)) !important;
    scroll-padding-bottom: max(28px, var(--bottom-nav-spacer));
}

#tab-hr.hr-editing {
    flex: 1;
    min-height: 0;
    align-self: stretch;
}

#tab-hr.hr-editing .vacancy-menu-view {
    display: none;
}

#tab-hr.hr-editing .vacancy-editor {
    display: flex !important;
    flex: 1;
    min-height: 0;
    width: 100%;
}
