/* ==========================================================================
   HH4YOU GLOBAL DESIGN SYSTEM & VARIABLES (LIGHT GLASSMORPHISM EDITION)
   ========================================================================== */

:root {
    /* Page bg: faint lavender tint so white cards pop clearly */
    --bg-dark: hsl(252, 60%, 97%);
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.97);
    /* More visible border so controls read as interactive elements */
    --border-color: rgba(180, 170, 220, 0.55);
    --border-color-glow: hsla(263, 90%, 55%, 0.35);
    
    /* Harmonious Light Theme Palette */
    --primary: hsl(263, 90%, 50%);
    --primary-glow: rgba(124, 58, 237, 0.10);
    --primary-dark: hsl(263, 80%, 40%);
    --secondary: hsl(280, 85%, 48%);
    
    --text-main: hsl(250, 25%, 12%);
    --text-muted: hsl(240, 10%, 48%);
    --text-purple: hsl(263, 90%, 42%);
    
    /* System Colors — softened tints for badges */
    --success: hsl(145, 63%, 32%);
    --success-bg: hsl(145, 72%, 94%);
    --success-border: hsl(145, 55%, 78%);
    --error: hsl(355, 80%, 45%);
    --error-glow: rgba(239, 68, 68, 0.10);
    --info: hsl(195, 80%, 38%);
    --info-glow: rgba(59, 130, 246, 0.10);

    /* Score pill uses brand palette, not green */
    --score-bg: hsl(263, 90%, 96%);
    --score-color: hsl(263, 80%, 42%);
    --score-border: hsl(263, 60%, 84%);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --grad-dark: linear-gradient(160deg, hsl(252, 60%, 97%) 0%, hsl(240, 30%, 94%) 100%);
    
    /* Layout */
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    background-image: var(--grad-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   UTILITY & BUTTON COMPONENTS
   ========================================================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    color: #ffffff;
}

.btn-primary {
    background: var(--grad-primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--text-muted);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}

.btn-glow:hover::after {
    opacity: 1;
    left: 120%;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Alert Boxes */
.alert-box {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid transparent;
}

.error-alert {
    background: var(--error-glow);
    border-color: var(--error);
    color: hsl(355, 80%, 25%);
}

.success-alert {
    background: var(--success-glow);
    border-color: var(--success);
    color: hsl(145, 80%, 20%);
}

.info-alert {
    background: var(--info-glow);
    border-color: var(--info);
    color: hsl(195, 80%, 20%);
}

/* ==========================================================================
   AUTH SCREEN STYLING (Glassmorphism card)
   ========================================================================== */

.auth-wrapper {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-wrapper.active {
    display: flex;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    animation: popUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-title {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: -0.5px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-title i {
    color: var(--primary);
    -webkit-text-fill-color: initial;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    margin-bottom: 25px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    color: var(--text-muted);
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Form inputs styling */
.form-group, .input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.input-icon-wrapper input {
    padding-left: 40px !important;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-speed);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255, 255, 255, 1);
}

/* ==========================================================================
   APP CONTAINER LAYOUT (Sidebar & Main content)
   ========================================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.8);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    backdrop-filter: blur(10px);
}

.sidebar-brand {
    padding-left: 10px;
}

.sidebar-brand .logo-title {
    justify-content: flex-start;
}

.sidebar-brand .logo-subtitle {
    text-align: left;
    margin-bottom: 0;
    margin-top: 4px;
    font-size: 12px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 12px;
}

.user-avatar i {
    font-size: 38px;
    color: var(--primary);
}

.user-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-email {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.tier-badge {
    font-size: 10px;
    background: var(--grad-primary);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    font-weight: 500;
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-speed);
    width: 100%;
}

.nav-item i {
    font-size: 18px;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--error);
    color: var(--error);
}

/* Trial card at bottom of sidebar */
.trial-counter-card {
    background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.08), transparent 70%);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
}

.counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    /* Removed text-transform: uppercase */
    font-weight: 500;
    letter-spacing: 0.2px;
}

.counter-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin: 8px 0;
}

.counter-progress-bg {
    background: rgba(0, 0, 0, 0.05);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.counter-progress-fill {
    background: var(--grad-primary);
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Main Content Area */
.app-content-area {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    max-height: 100vh;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-title {
    font-size: 26px;
    font-weight: 500;
    color: var(--text-main);
}

.view-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Subscription Status Panel */
.subscription-status-panel {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sub-status-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sub-status-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sub-status-text-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-status-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.sub-status-days-text {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
}

/* ==========================================================================
   MATCHES FEED VIEW STYLING
   ========================================================================== */

.matches-list-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.section-heading {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Vacancy Card design */
.match-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-glow);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08);
    background: var(--bg-card-hover);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.platform-badge {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.platform-hh { background-color: #ff5000; color: white; }
.platform-habr { background-color: #85c445; color: black; }
.platform-superjob { background-color: #00b6f0; color: white; }

.match-score-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--success);
    background: var(--success-glow);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

.match-score-badge.high-match {
    color: var(--primary);
    background: var(--primary-glow);
    border-color: rgba(139, 92, 246, 0.2);
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-company {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-actions .btn {
    flex: 1;
}

/* Empty feed */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-icon i {
    font-size: 60px;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 18px;
    color: var(--text-main);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 10px;
}

/* ==========================================================================
   CV & PREFERENCES VIEW STYLING
   ========================================================================== */

.profile-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.panel {
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.panel-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: var(--primary);
}

.flex-fill {
    flex-grow: 1;
}

textarea#input-cv-text {
    resize: none;
    height: 100%;
    min-height: 350px;
    background: rgba(255, 255, 255, 0.9);
    /* Monospace makes raw CV text feel intentional, not accidental */
    font-family: 'Courier New', Consolas, 'Liberation Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    letter-spacing: 0;
}

/* Keyword Extracted Display box */
.keywords-box {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
}

.keywords-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
    /* Removed text-transform: uppercase */
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--score-bg);
    border: 1px solid var(--score-border);
    color: var(--score-color);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Job Format Toggle switches */
.format-toggle-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.toggle-option {
    cursor: pointer;
}

.toggle-option input {
    display: none;
}

.toggle-card {
    display: block;
    background: rgba(255, 255, 255, 0.8);
    /* More visible border makes inactive options feel like real buttons */
    border: 1.5px solid rgba(160, 148, 210, 0.5);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    transition: all var(--transition-speed);
    cursor: pointer;
}

.toggle-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--score-bg);
}

.toggle-option input:checked + .toggle-card {
    background: var(--score-bg);
    border-color: var(--primary);
    border-width: 2px;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
    font-weight: 500;
}

.required-indicator {
    color: var(--error);
}

.field-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* Slider Style */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-val {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    /* Dual-tone track: filled portion in brand purple, rest in light gray */
    /* The --range-fill CSS var is updated by JS on each input event */
    background: linear-gradient(
        to right,
        var(--primary) 0%,
        var(--primary) var(--range-fill, 66%),
        rgba(0, 0, 0, 0.10) var(--range-fill, 66%),
        rgba(0, 0, 0, 0.10) 100%
    );
    height: 6px;
    border-radius: 3px;
    outline: none;
    width: 100%;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.55);
}

/* Checkbox Switch toggles */
.switch-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding-left: 50px;
    user-select: none;
    min-height: 24px;
}

.switch-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 42px;
    background-color: rgba(0, 0, 0, 0.08);
    transition: .4s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
    background-color: var(--primary);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(18px);
}

.switch-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    text-transform: none;
}

/* ==========================================================================
   BILLING LOCKED SCREEN STYLING
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.billing-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.billing-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--error-glow);
    border: 1px solid var(--error);
    color: var(--error);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
}

.billing-title {
    font-size: 24px;
    margin-bottom: 12px;
}

.billing-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.pricing-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 25px;
}

.price-currency {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    vertical-align: super;
}

.price-val {
    font-size: 38px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: var(--text-main);
}

.price-period {
    font-size: 14px;
    color: var(--text-muted);
}

.benefits-list {
    text-align: left;
    list-style: none;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.benefits-list i {
    color: var(--success);
    font-size: 16px;
}

/* ==========================================================================
   MODAL CARD COMPONENTS (Payment & Job details)
   ========================================================================== */

.payment-card, .detail-card {
    width: 100%;
    max-width: 480px;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.detail-card {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    gap: 12px;
}

.detail-card .modal-header {
    margin-bottom: 0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
}

.modal-company {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

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

.modal-close-btn:hover {
    color: var(--text-main);
}

.form-row {
    display: flex;
    gap: 15px;
}

.col-6 {
    flex: 1;
}

/* Detail tabs inside Vacancy Modal */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* .vacancy-link-btn — styling via .btn .btn-secondary .btn-sm classes */
.vacancy-link-btn {
    line-height: normal;
}

.detail-tabs button {
    flex: 1;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: all var(--transition-speed);
    font-family: 'Outfit', sans-serif;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.detail-tabs button:hover {
    color: var(--primary);
    background: var(--score-bg);
}

.detail-tabs button.modal-tabactive {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.modal-scroll-body {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    padding-bottom: 4px;
}

.modal-panel {
    display: none;
}

.modal-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Cover letter preview tab content */
.cover-letter-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}



/* Fix: Copy button uses flex row so icon + text stay inline */
#btn-copy-letter {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: normal;
}

.code-box-content {
    background: #FAFAFA;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    font-family: inherit;
    font-size: 14px;
    white-space: pre-line;
    line-height: 1.75;
    color: var(--text-main);
}

/* Matching linear progress bar */
.match-score-linear-container {
    margin: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linear-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.linear-progress-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.linear-progress-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

.linear-progress-bg {
    background: rgba(0, 0, 0, 0.05);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.linear-progress-fill {
    background: var(--grad-primary);
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reason-heading {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 20px;
    margin-bottom: 8px;
    /* Removed text-transform: uppercase — now Title Case in HTML */
    letter-spacing: 0.1px;
}

.reason-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-main);
    /* Added brand-tinted background so blockquote reads as AI content */
    background: hsl(263, 80%, 97%);
    padding: 16px 18px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* Original Vacancy text tab */
.desc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.meta-label {
    font-size: 12px;
    color: var(--text-muted);
}


.description-text-view {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-main);
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes popUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-pop {
    animation: popUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary-glow)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 10px var(--primary)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary-glow)); }
}

/* ==========================================================================
   FEED FILTER BAR STYLING
   ========================================================================== */
.feed-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all var(--transition-speed);
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.9);
}

.filter-pill.active {
    background: var(--grad-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.filter-badge {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.filter-pill.active .filter-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ==========================================================================
   SOCIAL ACTIVITY FEED CARD STYLING
   ========================================================================== */
.matches-grid {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

.social-feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all var(--transition-speed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* On desktop the row wrappers are invisible — children flow into the card's flex row */
.card-row-top,
.card-row-bottom {
    display: contents;
}

.social-feed-card:hover {
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.08);
    border-color: var(--border-color-glow);
    background: var(--bg-card-hover);
}

.applied-border {
    /* Reduced 5px → 3px: still clear signal without being distracting */
    border-left: 3px solid rgba(22, 163, 74, 0.75) !important;
}

.vacancy-logo-col {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
}

.compact-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.compact-logo.platform-hh { background: #ff5000; }
.compact-logo.platform-habr { background: #85c445; }
.compact-logo.platform-superjob { background: #00b6f0; }

.vacancy-details-col {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.compact-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.compact-title:hover {
    color: var(--primary);
    text-decoration: underline;
}

.company-name-row {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vacancy-score-col {
    flex-shrink: 0;
}

.compact-score {
    font-size: 12px;
    font-weight: 500;
    height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    white-space: nowrap;
    /* Default (normal match): soft brand color — doesn't compete with green Applied badge */
    background: var(--score-bg);
    color: var(--score-color);
    border: 1px solid var(--score-border);
    font-family: 'Outfit', sans-serif;
}

.compact-score.high-match {
    /* High match (≥85%): slightly deeper purple for extra emphasis */
    background: hsl(263, 85%, 93%);
    color: hsl(263, 80%, 36%);
    border-color: hsl(263, 60%, 78%);
    font-weight: 500;
}

.vacancy-actions-col {
    display: flex;
    align-items: center;
    gap: 8px; /* Slightly reduced gap for better horizontal fit */
    flex-shrink: 0;
}

.compact-applied-btn {
    background: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12px; /* Set to 12px to match score pill */
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    height: 28px;
    padding: 0 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.compact-applied-btn:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

.compact-applied-btn.applied {
    color: var(--success);
    background: var(--success-bg);
    border-color: var(--success-border);
}

.compact-applied-btn i {
    font-size: 14px; /* Slightly smaller icon to match text size */
    transition: transform var(--transition-speed);
}

.compact-applied-btn:active i {
    transform: scale(1.2);
}

.compact-more-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    height: 28px;
    padding: 0 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.compact-more-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--text-muted);
}

.vacancy-applied-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    /* Softer green: tinted bg + darker text, not over-saturated */
    color: var(--success);
    background: var(--success-bg);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--success-border);
}

.vacancy-applied-indicator i {
    font-size: 14px;
}

.modal-company-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

/* Replace bullet divider with a slash — less ambiguous */
.modal-company-divider {
    color: var(--border-color);
    font-size: 14px;
    font-weight: 300;
    user-select: none;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
.mobile-header {
    display: none;
}

.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Layout structural changes */
    .app-sidebar {
        display: none !important; /* Hide sidebar */
    }
    
    .app-layout {
        flex-direction: column;
    }
    
    .app-content-area {
        padding: 15px !important;
        margin-top: 60px;
        margin-bottom: 60px;
        max-height: calc(100vh - 120px) !important;
        overflow-y: auto;
    }
    
    /* Mobile header at top */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 0 15px;
        z-index: 990;
        box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    }
    
    .mobile-header .logo-title {
        font-size: 20px;
    }
    
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    /* Mobile bottom navigation */
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        z-index: 990;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
        padding: 0 10px;
    }
    
    .mobile-nav-item {
        flex: 1;
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        font-family: 'Outfit', sans-serif;
        font-size: 10px;
        font-weight: 500;
        cursor: pointer;
        height: 100%;
        gap: 2px;
        transition: all var(--transition-speed);
        border-radius: 8px;
    }
    
    .mobile-nav-item i {
        font-size: 20px;
    }
    
    .mobile-nav-item.active {
        color: var(--primary);
        background: rgba(139, 92, 246, 0.05);
    }
    
    /* Profile preferences view changes */
    .profile-layout {
        grid-template-columns: 1fr !important; /* Stack columns */
        gap: 20px;
    }
    
    .view-header {
        display: none !important; /* Hide duplicate headers */
    }
    
    /* Subscription panel layout changes */
    .subscription-status-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        margin-bottom: 15px;
    }
    
    .subscription-status-panel .sub-status-info {
        gap: 10px;
    }

    .subscription-status-panel .sub-status-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .subscription-status-panel .sub-status-header {
        display: none;
    }

    .subscription-status-panel .sub-status-days-text {
        font-size: 13px;
    }

    .subscription-status-panel .sub-status-label {
        font-size: 11px;
    }
    
    .subscription-status-panel #btn-sub-action {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Matches section and filter bar adjustments */
    .matches-list-section {
        padding: 12px;
    }

    .feed-filter-bar {
        margin-bottom: 10px;
    }
    
    .filter-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Feed card adjustments */
    .social-feed-card {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    /* Row 1: logo + title/company */
    .card-row-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-width: 0;
    }

    /* Row 2: score chip + action buttons */
    .card-row-bottom {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }

    .vacancy-actions-col {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* Mobile overrides for chips to fit perfectly without overflow */
    .compact-score,
    .compact-applied-btn,
    .compact-more-btn {
        height: 26px;
        padding: 0 8px;
        font-size: 11px;
    }

    .compact-applied-btn i {
        font-size: 12px;
    }
    
    /* Modal adjustments */
    .payment-card, .detail-card, .billing-card {
        padding: 20px;
        border-radius: 12px;
        width: 100%;
        max-width: 92vw;
    }
    
    .detail-card {
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    
    .modal-scroll-body {
        max-height: calc(90vh - 120px) !important;
    }
    
    .price-val {
        font-size: 32px;
    }
}
