/* ============================================================
   Narratio — Custom Stylesheet
   Extends Bootstrap 5. Import after Bootstrap CDN.
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --navy:      #1B2A4A;
    --teal:      #00C4B4;
    --teal-dark: #00a89a;
    --off-white: #F8F9FA;
    --light-gray:#F1F3F5;
    --navy-light: rgba(27,42,74,0.08);
}

/* ── Global ─────────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    color: #343a40;
    background-color: var(--off-white);
}

/* ── Typography helpers ─────────────────────────────────────── */
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.fw-900  { font-weight: 900 !important; }

.text-navy  { color: var(--navy)  !important; }
.text-teal  { color: var(--teal)  !important; }

/* ── Spacing helper (Bootstrap stops at py-5) ───────────────── */
.py-6  { padding-top:    5rem !important; padding-bottom: 5rem !important; }
.py-7  { padding-top:    7rem !important; padding-bottom: 7rem !important; }
.pt-6  { padding-top:    5rem !important; }
.pb-6  { padding-bottom: 5rem !important; }
.mt-6  { margin-top:     5rem !important; }
.mb-6  { margin-bottom:  5rem !important; }

/* ── Background utilities ───────────────────────────────────── */
.bg-navy       { background-color: var(--navy)      !important; }
.bg-teal       { background-color: var(--teal)      !important; }
.bg-light-gray { background-color: var(--light-gray)!important; }
.bg-navy-light { background-color: var(--navy-light)!important; }
.bg-white-10   { background: rgba(255,255,255,0.10); }

/* ── Button: Teal ───────────────────────────────────────────── */
.btn-teal {
    background-color: var(--teal);
    border-color:     var(--teal);
    color:            #fff;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-teal:hover, .btn-teal:focus {
    background-color: var(--teal-dark);
    border-color:     var(--teal-dark);
    color: #fff;
    transform: translateY(-1px);
}
.btn-teal:active { transform: translateY(0); }

.btn-outline-teal {
    border-color: var(--teal);
    color:        var(--teal);
}
.btn-outline-teal:hover {
    background-color: var(--teal);
    color: #fff;
}

/* ── Button: Navy ───────────────────────────────────────────── */
.btn-navy {
    background-color: var(--navy);
    border-color:     var(--navy);
    color:            #fff;
    transition: background-color .15s ease, transform .1s ease;
}
.btn-navy:hover, .btn-navy:focus {
    background-color: #253661;
    border-color:     #253661;
    color: #fff;
    transform: translateY(-1px);
}
.btn-navy:active { transform: translateY(0); }

.btn-outline-navy {
    border-color: var(--navy);
    color:        var(--navy);
}
.btn-outline-navy:hover {
    background-color: var(--navy);
    color: #fff;
}

/* ── Button: White ──────────────────────────────────────────── */
.btn-white {
    background-color: #fff;
    border-color:     #fff;
    color:            var(--navy);
    font-weight: 600;
}
.btn-white:hover {
    background-color: #f0fffe;
    border-color:     #f0fffe;
    color: var(--teal-dark);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.narratio-navbar {
    background: var(--navy);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.narratio-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff !important;
    letter-spacing: -.5px;
}
.narratio-navbar .nav-link {
    color: rgba(255,255,255,.8) !important;
    font-weight: 500;
    transition: color .15s;
}
.narratio-navbar .nav-link:hover { color: #fff !important; }

/* ── App layout sidebar / top-nav ───────────────────────────── */
.app-navbar {
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.app-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff !important;
}
.app-nav-link {
    color: rgba(255,255,255,.75) !important;
    font-weight: 500;
    padding: .4rem .8rem !important;
    border-radius: 6px;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.app-nav-link:hover,
.app-nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff !important;
}
.app-nav-link.active { font-weight: 600; }

/* ── Main content area ──────────────────────────────────────── */
.app-main {
    padding: 2rem 1.5rem;
    max-width: 1140px;
    margin: 0 auto;
}

/* ── Hero (marketing) ───────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--navy) 0%, #253661 100%);
    color: #fff;
    padding: 2rem 0 6rem;
    position: relative;
    overflow: hidden;
}

/* ── Logo "app icon" — white rounded square for dark backgrounds ── */
.logo-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    flex-shrink: 0;
}

/* ── Hero brand card (right column top panel) ────────────────── */
.hero-brand-card {
    background: rgba(255,255,255,0.96);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.hero-brand-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,196,180,.18) 0%, transparent 65%);
    pointer-events: none;
}
.hero-brand-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 55%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27,42,74,.1) 0%, transparent 65%);
    pointer-events: none;
}
.hero-brand-name {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--navy);
    line-height: 1.05;
}
.hero-brand-tag {
    color: #6B7280;
    font-size: .9rem;
    line-height: 1.5;
    margin-top: .4rem;
}
.hero-brand-divider {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
}
.hero-brand-divider-line {
    width: 28px;
    height: 2px;
    background: var(--teal);
    border-radius: 2px;
}
.hero-brand-divider-text {
    font-size: .75rem;
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 60px;
    background: var(--off-white);
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* ── Step cards (How it Works) ──────────────────────────────── */
.step-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.step-number {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ── Testimonial cards ──────────────────────────────────────── */
.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    height: 100%;
}
.testimonial-card .stars { color: #f5a623; letter-spacing: 2px; }

/* ── Avatar circle ──────────────────────────────────────────── */
.avatar-circle {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.avatar-circle-sm {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--navy-light);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    flex-shrink: 0;
}

/* ── Pricing cards ──────────────────────────────────────────── */
.pricing-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 10px 40px rgba(0,0,0,.12); }

.pricing-card--featured {
    background: linear-gradient(160deg, var(--navy) 0%, #253661 100%);
    color: #fff;
}
.pricing-card--current { border: 2px solid var(--teal); }

.pricing-badge {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}
.pricing-badge--current { background: var(--teal); }

.pricing-plan {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
    margin-bottom: .25rem;
}
.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: .5rem;
}
.pricing-price span {
    font-size: .9rem;
    font-weight: 500;
    color: #6c757d;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pricing-features li {
    padding: .35rem 0;
    font-size: .9rem;
}

/* ── Dashboard quick actions ────────────────────────────────── */
.quick-action-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    color: inherit;
}
.quick-action-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: .75rem;
}

/* ── Progress bar (wizard / profile completion) ─────────────── */
.progress-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: #adb5bd;
}
.progress-step.active { color: var(--teal); }
.progress-step.done   { color: var(--navy); }
.progress-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all .2s;
}
.progress-step.active .progress-dot {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}
.progress-step.done .progress-dot {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}
.progress-connector {
    flex: 1;
    height: 2px;
    background: #dee2e6;
}
.progress-connector.done { background: var(--navy); }

/* ── Chat (AI interview) ─────────────────────────────────────── */
.chat-window { scroll-behavior: smooth; }

.ai-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ai-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--navy-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.bubble-content {
    background: var(--light-gray);
    border-radius: 0 16px 16px 16px;
    padding: .75rem 1rem;
    max-width: 80%;
    font-size: .92rem;
    line-height: 1.6;
    color: #343a40;
    white-space: pre-wrap;
}
.bubble-content-user {
    background: var(--navy);
    color: #fff;
    border-radius: 16px 0 16px 16px;
    padding: .75rem 1rem;
    max-width: 80%;
    font-size: .92rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: .75rem 1rem;
    background: var(--light-gray);
    border-radius: 0 16px 16px 16px;
    width: fit-content;
}
.typing-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #adb5bd;
    display: block;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s;    }
.typing-dots span:nth-child(2) { animation-delay: 0.2s;  }
.typing-dots span:nth-child(3) { animation-delay: 0.4s;  }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0);    opacity: .4; }
    30%            { transform: translateY(-6px); opacity: 1;  }
}

/* ── Template option (Generate Resume) ──────────────────────── */
.template-option {
    display: block;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    overflow: hidden;
}
.template-option:hover { border-color: var(--teal); }
.template-option.selected {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,196,180,.15);
}
.template-check { display: none; }
.template-option.selected .template-check { display: block; }

/* ── Wizard step panel ───────────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* Clickable progress-step labels (enabled once onboarding is complete) */
.step-indicator.clickable { cursor: pointer; }
.step-indicator.clickable:hover { text-decoration: underline; }

/* ── Job entry / edu entry (dynamic rows) ───────────────────── */
.job-entry, .edu-entry, .cert-entry, .project-entry {
    background: var(--off-white);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}
.remove-entry-btn {
    position: absolute;
    top: .75rem; right: .75rem;
}

/* ── Skill tags ──────────────────────────────────────────────── */
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--navy);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 20px;
}
.skill-tag .remove-skill {
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s;
    background: none;
    border: none;
    color: #fff;
    padding: 0;
    line-height: 1;
}
.skill-tag .remove-skill:hover { opacity: 1; }

/* ── Alert / flash messages ─────────────────────────────────── */
.flash-alert {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    z-index: 9999;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    border-radius: 10px;
    animation: slideInRight .3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ── Feature icon circle ─────────────────────────────────────── */
.feature-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.feature-icon-teal { background: rgba(0,196,180,.12); color: var(--teal); }
.feature-icon-navy { background: rgba(27,42,74,.10);  color: var(--navy); }

/* ── Section dividers ────────────────────────────────────────── */
.section-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--teal);
    display: block;
    margin-bottom: .5rem;
}

/* ── Auth card ───────────────────────────────────────────────── */
.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
}

/* ── Footer ──────────────────────────────────────────────────── */
.narratio-footer {
    background: var(--navy);
    color: rgba(255,255,255,.75);
}
.narratio-footer a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color .15s;
}
.narratio-footer a:hover { color: #fff; }
.narratio-footer .footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ── Mobile bottom nav (app layout) ─────────────────────────── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--navy);
    z-index: 1030;
    padding: .5rem 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-bottom-nav a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .65rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: .25rem .5rem;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.mobile-bottom-nav a i { font-size: 1.1rem; }
.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}
/* Push content above bottom nav on mobile */
@media (max-width: 767.98px) {
    .app-main { padding-bottom: 5rem; }
}

/* ── Plan badge (app navbar) ─────────────────────────────────── */
.plan-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .2rem .6rem;
    border-radius: 20px;
}
.plan-badge-free         { background: rgba(255,255,255,.15); color: rgba(255,255,255,.8); }
.plan-badge-professional { background: var(--teal); color: #fff; }
.plan-badge-elite        { background: #f5a623; color: #fff; }

/* ── Profile completion bar ──────────────────────────────────── */
.completion-bar { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
.completion-fill { height: 100%; background: linear-gradient(90deg, var(--teal), #00a89a); border-radius: 4px; transition: width .6s ease; }

/* ── Misc ────────────────────────────────────────────────────── */
.rounded-top-4 { border-top-left-radius: 1rem !important; border-top-right-radius: 1rem !important; }
.rounded-bottom-4 { border-bottom-left-radius: 1rem !important; border-bottom-right-radius: 1rem !important; }
.text-white-75 { color: rgba(255,255,255,.75) !important; }
.text-white-50 { color: rgba(255,255,255,.5) !important; }

/* Prevent layout shift on form submission spinner */
.btn .spinner-border { vertical-align: -.125em; }

/* Form control focus */
.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(0,196,180,.2);
}

/* ── App left sidebar (authenticated shell) ──────────────────── */
.app-sidebar {
    width: 248px;
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    align-self: flex-start;
}
.sidebar-link {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    padding: .55rem .75rem;
    margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--light-gray); color: var(--navy); }
.sidebar-link.active { background: rgba(0,196,180,.12); color: var(--teal); }

/* Link color overrides */
a.text-teal:hover { color: var(--teal-dark) !important; }

/* ── Hero: pill badge + dot indicator ───────────────────────── */
.badge-pill-teal {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(0,196,180,.15);
    color: var(--teal);
    border: 1px solid rgba(0,196,180,.3);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .8rem;
    font-weight: 600;
}
/* On dark hero background, lighten the pill */
.hero-section .badge-pill-teal {
    background: rgba(0,196,180,.2);
    color: #5fffee;
    border-color: rgba(0,196,180,.4);
}
.badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--teal);
    display: inline-block;
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(0.8); }
}

/* ── Hero background decorative circle ──────────────────────── */
.hero-bg-circle {
    position: absolute;
    top: -120px; right: -120px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(0,196,180,.06);
    pointer-events: none;
}

/* ── Chat preview bubbles (hero illustration) ────────────────── */
.chat-preview-bubble {
    border-radius: 12px;
    padding: .65rem .9rem;
    font-size: .85rem;
    line-height: 1.5;
    max-width: 90%;
}
.chat-preview-bubble.ai {
    background: var(--light-gray);
    color: #343a40;
    border-radius: 4px 12px 12px 12px;
}
.chat-preview-bubble.user {
    background: var(--navy);
    color: #fff;
    border-radius: 12px 4px 12px 12px;
    margin-left: auto;
}

/* ── Step icon (How it Works) ────────────────────────────────── */
.step-icon {
    font-size: 2rem;
    color: var(--teal);
}

/* ── Validation summary: hide when no errors ─────────────────── */
.validation-summary-valid { display: none !important; }
