/* ===================================
   IGNITE IT CONSULTING - MODERN THEME
   =================================== */

:root {
    /* Colors - Cool Theme */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --accent: #06b6d4;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;

    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip link for keyboard / screen-reader users */
.skip-link {
    position: fixed;
    top: -64px;
    left: 16px;
    padding: 10px 18px;
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    transition: top var(--transition-fast);
}

.skip-link:focus,
.skip-link:focus-visible,
.skip-link:active {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Visible focus state for keyboard users */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   HEADER
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.12);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-list a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-list a:hover {
    color: var(--primary);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-list a:hover::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

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

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-dark {
    background: var(--bg-dark);
    color: white;
}

.btn-dark:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.btn-white {
    background: white;
    color: var(--text-primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-xl {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
    bottom: -100px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ===================================
   SECTIONS
   =================================== */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

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

/* ===================================
   SERVICES
   =================================== */
.services {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.service-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon.contract {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
}

.service-icon.fulltime {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.service-card>p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.service-features {
    margin-bottom: 32px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
}

.service-features svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* ===================================
   HOW IT WORKS
   =================================== */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-card);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.step:last-child {
    border-bottom: none;
}

.step:hover {
    transform: translateX(8px);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
}

/* ===================================
   REVIEWS
   =================================== */
.reviews {
    padding: 100px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.review-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.review-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.reviewer-info strong {
    display: block;
    color: var(--text-primary);
}

.reviewer-info span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stars {
    color: #facc15;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.review-card p {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   CTA SECTION
   =================================== */
.cta-section {
    padding: 80px 0;
}

.cta-card {
    background: var(--gradient-dark);
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    filter: blur(60px);
}

.cta-card h2 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 16px;
    position: relative;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    margin-bottom: 32px;
    position: relative;
}

.cta-card .btn {
    position: relative;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: white;
    font-size: 0.9375rem;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-stub {
    cursor: not-allowed;
    opacity: 0.85;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===================================
   DASHBOARD STYLES
   =================================== */
.dashboard-body {
    background-color: #f1f5f9;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--gradient-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar .logo {
    color: white;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

/* Hide mobile bottom nav on desktop */
.mobile-bottom-nav {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.875rem;
}

.user-info .name {
    display: block;
    font-weight: 600;
    color: white;
    font-size: 0.9375rem;
}

.user-info .role {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: #f87171;
    padding: 10px;
    border-radius: var(--radius-md);
}

.btn-logout:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* Main Dashboard Content */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

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

.dashboard-header h2 {
    font-size: 1.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.content-viewport {
    max-width: 1100px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-card .number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Data Table */
.data-table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    text-align: left;
}

.data-table th {
    background: #f8fafc;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.data-table th.sortable:hover {
    background: #eef2f7;
    color: var(--primary);
}

.data-table td {
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.data-table td.serial-number {
    color: var(--text-muted);
    font-weight: 500;
    width: 50px;
    text-align: center;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #fafbfc;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status.applied {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.interview {
    background: #fef3c7;
    color: #b45309;
}

.status.rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.link {
    color: var(--primary);
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

/* Practice Section */
.practice-container {
    max-width: 600px;
}

.practice-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.recorder-placeholder {
    margin: 32px 0;
    padding: 40px;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.mic-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.analysis-results {
    text-align: left;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.analysis-results h4 {
    margin-bottom: 24px;
    font-size: 1rem;
}

.metric {
    margin-bottom: 20px;
}

.metric span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Calendar */
.calendar-layout {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-light);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cal-header {
    background: #f8fafc;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cal-day {
    background: white;
    min-height: 120px;
    padding: 12px;
}

.event {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: white;
}

.event.assessment {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.event.interview {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.event .time {
    font-weight: 600;
    margin-bottom: 2px;
}

.event .title {
    opacity: 0.9;
}

/* Payment */
.payment-container {
    max-width: 480px;
}

.payment-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--primary);
}

.payment-card h3 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 16px 0;
}

.status-active {
    display: inline-block;
    padding: 6px 16px;
    background: #ecfdf5;
    color: #059669;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.billing-details {
    text-align: left;
    margin: 32px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.billing-details p {
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.billing-details p:last-child {
    margin-bottom: 0;
}

.payment-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #fecaca;
    color: #dc2626;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
}

.btn-outline-danger:hover {
    background: #fef2f2;
}

/* Sheet Connection Styles */
.sheet-connect-prompt,
.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.sheet-connect-prompt .prompt-icon,
.error-state .error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.sheet-connect-prompt h3,
.error-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sheet-connect-prompt p,
.error-state p,
.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sheet-input-wrapper {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 24px auto;
}

.sheet-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

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

.help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.help-text a {
    color: var(--primary);
    text-decoration: underline;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* View Sections */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* ===================================
   RESPONSIVE
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .service-card {
        padding: 32px;
    }

    .cta-card {
        padding: 60px 32px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Base adjustments */
    .container {
        padding: 0 16px;
    }

    /* Header */
    .header-container {
        padding: 0 16px;
        height: 64px;
    }

    .nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-primary);
        border-radius: 2px;
        transition: var(--transition-fast);
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Mobile Menu Overlay */
    .mobile-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 999;
        padding: 24px;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-menu.active {
        display: flex;
    }

    .mobile-menu a {
        display: block;
        padding: 16px;
        font-size: 1.125rem;
        font-weight: 500;
        color: var(--text-primary);
        border-radius: var(--radius-md);
        transition: var(--transition-fast);
    }

    .mobile-menu a:hover {
        background: var(--bg-body);
        color: var(--primary);
    }

    .mobile-menu .btn {
        margin-top: 16px;
        width: 100%;
        justify-content: center;
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        display: none;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Sections */
    .services,
    .how-it-works,
    .reviews {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .service-card {
        padding: 24px;
    }

    .service-card h3 {
        font-size: 1.25rem;
    }

    .featured-badge {
        font-size: 0.625rem;
        padding: 4px 12px;
    }

    /* Steps */
    .steps-container {
        padding: 0;
    }

    .step {
        flex-direction: column;
        gap: 16px;
        padding: 24px 0;
    }

    .step-number {
        font-size: 2rem;
    }

    .step-content h3 {
        font-size: 1.125rem;
    }

    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .review-card {
        padding: 24px;
    }

    /* CTA */
    .cta-section {
        padding: 40px 0;
    }

    .cta-card {
        padding: 48px 24px;
        border-radius: var(--radius-lg);
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 48px 0 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        padding-top: 24px;
    }

    /* ===================================
       DASHBOARD MOBILE
       =================================== */
    .sidebar {
        display: none;
    }

    .dashboard-main {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 100px;
        /* Space for bottom nav */
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .number {
        font-size: 1.75rem;
    }

    /* Mobile Data Table */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        padding: 12px 16px;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    /* Practice Card Mobile */
    .practice-card {
        padding: 24px;
    }

    .recorder-placeholder {
        padding: 24px;
    }

    /* Calendar Mobile */
    .calendar-layout {
        padding: 16px;
        overflow-x: auto;
    }

    .calendar-grid {
        min-width: 500px;
    }

    .cal-day {
        min-height: 80px;
    }

    /* Connect Mobile */
    .connect-layout {
        grid-template-columns: 1fr;
    }

    .connect-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .connect-sheet-actions {
        grid-template-columns: 1fr;
    }

    .connect-sheet-actions .btn {
        width: 100%;
    }

    .connect-personalize-grid {
        grid-template-columns: 1fr;
    }

    .connect-run-btn {
        min-width: 0;
        width: 100%;
    }

    .connect-lead-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .connect-lead-actions {
        width: 100%;
    }

    .connect-lead-actions .btn {
        flex: 1;
    }

    /* Email Conversations Mobile */
    .emails-chat-shell {
        grid-template-columns: 1fr;
        height: calc(100vh - 220px);
        min-height: 480px;
        position: relative;
    }

    .emails-contacts-pane {
        display: flex;
        border-right: none;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .emails-thread-pane {
        display: none;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    #view-emails.emails-show-thread .emails-contacts-pane {
        display: none;
    }

    #view-emails.emails-show-thread .emails-thread-pane {
        display: flex;
    }

    .emails-thread-back {
        display: inline-flex;
    }

    .emails-thread-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .emails-bubble {
        max-width: 88%;
    }

    .emails-setup-row {
        flex-direction: column;
        align-items: stretch;
    }

    .emails-setup-row .btn,
    .emails-setup-field {
        width: 100%;
    }

    .emails-personalize-grid {
        grid-template-columns: 1fr;
    }

    .emails-thread-actions {
        flex-wrap: wrap;
    }

    .connect-feature-banner {
        padding: 28px;
    }

    .connect-banner-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .connect-banner-visual {
        display: none;
    }

    .connect-banner-text h3 {
        font-size: 1.35rem;
    }

    /* Payment Mobile */
    .payment-card {
        padding: 24px;
    }

    .amount {
        font-size: 2.25rem;
    }

    .payment-actions {
        flex-direction: column;
    }

    .payment-actions .btn,
    .payment-actions .btn-outline-danger {
        width: 100%;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--border);
        padding: 8px 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 4px;
        color: var(--text-muted);
        font-size: 0.625rem;
        font-weight: 500;
        text-align: center;
        transition: var(--transition-fast);
    }

    .mobile-bottom-nav a.active {
        color: var(--primary);
    }

    .mobile-bottom-nav svg {
        width: 24px;
        height: 24px;
    }
}

/* ===================================
   IGNITE CONNECT — LANDING PAGE
   =================================== */
.nav-connect {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

.connect-feature-banner {
    margin-top: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(6, 182, 212, 0.04) 100%);
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.connect-feature-banner::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    filter: blur(60px);
}

.connect-banner-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
}

.connect-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.connect-banner-text h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.connect-banner-text > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.connect-banner-text .service-features {
    margin-bottom: 24px;
}

.connect-banner-visual {
    display: flex;
    justify-content: center;
}

.connect-preview-card {
    background: var(--gradient-dark);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 320px;
    color: white;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.preview-dot.green {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.preview-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-lead:last-child {
    margin-bottom: 0;
}

.preview-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #334155, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.preview-lead div:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.preview-lead strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.preview-lead span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.preview-score {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ===================================
   IGNITE CONNECT — DASHBOARD
   =================================== */
.connect-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 1100px;
}

.connect-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.connect-card:last-child {
    margin-bottom: 0;
}

.connect-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.connect-card-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.connect-card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 6px;
    margin-bottom: 0;
}

.connect-sheet-card {
    border-top: 3px solid var(--primary);
}

.connect-sheet-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: end;
}

.connect-sheet-url-field {
    min-width: 0;
}

.connect-sheet-status {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.connect-sheet-status.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #059669;
}

.connect-sheet-status.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.connect-sheet-status.loading {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.connect-limit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.connect-limit-badge.is-full {
    background: #fef2f2;
    color: #b91c1c;
}

.connect-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #059669;
}

.connect-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

.connect-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.connect-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.connect-field input,
.connect-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
    resize: vertical;
    background: #f8fafc;
}

.connect-field input:focus,
.connect-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

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

.connect-input-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.connect-input-icon input {
    padding-left: 42px;
}

.connect-generate-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

.connect-sheet-generate-btn {
    margin-top: 12px;
}

.connect-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.connect-lead-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.connect-leads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connect-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.connect-empty-state svg {
    margin: 0 auto 12px;
    display: block;
}

.connect-empty-state p {
    font-size: 0.9rem;
}

.connect-lead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    gap: 16px;
    transition: all var(--transition-fast);
}

.connect-lead-row:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.connect-lead-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.connect-lead-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--gradient-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.connect-lead-details {
    min-width: 0;
}

.connect-lead-details strong {
    color: var(--text-primary);
}

.connect-lead-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connect-score {
    color: var(--primary);
    font-weight: 700;
}

.connect-lead-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.connect-btn-sm {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    border-radius: var(--radius-md) !important;
}

.connect-btn-sm:disabled,
.connect-generate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Connect Sidebar */
.connect-sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.connect-task-queue {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.connect-empty-tasks {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

.connect-task-item {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fafbfc;
}

.connect-task-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.connect-task-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.connect-status-queued {
    background: #dbeafe;
    color: #1d4ed8;
}

.connect-status-progress {
    background: #fef3c7;
    color: #b45309;
}

.connect-status-completed {
    background: #d1fae5;
    color: #059669;
}

.connect-task-advance {
    width: 100%;
    justify-content: center;
}

.connect-task-advance:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Connect Info Card */
.connect-info-card {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, white 100%);
    border-top: 3px solid var(--primary);
}

.connect-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.connect-flow-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.connect-flow-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}

.connect-flow-icon.active {
    background: var(--primary);
    color: white;
}

.connect-flow-step strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.connect-flow-step span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.connect-linkedin-btn {
    width: 100%;
    justify-content: center;
}

/* Spinner for loading state */
@keyframes connectSpin {
    to { transform: rotate(360deg); }
}

.connect-spin {
    animation: connectSpin 1s linear infinite;
}

/* ===================================
   IGNITE CONNECT — AGENT UI
   =================================== */

.connect-agent-card {
    border-top: 3px solid var(--primary);
    background:
        linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, white 60%);
}

.connect-agent-card .connect-card-header h3 {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
}

.connect-step {
    padding: 16px 0;
    border-top: 1px dashed var(--border);
}

.connect-step:first-of-type {
    border-top: none;
    padding-top: 4px;
}

.connect-step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.connect-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.connect-step-optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 4px;
}

.connect-personalize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.connect-field-wide {
    grid-column: 1 / -1;
}

.connect-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: #f8fafc;
    transition: border-color var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.connect-field select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
}

.connect-run-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.connect-run-btn {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    justify-content: center;
    min-width: 200px;
}

.connect-run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lead cards with AI notes */
.connect-lead-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: all var(--transition-fast);
}

.connect-lead-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
}

.connect-lead-card.is-queued {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.connect-lead-card .connect-lead-row {
    background: transparent;
    border: none;
    padding: 0 0 12px 0;
    gap: 12px;
}

.connect-lead-card .connect-lead-row:hover {
    border: none;
    box-shadow: none;
}

.connect-role-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.connect-lead-card .connect-lead-meta {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
}

.connect-note-block {
    border-top: 1px dashed var(--border);
    padding-top: 12px;
}

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

.connect-note-editor {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background: #fafbfc;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.connect-note-editor:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.connect-note-editor[readonly] {
    background: #f1f5f9;
    color: var(--text-secondary);
    cursor: default;
}

.connect-note-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.connect-note-counter {
    font-variant-numeric: tabular-nums;
}

.connect-note-regen {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.connect-note-regen:hover {
    background: #eef2ff;
}

.connect-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
}

.connect-pill-success {
    background: #d1fae5;
    color: #047857;
}

/* ===================================
   EMAIL CONVERSATIONS — WHATSAPP STYLE
   =================================== */

#view-emails {
    display: none;
}
#view-emails.active {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Setup card on top */
.emails-setup-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary);
}

.emails-setup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.emails-setup-header h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.emails-setup-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
    max-width: 760px;
}

.emails-setup-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.emails-setup-field {
    flex: 1 1 280px;
    min-width: 220px;
}

.emails-setup-field input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: #f8fafc;
    transition: border-color var(--transition-fast);
}

.emails-setup-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.emails-sheet-status {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.emails-sheet-status.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #059669;
}

.emails-sheet-status.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.emails-sheet-status.loading {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.emails-hunter-panel {
    margin-top: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    flex-direction: column;
    gap: 10px;
}

.emails-hunter-info {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.emails-hunter-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.emails-hunter-row input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: inherit;
    font-size: 0.875rem;
}

.emails-hunter-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.emails-personalize-details {
    margin-top: 16px;
    border-top: 1px dashed var(--border);
    padding-top: 14px;
}

.emails-personalize-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
    user-select: none;
}

.emails-personalize-details[open] summary {
    margin-bottom: 14px;
    color: var(--primary);
}

.emails-personalize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== Chat shell (WhatsApp 2-pane) ===== */
.emails-chat-shell {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: calc(100vh - 340px);
    min-height: 580px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* ===== Contacts pane (left) ===== */
.emails-contacts-pane {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.emails-contacts-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.emails-contacts-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.emails-contacts-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
}

.emails-contacts-search input::placeholder {
    color: var(--text-muted);
}

.emails-contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.emails-contact {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    text-align: left;
    transition: background-color var(--transition-fast);
    position: relative;
}

.emails-contact:hover {
    background: #f8fafc;
}

.emails-contact.is-active {
    background: #eef2ff;
}

.emails-contact.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
}

.emails-contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--gradient-dark);
}

.emails-contact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.emails-contact-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.emails-contact-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emails-contact-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.emails-contact-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emails-contact-preview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.emails-contact.is-unread .emails-contact-preview {
    color: var(--text-primary);
    font-weight: 500;
}

.emails-contact-badge {
    position: absolute;
    top: 14px;
    right: 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    min-width: 18px;
    text-align: center;
}

.emails-preview-icon {
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 2px;
}

.emails-preview-in {
    color: #059669;
}

.emails-preview-out {
    color: var(--primary);
}

.emails-empty-contacts {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
}

.emails-empty-contacts p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.emails-empty-hint {
    font-size: 0.8125rem;
}

/* ===== Thread pane (right) ===== */
.emails-thread-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ece5dd;
    background-image:
        radial-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        radial-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px);
    background-size: 22px 22px, 36px 36px;
    background-position: 0 0, 11px 11px;
}

.emails-thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.emails-thread-back {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.emails-thread-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.emails-thread-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.emails-thread-meta strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emails-thread-meta span {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emails-thread-meta em {
    color: var(--primary);
    font-style: normal;
    font-weight: 600;
}

.emails-thread-email {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace !important;
    color: var(--text-secondary) !important;
    font-size: 0.75rem !important;
}

.emails-confidence {
    display: inline-block;
    background: #d1fae5;
    color: #047857;
    padding: 0 6px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 4px;
}

.emails-thread-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Thread body — chat area */
.emails-thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16% 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emails-day-divider {
    display: flex;
    justify-content: center;
    margin: 12px 0 6px;
}

.emails-day-divider span {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.emails-bubble {
    max-width: 75%;
    padding: 8px 12px 6px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-primary);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    position: relative;
    word-wrap: break-word;
}

.emails-bubble-out {
    align-self: flex-end;
    background: #dcf8c6;
    border-top-right-radius: 4px;
}

.emails-bubble-in {
    align-self: flex-start;
    background: #ffffff;
    border-top-left-radius: 4px;
}

.emails-bubble-subject {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.emails-bubble-body {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.emails-bubble-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.emails-bubble-status {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: -1px;
}

.emails-status-replied {
    color: #2563eb;
}

.emails-status-sent {
    color: #94a3b8;
}

/* Thread empty state */
.emails-thread-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.emails-thread-empty-art {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}

.emails-thread-empty h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.emails-thread-empty p {
    max-width: 360px;
    font-size: 0.875rem;
}

.emails-thread-intro {
    align-self: center;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.85);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    max-width: 420px;
    box-shadow: var(--shadow-sm);
    margin: 24px auto;
}

.emails-thread-intro svg {
    color: var(--primary);
    margin-bottom: 8px;
}

.emails-thread-intro p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Composer */
.emails-thread-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.emails-compose-subject {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
}

.emails-compose-subject:focus {
    outline: none;
    border-color: var(--primary);
}

.emails-compose-row {
    display: flex;
}

.emails-compose-body {
    width: 100%;
    min-height: 44px;
    max-height: 220px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
    resize: none;
    line-height: 1.45;
    transition: border-color var(--transition-fast);
}

.emails-compose-body:focus {
    outline: none;
    border-color: var(--primary);
}

.emails-compose-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emails-compose-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.emails-compose-spacer {
    flex: 1;
}

/* Tablet / smaller desktops */
@media (max-width: 1024px) {
    .emails-chat-shell {
        grid-template-columns: 280px 1fr;
    }

    .emails-thread-body {
        padding-left: 8%;
        padding-right: 8%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .btn-xl {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }

    .service-icon {
        width: 48px;
        height: 48px;
    }

    .service-icon svg {
        width: 24px;
        height: 24px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ===================================
   CANDIDATE PROFILE DASHBOARD
   =================================== */
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---- Hero card ---- */
.profile-hero {
    position: relative;
    display: flex;
    gap: 24px;
    padding: 28px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 84px;
    background: var(--gradient-primary);
    opacity: 0.08;
    pointer-events: none;
}

.profile-hero-avatar {
    position: relative;
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    border: 4px solid white;
}

.profile-hero-info {
    flex: 1;
    min-width: 0;
    position: relative;
}

.profile-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-hero-name {
    font-size: 1.5rem;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.profile-hero-title {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.profile-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.profile-role-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-role-badge.admin {
    background: #ecfdf5;
    color: #047857;
}

.profile-edit-btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
}

.profile-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0 14px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-meta-item:empty {
    display: none;
}

.profile-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.profile-hero-summary {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.55;
    max-width: 720px;
}

/* ---- Stats ---- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.profile-stat {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.profile-stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.profile-stat-accent {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.08));
    border-color: rgba(99, 102, 241, 0.2);
}

.profile-stat-accent .profile-stat-value {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Section base ---- */
.profile-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-section-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.profile-section-sub {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.profile-section-actions {
    display: flex;
    gap: 10px;
}

.profile-section-actions .btn {
    padding: 10px 16px;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}

/* ---- Empty state inside profile ---- */
.profile-empty {
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: #fafbfc;
}

.profile-empty-icon {
    color: var(--text-muted);
    opacity: 0.6;
    margin-bottom: 8px;
}

.profile-empty h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text-primary);
}

.profile-empty p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ---- Companies / Pipeline ---- */
.companies-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.company-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    background: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.company-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.company-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.company-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.company-logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    font-weight: 800;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.company-meta-block {
    min-width: 0;
}

.company-name {
    margin: 0 0 2px;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.company-role {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.company-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-status-pill {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.company-status-pill.active { background: #eff6ff; color: #2563eb; }
.company-status-pill.offered { background: #ecfdf5; color: #047857; }
.company-status-pill.rejected { background: #fef2f2; color: #b91c1c; }
.company-status-pill.withdrawn { background: #f5f3ff; color: #6d28d9; }

.company-icon-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.company-icon-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.company-icon-btn.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* ---- Pipeline timeline ---- */
.pipeline {
    position: relative;
    padding: 12px 4px 4px;
    overflow-x: auto;
}

.pipeline-track {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: max-content;
    padding-bottom: 8px;
}

.pipeline-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    flex-shrink: 0;
    cursor: pointer;
    padding-top: 6px;
}

.pipeline-node + .pipeline-node::before {
    content: '';
    position: absolute;
    top: 28px;
    left: -70px;
    width: 140px;
    height: 3px;
    background: linear-gradient(90deg, var(--border) 0%, var(--border) 100%);
    z-index: 0;
}

.pipeline-node.outcome-passed + .pipeline-node::before,
.pipeline-node.outcome-offer + .pipeline-node::before {
    background: linear-gradient(90deg, #10b981 0%, var(--border) 100%);
}

.pipeline-node.outcome-failed + .pipeline-node::before {
    background: linear-gradient(90deg, #ef4444 0%, var(--border) 100%);
}

.pipeline-dot {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.pipeline-node:hover .pipeline-dot {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pipeline-node.outcome-pending .pipeline-dot {
    border-color: #94a3b8;
    color: #475569;
}

.pipeline-node.outcome-passed .pipeline-dot {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.pipeline-node.outcome-failed .pipeline-dot {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}

.pipeline-node.outcome-no-show .pipeline-dot {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}

.pipeline-node.outcome-offer .pipeline-dot {
    border: 3px solid transparent;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.pipeline-node.active .pipeline-dot {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
    border-color: var(--primary);
}

.pipeline-label {
    margin-top: 10px;
    text-align: center;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 130px;
}

.pipeline-sublabel {
    margin-top: 2px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 500;
}

.pipeline-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    flex-shrink: 0;
    cursor: pointer;
    padding-top: 6px;
    position: relative;
}

.pipeline-add::before {
    content: '';
    position: absolute;
    top: 28px;
    left: -70px;
    width: 140px;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
    z-index: 0;
}

.pipeline-track .pipeline-add:first-child::before {
    display: none;
}

.pipeline-add-dot {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px dashed var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.pipeline-add:hover .pipeline-add-dot {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef2ff;
    transform: translateY(-2px);
}

.pipeline-add-label {
    margin-top: 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.pipeline-add:hover .pipeline-add-label {
    color: var(--primary);
}

/* Round inline panel (shows when a node is clicked) */
.round-panel {
    margin-top: 16px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.round-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.round-panel-title {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text-primary);
}

.round-panel-sub {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.round-panel-actions {
    display: flex;
    gap: 6px;
}

.round-panel-actions .btn,
.round-panel-actions button {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.round-panel-notes {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.round-panel-notes.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* ---- Notepad ---- */
.notepad-section .profile-section-header {
    margin-bottom: 14px;
}

.notepad-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notepad-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.notepad-status.saving { background: #fef3c7; color: #b45309; }
.notepad-status.saved { background: #ecfdf5; color: #047857; }

.notepad-mode-toggle {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.notepad-wrapper {
    position: relative;
}

.notepad-editor {
    width: 100%;
    min-height: 220px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #fafbfc;
    resize: vertical;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.notepad-editor:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.notepad-readonly {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fafbfc;
    overflow: hidden;
}

.notepad-readonly-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
}

.notepad-readonly-body {
    padding: 16px;
    min-height: 200px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notepad-readonly-body.empty {
    color: var(--text-muted);
    font-style: italic;
}

.notepad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notepad-shortcut {
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
}

/* ---- Profile modal ---- */
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    animation: profile-fade-in 200ms ease;
}

.profile-modal-panel {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: profile-pop-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profile-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes profile-pop-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.profile-modal-head h3 {
    margin: 0;
    font-size: 1.0625rem;
}

.profile-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.profile-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.profile-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

.profile-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border-light);
    background: #fafbfc;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.profile-modal-foot .btn {
    padding: 10px 18px;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}

/* ---- Form field grid used inside modal ---- */
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-form-grid .profile-field-full {
    grid-column: 1 / -1;
}

.profile-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.profile-field input,
.profile-field select,
.profile-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-field textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Read-only state for non-admins editing the candidate (we just hide the edit button instead). */
.profile-readonly .profile-edit-btn,
.profile-readonly .company-icon-btn,
.profile-readonly #addCompanyBtn,
.profile-readonly .pipeline-add,
.profile-readonly .round-panel-actions {
    display: none !important;
}

.profile-readonly .pipeline-node {
    cursor: default;
}

.profile-readonly .pipeline-node:hover .pipeline-dot {
    transform: none;
    box-shadow: none;
}

/* ---- Profile responsive ---- */
@media (max-width: 1024px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-hero-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-hero-meta {
        justify-content: center;
    }

    .profile-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-section-actions {
        justify-content: flex-end;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .company-card-head {
        flex-direction: column;
    }

    .company-actions {
        align-self: flex-end;
    }
}

/* ===================================
   LOCAL AUTOMATION BOT INTEGRATION
   =================================== */

.applications-toggle-container {
    display: flex;
    justify-content: center;
    background: rgba(226, 232, 240, 0.6);
    padding: 4px;
    border-radius: var(--radius-full);
    width: fit-content;
    margin: 0 auto 32px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.applications-toggle-btn {
    padding: 10px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.applications-toggle-btn.active {
    background: var(--bg-card);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.applications-toggle-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.4);
}

.applications-section-view {
    display: none;
    animation: fadeIn var(--transition-base);
}

.applications-section-view.active {
    display: block;
}

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

/* Bot Control Card */
.bot-control-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.bot-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.bot-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bot-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-title-area h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.bot-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    position: relative;
}

.status-indicator-dot.active {
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
    animation: pulseGlow 2s infinite;
}

.status-indicator-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 12px #ef4444;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

.bot-status-text {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.bot-status-text.active {
    color: #10b981;
}

.bot-status-text.offline {
    color: #ef4444;
}

/* Bot Actions */
.bot-actions-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn-bot-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-bot-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-bot-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-bot-stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-bot-start:disabled,
.btn-bot-stop:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Live Terminal Log */
.live-terminal {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
}

.terminal-header {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.close { background: #ef4444; }
.terminal-dot.minimize { background: #f59e0b; }
.terminal-dot.maximize { background: #10b981; }

.terminal-title {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.terminal-clear-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.terminal-clear-btn:hover {
    color: #f8fafc;
}

.terminal-body {
    padding: 16px;
    height: 240px;
    overflow-y: auto;
    color: #38bdf8;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.terminal-line {
    margin-bottom: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.error {
    color: #f87171;
}

.terminal-line.success {
    color: #4ade80;
}

.terminal-line.system {
    color: #fb7185;
}

/* Offline state panel */
.bot-offline-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
}

.bot-offline-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.bot-offline-panel h3 {
    margin-bottom: 8px;
}

.bot-offline-panel p {
    color: var(--text-secondary);
    max-width: 460px;
    margin-bottom: 24px;
}