/* ============================================
   ATS FORGE - Premium CV Architect UI
   Glassmorphic design matching portfolio
   ============================================ */

/* Forge Particles Background */
.forge-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.forge-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* Hero Section */
.atsforge-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--space-4xl) + 80px) var(--space-xl) var(--space-2xl);
    text-align: center;
}

.atsforge-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.atsforge-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
    color: var(--text-primary);
}

.title-highlight {
    display: block;
}

.atsforge-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

.atsforge-features {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.feature-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.feature-chip svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

/* Main Application */
.atsforge-main {
    padding: 0 var(--space-xl) var(--space-4xl);
}

/* Progress Stepper */
.forge-stepper {
    max-width: 900px;
    margin: 0 auto var(--space-2xl);
    position: relative;
}

.stepper-track {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    z-index: 0;
}

.stepper-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
}

.step-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step-check {
    position: absolute;
    width: 20px;
    height: 20px;
    color: var(--bg-primary);
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-bounce);
}

.step.active .step-indicator {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
    box-shadow: 0 0 20px var(--accent-glow);
}

.step.active .step-number {
    color: var(--accent-primary);
}

.step.completed .step-indicator {
    background: var(--gradient-primary);
    border-color: transparent;
}

.step.completed .step-number {
    opacity: 0;
    transform: scale(0);
}

.step.completed .step-check {
    opacity: 1;
    transform: scale(1);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    transition: color var(--transition-base);
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text-secondary);
}

/* Forge Container */
.forge-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

/* Handled in responsive section below */

/* Forge Panels */
.forge-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.forge-panel-main {
    min-height: 600px;
}

/* Step Content */
.forge-step {
    padding: var(--space-xl);
    animation: stepFadeIn 0.4s ease;
}

.forge-step.hidden {
    display: none;
}

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

.step-header {
    margin-bottom: var(--space-xl);
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Input Tabs */
.input-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.input-tab {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.input-tab:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.input-tab.active {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

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

/* Form Inputs */
.forge-input-group {
    margin-bottom: var(--space-lg);
}

.forge-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.forge-input,
.forge-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.forge-input:focus,
.forge-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.forge-textarea {
    resize: vertical;
    min-height: 120px;
}

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

.input-with-icon svg {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.input-with-icon .forge-input {
    padding-left: calc(var(--space-md) * 2 + 20px);
}

.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.forge-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.forge-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

.forge-btn:hover svg {
    transform: translateX(3px);
}

.forge-btn.loading .btn-text,
.forge-btn.loading svg:not(.loader-svg) {
    opacity: 0;
}

.btn-loader {
    position: absolute;
    display: none;
    gap: 4px;
}

.forge-btn.loading .btn-loader {
    display: flex;
}

.loader-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: loaderBounce 1s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.1s; }
.loader-dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes loaderBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* Analysis Cards */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 600px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

.analysis-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.analysis-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.analysis-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.analysis-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.analysis-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.analysis-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Skills Cloud */
.skills-section,
.keywords-section {
    margin-bottom: var(--space-xl);
}

.skills-section h3,
.keywords-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.skills-cloud,
.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skill-tag,
.keyword-tag {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.skill-tag:hover,
.keyword-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.keyword-tag {
    background: var(--accent-glow);
    border-color: rgba(var(--chatbot-accent), 0.3);
    color: var(--accent-primary);
}

/* Responsibilities List */
.responsibilities-list {
    padding-left: var(--space-lg);
}

.responsibilities-list li {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    padding-left: var(--space-md);
}

.responsibilities-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* Profile Form */
.profile-form {
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--space-md);
}

.profile-form::-webkit-scrollbar {
    width: 6px;
}

.profile-form::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.form-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.forge-input-group.full-width {
    grid-column: 1 / -1;
}

/* Dynamic List Items */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.dynamic-item {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
}

.dynamic-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.remove-item-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: var(--radius-sm);
    color: #ff4757;
    cursor: pointer;
    transition: all var(--transition-base);
}

.remove-item-btn:hover {
    background: rgba(255, 71, 87, 0.2);
}

.remove-item-btn svg {
    width: 16px;
    height: 16px;
}

.add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
}

.add-item-btn svg {
    width: 16px;
    height: 16px;
}

/* Strategy Overview */
.strategy-overview {
    margin-bottom: var(--space-xl);
}

.strategy-card {
    padding: var(--space-lg);
    background: var(--accent-glow);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    position: relative;
}

.strategy-badge {
    position: absolute;
    top: -10px;
    left: var(--space-lg);
    padding: var(--space-xs) var(--space-md);
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
}

.strategy-details {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.strategy-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strategy-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.strategy-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Structure Options */
.structure-options {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.structure-option {
    flex: 1;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.structure-option:hover {
    border-color: var(--border-hover);
}

.structure-option.active {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.structure-option input {
    display: none;
}

.option-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.option-badge {
    padding: 2px var(--space-sm);
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.option-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Section Order List */
.section-order-container h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.section-order-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.section-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: grab;
    transition: all var(--transition-base);
}

.section-item:hover {
    border-color: var(--accent-primary);
}

.section-item.dragging {
    opacity: 0.5;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.drag-handle {
    color: var(--text-muted);
    cursor: grab;
}

.drag-handle svg {
    width: 16px;
    height: 16px;
}

.section-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ATS Score Card */
.ats-score-card {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
}

@media (max-width: 600px) {
    .ats-score-card {
        flex-direction: column;
        text-align: center;
    }
}

.score-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.score-circle {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease;
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.score-unit {
    font-size: 1rem;
    color: var(--text-muted);
}

.score-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: var(--accent-primary);
}

/* CV Preview */
.cv-preview-container {
    margin-bottom: var(--space-xl);
}

.cv-preview {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.7;
}

.cv-preview h1,
.cv-preview h2,
.cv-preview h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.cv-preview h1 {
    font-size: 1.5rem;
}

.cv-preview h2 {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: var(--space-sm);
    margin-top: var(--space-xl);
}

.cv-preview p,
.cv-preview li {
    color: var(--text-secondary);
}

.cv-preview ul {
    padding-left: var(--space-lg);
}

/* Improvements List */
.improvements-list {
    margin-bottom: var(--space-xl);
}

.improvement-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--accent-glow);
    border: 1px solid rgba(var(--chatbot-accent), 0.3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.improvement-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.improvement-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

/* Assistant Panel */
.forge-panel-assistant {
    display: flex;
    flex-direction: column;
    height: 600px;
    position: sticky;
    top: 100px;
}

.assistant-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(var(--chatbot-header-grad-1), 0.12) 0%, rgba(var(--chatbot-header-grad-2), 0.12) 100%);
    border-bottom: 1px solid var(--border-color);
}

.assistant-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.assistant-avatar svg {
    width: 22px;
    height: 22px;
    color: var(--bg-primary);
}

.assistant-info h3 {
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assistant-status {
    font-size: 0.75rem;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.assistant-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.assistant-welcome {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.assistant-welcome p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.assistant-welcome p:last-child {
    margin-bottom: 0;
}

.assistant-message {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    animation: message-in 0.3s ease;
}

.assistant-message.bot {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
    color: var(--text-secondary);
}

.assistant-message.user {
    background: var(--accent-glow);
    border: 1px solid rgba(var(--chatbot-accent), 0.3);
    border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
    color: var(--text-primary);
    align-self: flex-end;
}

.assistant-actions {
    padding: 0 var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.action-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.assistant-input {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.assistant-input textarea {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    resize: none;
    min-height: 40px;
    max-height: 80px;
}

.assistant-input textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.assistant-send {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.assistant-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow);
}

.assistant-send svg {
    width: 18px;
    height: 18px;
    color: var(--bg-primary);
}

/* ============================================
   MOBILE & TABLET RESPONSIVE
   ============================================ */

/* Tablet: 769px - 1200px */
@media (max-width: 1200px) {
    .forge-container {
        grid-template-columns: 1fr;
    }
    .forge-panel-assistant {
        order: -1;
        max-height: 300px;
        position: static;
        height: auto;
    }
    .assistant-messages {
        max-height: 180px;
    }
}

/* Small tablet / large phone: < 768px */
@media (max-width: 768px) {
    .atsforge-hero {
        padding: calc(var(--space-2xl) + 60px) var(--space-md) var(--space-xl);
        min-height: 35vh;
    }
    
    .atsforge-title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }
    
    .atsforge-subtitle {
        font-size: 0.95rem;
    }

    .atsforge-main {
        padding: 0 var(--space-md) var(--space-2xl);
    }
    
    /* Stepper: compact on mobile */
    .forge-stepper {
        margin-bottom: var(--space-lg);
    }
    
    .stepper-steps {
        overflow-x: auto;
        padding-bottom: var(--space-sm);
        gap: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .step {
        min-width: 48px;
    }
    
    .step-indicator {
        width: 34px;
        height: 34px;
    }
    
    .step-number {
        font-size: 0.8rem;
    }
    
    .step-label {
        display: none;
    }
    
    .stepper-track {
        top: 17px;
        left: 24px;
        right: 24px;
    }
    
    /* Assistant panel: compact on mobile */
    .forge-panel-assistant {
        height: auto;
        max-height: 260px;
        position: static;
        border-radius: var(--radius-lg);
    }
    
    .assistant-messages {
        max-height: 140px;
        padding: var(--space-md);
        gap: var(--space-sm);
    }
    
    .assistant-message {
        font-size: 0.82rem;
        padding: var(--space-sm) var(--space-md);
    }
    
    .assistant-message.user {
        margin-left: var(--space-md);
    }
    
    .assistant-message.bot {
        margin-right: var(--space-md);
    }
    
    .assistant-header {
        padding: var(--space-md);
    }
    
    .assistant-avatar {
        width: 36px;
        height: 36px;
    }
    
    .assistant-info h3 {
        font-size: 0.9rem;
    }
    
    .assistant-input {
        padding: var(--space-sm);
    }
    
    .assistant-input textarea {
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    .assistant-send {
        width: 36px;
        height: 36px;
    }
    
    /* Main panel content */
    .forge-step {
        padding: var(--space-md);
    }
    
    .step-header h2 {
        font-size: 1.2rem;
    }
    
    .step-header p {
        font-size: 0.85rem;
    }
    
    .step-header {
        margin-bottom: var(--space-lg);
    }
    
    /* Form inputs: larger touch targets */
    .forge-input,
    .forge-textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: var(--space-sm) var(--space-md);
    }
    
    .forge-textarea {
        min-height: 100px;
    }
    
    .forge-input-group label {
        font-size: 0.82rem;
    }
    
    .input-hint {
        font-size: 0.75rem;
    }
    
    /* Form grid: single column */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Profile form: remove fixed height, natural scroll */
    .profile-form {
        max-height: none;
        padding-right: 0;
    }
    
    /* Form sections */
    .form-section {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .form-section-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .form-section-title {
        font-size: 0.9rem;
    }
    
    /* Dynamic items (work exp, education, projects) */
    .dynamic-item {
        padding: var(--space-md);
    }
    
    .dynamic-item-header {
        margin-bottom: var(--space-sm);
    }
    
    /* BUTTONS: prevent overflow on mobile */
    .step-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .step-actions .forge-btn {
        width: 100%;
        justify-content: center;
        padding: var(--space-md);
        font-size: 0.9rem;
    }
    
    .forge-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
    
    /* Section action buttons */
    .section-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .section-actions .btn,
    .section-actions .enhance-btn,
    .section-actions .forge-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .enhance-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        justify-content: center;
    }
    
    .add-item-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Export buttons: full width stack */
    .export-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .export-actions .forge-btn,
    .export-actions .btn {
        width: 100%;
        justify-content: center;
        min-width: unset;
    }
    
    /* Input tabs */
    .input-tabs {
        flex-wrap: wrap;
    }
    
    .input-tab {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: var(--space-sm);
        font-size: 0.82rem;
    }
    
    /* Analysis cards */
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .analysis-card {
        padding: var(--space-md);
    }
    
    .analysis-icon {
        width: 40px;
        height: 40px;
    }
    
    .analysis-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .analysis-value {
        font-size: 0.9rem;
    }
    
    /* Skills cloud */
    .skills-cloud,
    .keywords-cloud {
        gap: var(--space-xs);
    }
    
    .skill-tag,
    .keyword-tag {
        font-size: 0.75rem;
        padding: 3px var(--space-sm);
    }
    
    /* Structure options */
    .structure-options {
        flex-direction: column;
    }
    
    .structure-option {
        padding: var(--space-md);
    }
    
    /* Section order items */
    .section-item {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
    
    /* ATS Score card */
    .ats-score-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
        gap: var(--space-md);
    }
    
    .score-gauge {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 1.6rem;
    }
    
    /* CV Preview */
    .cv-preview {
        padding: var(--space-md);
        max-height: 350px;
        font-size: 0.82rem;
    }
    
    .cv-preview .cv-header h1 {
        font-size: 1.2rem;
    }
    
    .cv-preview .cv-section-title {
        font-size: 0.75rem;
    }
    
    /* Improvement items */
    .improvement-item {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }
    
    .improvement-item span {
        font-size: 0.8rem;
    }
    
    /* Template grid */
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .template-card {
        padding: var(--space-md);
    }
    
    /* Strategy card */
    .strategy-details {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    /* Feature chips */
    .atsforge-features {
        gap: var(--space-sm);
    }
    
    .feature-chip {
        font-size: 0.78rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .feature-chip svg {
        width: 14px;
        height: 14px;
    }

    /* Refine notice */
    .refine-notice {
        padding: var(--space-sm) var(--space-md);
    }
    
    .refine-notice p {
        font-size: 0.85rem;
    }
}

/* Small phones: < 480px */
@media (max-width: 480px) {
    .atsforge-hero {
        padding: calc(var(--space-xl) + 50px) var(--space-sm) var(--space-lg);
        min-height: 28vh;
    }
    
    .atsforge-title {
        font-size: 1.6rem;
    }
    
    .atsforge-subtitle {
        font-size: 0.85rem;
        margin-bottom: var(--space-md);
    }
    
    .atsforge-main {
        padding: 0 var(--space-sm) var(--space-xl);
    }
    
    .forge-step {
        padding: var(--space-sm);
    }
    
    .step-header h2 {
        font-size: 1.05rem;
    }
    
    .step-header p {
        font-size: 0.8rem;
    }
    
    /* Even more compact assistant */
    .forge-panel-assistant {
        max-height: 220px;
    }
    
    .assistant-messages {
        max-height: 110px;
        padding: var(--space-sm);
    }
    
    .assistant-message {
        font-size: 0.78rem;
        padding: 6px var(--space-sm);
    }
    
    /* Form */
    .form-section {
        padding: var(--space-sm);
    }
    
    .dynamic-item {
        padding: var(--space-sm);
    }
    
    /* Score card extra compact */
    .score-gauge {
        width: 80px;
        height: 80px;
    }
    
    .score-value {
        font-size: 1.3rem;
    }
    
    .score-details h3 {
        font-size: 0.95rem;
    }
    
    .breakdown-item {
        font-size: 0.78rem;
    }
    
    /* CV Preview */
    .cv-preview {
        padding: var(--space-sm);
        max-height: 280px;
        font-size: 0.78rem;
    }
}

/* SVG Gradient Definition (add to HTML) */
.score-gradient-defs {
    position: absolute;
    width: 0;
    height: 0;
}
/* ============================================
   ADDITIONAL STYLES FOR ENHANCED ATS FORGE
   ============================================ */

/* Template Section */
.template-section {
    margin-bottom: var(--space-xl);
}

.template-section h3 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.template-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.template-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.template-card.recommended {
    border-color: var(--accent-secondary);
}

.template-badge {
    position: absolute;
    top: -10px;
    right: var(--space-md);
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.template-card h4 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.template-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.template-reasons {
    margin-top: var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.reason-tag {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* Section Order Improvements */
.section-order-section {
    margin-bottom: var(--space-xl);
}

.section-order-section h3 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.drag-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.section-toggle {
    margin-left: auto;
}

.section-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* Form Section Enhancements */
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.form-section-title {
    margin: 0;
    color: var(--text-primary);
}

.section-status {
    font-size: 0.85rem;
}

.section-status .status-strong {
    color: var(--accent-primary);
}

.section-status .status-adequate {
    color: var(--accent-secondary);
}

.section-status .status-needs-work {
    color: #f59e0b;
}

.section-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.btn-accent {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
}

.btn-accent:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Advantages Section */
.advantages-section {
    margin-top: var(--space-lg);
    display: none;
}

.advantages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advantages-list li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.advantages-list li:last-child {
    border-bottom: none;
}

.advantages-list li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
}

/* Refine Notice */
.refine-notice {
    background: var(--accent-glow);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    text-align: center;
}

.refine-notice p {
    margin: 0;
    color: var(--text-secondary);
}

/* CV Preview Enhancements */
.cv-preview .cv-contact {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

/* Secondary skill tags */
.skill-tag.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Project hint */
.project-hint {
    margin-top: var(--space-sm);
}

/* Assistant message improvements */
.assistant-message.user {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    margin-left: var(--space-xl);
}

.assistant-message.bot {
    margin-right: var(--space-xl);
}

/* Action buttons in assistant */
.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

#assistantActions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    flex-wrap: wrap;
}

/* Loading state improvements */
.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loader {
    display: flex;
}

.btn .btn-loader {
    display: none;
    position: absolute;
    gap: 4px;
}

.loader-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: loaderBounce 0.6s infinite alternate;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    to {
        transform: translateY(-6px);
        opacity: 0.5;
    }
}

/* ============================================
   ATS FORGE - Additional CSS for New Features
   ============================================ */

/* Section Actions with Enhance Buttons */
.section-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.enhance-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enhance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.enhance-btn svg {
    width: 16px;
    height: 16px;
}

.enhance-btn.loading .btn-text {
    display: none;
}

.enhance-btn.loading .btn-loader {
    display: flex;
}

.enhance-btn .btn-loader {
    display: none;
}

/* Section Status Badge */
.section-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.section-status.enhanced {
    background: var(--accent-glow);
    color: var(--accent-primary);
}

/* Form Section Header */
.form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Template Selection */
.template-section {
    margin-bottom: 32px;
}

.template-section h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.template-card {
    position: relative;
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.template-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.template-card h4 {
    margin: 0 0 8px;
    color: var(--text-primary);
}

.template-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.template-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 4px 10px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Section Toggle in Structure */
.section-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.section-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.section-toggle input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

.section-toggle input:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: white;
}

/* Drag Hint */
.drag-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: normal;
}

/* CV Preview Styles */
.cv-preview {
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 8px;
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
}

.cv-preview .cv-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent-primary); /* Uses your theme color instead of hardcoded green */
}

.cv-preview .cv-header h1 {
    margin: 0 0 8px;
    color: #1a1a1a;
    font-size: 24px;
}

.cv-preview .cv-contact {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cv-preview .cv-links {
    margin: 4px 0 0;
    font-size: 13px;
}

.cv-preview .cv-links a {
    color: #0066cc;
    text-decoration: none;
}

.cv-preview .cv-section {
    margin-bottom: 20px;
}

.cv-preview .cv-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.cv-preview .cv-section-content p {
    margin: 0 0 8px;
    color: #333;
}

.cv-preview .cv-experience-item,
.cv-preview .cv-project-item {
    margin-bottom: 16px;
}

.cv-preview .cv-experience-item h3,
.cv-preview .cv-project-item h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #1a1a1a;
}

.cv-preview .cv-bullets {
    margin: 0;
    padding-left: 20px;
}

.cv-preview .cv-bullets li {
    margin-bottom: 6px;
    color: #444;
    font-size: 13px;
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.export-actions .btn {
    flex: 1;
    min-width: 140px;
}

/* Strategy Card Length */
.strategy-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.strategy-item:last-child {
    border-bottom: none;
}

.strategy-label {
    color: var(--text-muted);
}

.strategy-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Improvements List */
.improvement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--accent-glow);
    border-radius: 8px;
    margin-bottom: 8px;
}

.improvement-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.improvement-item span {
    color: var(--text-primary);
    font-size: 14px;
}

/* Button Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loader {
    display: none;
    gap: 4px;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loader {
    display: flex;
}

.loader-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: loaderBounce 0.6s infinite alternate;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    to {
        opacity: 0.3;
        transform: translateY(-4px);
    }
}

/* ============================================
   ATS FORGE - CV Preview Additions
   Add this to your existing atsforge.css
   ============================================ */

/* CV Preview Item Headers */
.cv-preview .cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.cv-preview .cv-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cv-preview .cv-item-date {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    margin-left: 16px;
}

.cv-preview .cv-item-subtitle {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px;
}

.cv-preview .cv-item-description {
    font-size: 13px;
    color: #444;
    margin: 4px 0 8px;
}

/* Education Items */
.cv-preview .cv-education-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.cv-preview .cv-education-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Project Items */
.cv-preview .cv-project-item {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.cv-preview .cv-project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Certification Items */
.cv-preview .cv-cert-item {
    margin-bottom: 12px;
}

/* Skills Grid */
.cv-preview .cv-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-preview .cv-skills-categorized {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cv-preview .cv-skill-category {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    line-height: 1.6;
}

.cv-preview .cv-skill-category strong {
    font-size: 12px;
    color: #222;
    min-width: fit-content;
    margin-right: 2px;
}

.cv-preview .cv-skill-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}

/* Bullets styling */
.cv-preview .cv-bullets {
    margin: 8px 0 0;
    padding-left: 20px;
    list-style-type: disc;
}

.cv-preview .cv-bullets li {
    margin-bottom: 4px;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

/* Experience Items */
.cv-preview .cv-experience-item {
    margin-bottom: 20px;
}
/* Critical improvement item styling */
.improvement-item.critical {
    background: rgba(255, 59, 48, 0.1);
    border-left: 3px solid #ff3b30;
    padding-left: 12px;
    border-radius: 4px;
}
.improvement-item.critical svg {
    stroke: #ff3b30;
}
.improvement-item.critical span {
    color: #ff6b6b;
    font-weight: 500;
}

/* Data collection notice */
.forge-data-notice {
    padding: 8px 12px;
    margin: -4px 0 12px 0;
    background: var(--accent-glow);
    border-left: 2px solid var(--accent-primary);
    border-radius: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.forge-data-notice strong {
    color: var(--text-secondary);
}
.forge-data-notice .notice-icon {
    opacity: 0.7;
}

@media (max-width: 600px) {
    .forge-data-notice {
        font-size: 0.68rem;
        padding: 6px 10px;
        margin: 0 0 10px 0;
    }
}
/* ============================================
   Page Count Modal
   ============================================ */
.page-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}
.page-modal-overlay.active {
    display: flex;
}
.page-modal {
    background: var(--glass-bg, #1a1a2e);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
    border-radius: var(--radius-lg, 16px);
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.page-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.page-modal-header svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-primary, #6366f1);
    flex-shrink: 0;
}
.page-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0;
}
.page-modal-message {
    font-size: 0.88rem;
    color: var(--text-secondary, #ccc);
    line-height: 1.6;
    margin-bottom: 18px;
}
.page-modal-message strong {
    color: var(--accent-primary, #6366f1);
}
.page-modal-select {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.page-modal-select label {
    font-size: 0.85rem;
    color: var(--text-secondary, #ccc);
    white-space: nowrap;
}
.page-modal-select select {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.15));
    background: var(--glass-bg, rgba(255,255,255,0.05));
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    cursor: pointer;
}
.page-modal-select select option {
    background: #1a1a2e;
    color: #fff;
}
.page-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.page-modal-actions .btn {
    min-width: 100px;
}