@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-app: #F9FAFB;
    --bg-card: #FFFFFF;
    --border-subtle: #E5E7EB;
    --border-strong: #D1D5DB;

    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;

    --accent-lime: #CCFF00;
    --accent-lime-hover: #b3e600;

    --black: #000000;
    --white: #FFFFFF;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

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

/* Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

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

/* Header */
header.app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.logo-mark {
    width: 20px;
    height: 20px;
    background: var(--black);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-mark::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-lime);
    border-radius: 50%;
}

.header-descriptor {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Cards & Sections */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 1.25rem -1.5rem 1.25rem -1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-app);
    border-color: var(--text-tertiary);
}

.btn-danger {
    background: var(--bg-card);
    color: #DC2626;
    border: 1px solid var(--border-subtle);
}

.btn-danger:hover {
    background: #FEF2F2;
    border-color: #F87171;
}

.btn-lime {
    background: var(--accent-lime);
    color: var(--black);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-lime:hover {
    background: var(--accent-lime-hover);
    transform: translateY(-1px);
}

/* Forms */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: all 0.15s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--text-tertiary);
    box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.3);
    /* Subtle lime focus ring */
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Service Chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.chip {
    display: inline-flex;
    items-center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-app);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
}

.chip button {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.chip button:hover {
    color: var(--text-primary);
}

/* Table / List View */
.table-list {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 0.75rem 1.5rem;
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    font-size: 0.875rem;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: #F8FAFC;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    background: #ecFCCB;
    border: 1px solid #d9f99d;
    border-radius: 99px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #84cc16;
    border-radius: 50%;
}

/* AI Preview Box */
.preview-box {
    background: var(--bg-app);
    border: 1px solid var(--border-strong);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-height: 100px;
    font-style: italic;
}

.signal-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.signal-tag {
    background: #E5E7EB;
    color: var(--text-secondary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

/* Public Mobile-First Funnel Design */
.funnel-root {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem 1.25rem;
    min-height: 100vh;
}

.funnel-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.funnel-hero-mark {
    width: 48px;
    height: 48px;
    background: var(--black);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.funnel-hero-mark::after {
    content: '';
    width: 14px;
    height: 14px;
    background: var(--accent-lime);
    border-radius: 50%;
}

.funnel-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.funnel-hero p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.funnel-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 6rem; /* Space for the fixed footer button */
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.service-card.active {
    border-color: var(--black);
    background: #FAFAFA;
    box-shadow: 0 0 0 1px var(--black), var(--shadow-md);
}

.service-card-label {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.service-card-icon {
    width: 24px;
    height: 24px;
    color: var(--text-tertiary);
    transition: all 0.2s;
}

.service-card.active .service-card-icon {
    color: var(--black);
    transform: translateX(4px);
}

/* Review Output Section */
.review-output-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--black);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal {
    0% { transform: translateY(15px) scale(0.99); opacity: 0; filter: blur(10px); }
    100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}

.skeleton {
    color: transparent !important;
    background: linear-gradient(90deg, #f0f0f0 25%, #f9f9f9 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



.review-text-content {
    font-size: 1.35rem;
    line-height: 1.6;
    font-weight: 600;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--black);
}

.review-text-content em {
    color: var(--text-tertiary);
    font-style: normal;
    opacity: 0.7;
}

.review-text-content.loading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* CTA Layer */
.funnel-cta-fixed {
    position: sticky;
    bottom: 2rem;
    width: 100%;
    z-index: 40;
}

.btn-funnel-main {
    width: 100%;
    height: 60px;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--accent-lime);
    color: var(--black);
    border: none;
    box-shadow: 0 8px 16px rgba(204, 255, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-funnel-main:hover:not(:disabled) {
    background: var(--accent-lime-hover);
    transform: scale(1.02);
}

.btn-funnel-main:disabled {
    background: var(--bg-card);
    color: var(--text-tertiary);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.action-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-funnel-secondary {
    width: 100%;
    height: 52px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-funnel-secondary:hover {
    background: #FAFAFA;
    border-color: var(--text-tertiary);
}
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-funnel-secondary:hover {
    background: var(--bg-app);
}

/* Typewriter animation support */
.blinking-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2rem;
    background: var(--accent-lime);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Regenerate button animation */
#btn-regenerate svg {
    transition: transform 0.4s ease;
}
#btn-regenerate:hover svg {
    transform: rotate(180deg);
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}.pulse-glow { animation: pulse-glow-anim 1s ease-out; } @keyframes pulse-glow-anim { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); border-color: #2563EB; } 100% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); border-color: var(--border-subtle); } }
