/* ============================================================
   HireGen AI — App / Dashboard Specific Styles
   ============================================================ */

/* ── App Shell Layout ──────────────────────────────────────── */
.app-shell {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 100vh;
    padding-top: 64px;
    /* nav height */
}

/* ── User Avatar ───────────────────────────────────────────── */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-link-active {
    color: var(--text-primary) !important;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
}

/* ── Input Panel ───────────────────────────────────────────── */
.input-panel {
    background: var(--bg-secondary);
    border-right: 1.5px solid var(--border);
    padding: 28px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    transition: background var(--transition), border-color var(--transition);
}

.input-panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.input-panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Input Tabs ────────────────────────────────────────────── */
.input-tabs {
    width: 100%;
}

/* ── Tab Content ───────────────────────────────────────────── */
.tab-content {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* ── Drop Zone ─────────────────────────────────────────────── */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-primary);
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.dropzone-icon {
    font-size: 2.5rem;
}

.dropzone-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.dropzone-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── File Preview ──────────────────────────────────────────── */
.file-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
}

.file-preview-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.file-remove {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px;
}

.file-remove:hover {
    color: #ef4444;
}

/* ── Paste Area ────────────────────────────────────────────── */
.paste-wrap {
    background: var(--bg-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.paste-textarea {
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 200px;
    font-size: 0.85rem;
    resize: none;
}

.paste-textarea:focus {
    box-shadow: none;
    border: none;
}

.paste-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Job Role ──────────────────────────────────────────────── */
.job-role-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.job-role-input-group {
    position: relative;
}

.job-role-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.job-role-input {
    padding-left: 40px;
}

/* ── Analyze Button ────────────────────────────────────────── */
.analyze-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}

.analyze-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.analyze-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ── Input Tips ────────────────────────────────────────────── */
.input-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tip-item {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Privacy Notice ────────────────────────────────────────── */
.privacy-notice {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    line-height: 1.6;
}

.privacy-notice strong {
    color: #10b981;
    font-weight: 600;
}

/* ── Results Panel ─────────────────────────────────────────── */
.results-panel {
    background: var(--bg-primary);
    overflow-y: auto;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    transition: background var(--transition);
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    gap: 12px;
    animation: fadeIn 0.5s ease;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 8px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 360px;
    font-size: 0.9rem;
    line-height: 1.65;
}

.empty-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.empty-feature {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ── Results Content ───────────────────────────────────────── */
.results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease;
}

/* ── Results Header ────────────────────────────────────────── */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.results-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.results-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.results-actions {
    display: flex;
    gap: 8px;
}

/* ── Result Tabs bar ───────────────────────────────────────── */
.result-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 28px 0;
    border-bottom: 1.5px solid var(--border);
    overflow-x: auto;
}

.result-tab {
    padding: 9px 16px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.result-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.result-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--bg-primary);
}

/* ── Tab Content Area ──────────────────────────────────────── */
.result-tab-content {
    padding: 24px 28px 32px;
    flex: 1;
    animation: fadeInUp 0.3s ease;
}

/* ── ATS ───────────────────────────────────────────────────── */
.ats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.result-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.ats-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.ats-score-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.ats-score-den {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.ats-score-status {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.ats-score-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Breakdown List ────────────────────────────────────────── */
.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.breakdown-item {
    width: 100%;
}

.breakdown-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.breakdown-item-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.breakdown-item-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

/* ── Feedback List ─────────────────────────────────────────── */
.ats-feedback {
    margin-top: 16px;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid var(--border-subtle);
}

.feedback-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.feedback-text {
    line-height: 1.6;
    color: var(--text-secondary);
}

.feedback-text strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

/* ── Skills ────────────────────────────────────────────────── */
.skills-intro {
    margin-bottom: 16px;
}

.skills-intro p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-top: 8px;
}

.skills-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.skills-col {
    min-width: 0;
}

.skills-col-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.skills-col-title.missing {
    color: #ef4444;
}

.skills-col-title.present {
    color: #10b981;
}

.skills-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform var(--transition);
}

.skill-tag:hover {
    transform: translateY(-2px);
}

.skill-tag-missing {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.skill-tag-present {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ── Rewrite ───────────────────────────────────────────────── */
.rewrite-header-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.rewrite-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rewrite-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.rewrite-item:hover {
    box-shadow: var(--shadow-md);
}

.rewrite-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.rewrite-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rewrite-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.rewrite-col {
    padding: 16px 18px;
}

.rewrite-col:first-child {
    border-right: 1px solid var(--border);
}

.rewrite-col-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.rewrite-col-label.before {
    color: #ef4444;
}

.rewrite-col-label.after {
    color: #10b981;
}

.rewrite-col-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.rewrite-col:first-child .rewrite-col-text {
    text-decoration: none;
    opacity: 0.7;
}

/* ── Job Roles ─────────────────────────────────────────────── */
.jobs-intro {
    margin-bottom: 16px;
}

.jobs-intro p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.65;
}

.job-roles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-role-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all var(--transition);
}

.job-role-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.job-role-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.job-role-card-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.job-role-card-pct {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.job-role-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.55;
}

/* ── Interview ─────────────────────────────────────────────── */
.interview-intro {
    margin-bottom: 16px;
}

.interview-intro p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.65;
}

.interview-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.interview-section {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.interview-section-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.interview-section-icon {
    font-size: 1rem;
}

.interview-questions {
    padding: 4px 0;
}

.interview-q {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: flex-start;
    transition: background var(--transition);
}

.interview-q:last-child {
    border-bottom: none;
}

.interview-q:hover {
    background: var(--bg-secondary);
}

.interview-q-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-soft);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.interview-q-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .input-panel {
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1.5px solid var(--border);
    }

    .results-panel {
        height: auto;
    }
}

@media (max-width: 768px) {
    .ats-grid {
        grid-template-columns: 1fr;
    }

    .skills-columns {
        grid-template-columns: 1fr;
    }

    .rewrite-cols {
        grid-template-columns: 1fr;
    }

    .rewrite-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .result-tabs {
        gap: 2px;
    }

    .result-tab {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .results-header {
        padding: 16px 16px 0;
    }

    .result-tab-content {
        padding: 16px;
    }
}