/* ==================== VARIABLES ==================== */
:root {
    --black: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    
    --green: #22c55e;
    --green-dark: #16a34a;
    --green-light: #dcfce7;
    --green-50: #f0fdf4;
    
    --red: #ef4444;
    --red-light: #fee2e2;
    
    --yellow: #f59e0b;
    --yellow-light: #fef3c7;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--black);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

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

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

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

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--black);
}

.logo i {
    color: var(--green);
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav a {
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--black) !important;
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: background 0.2s !important;
}

.nav-cta:hover {
    background: var(--gray-800) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--black);
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--gray-300);
        box-shadow: var(--shadow);
    }
    
    .nav.open {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-500);
    padding: 60px 24px 30px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

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

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

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h5 {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--gray-500);
    font-size: 0.9rem;
    padding: 8px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
}

.footer-legal a {
    color: var(--gray-500);
    margin-left: 24px;
}

.footer-legal a:hover {
    color: var(--white);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--gray-800);
    border-color: var(--gray-800);
}

.btn-success {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}

.btn-success:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.btn-outline {
    background: var(--white);
    color: var(--black);
    border-color: var(--gray-300);
}

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

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--black);
}

.form-input::placeholder {
    color: var(--gray-500);
}

.form-input:disabled {
    background: var(--gray-100);
    color: var(--gray-600);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 6px;
}

.form-error {
    font-size: 0.85rem;
    color: var(--red);
    margin-top: 6px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: var(--green-light);
    color: var(--green-dark);
}

.badge-warning {
    background: var(--yellow-light);
    color: #92400e;
}

.badge-danger {
    background: var(--red-light);
    color: var(--red);
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-success {
    background: var(--green-light);
    color: var(--green-dark);
}

.alert-warning {
    background: var(--yellow-light);
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: 140px 24px 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--white) 100%);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 20px 60px;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

/* Search Box */
.search-container {
    max-width: 600px;
    margin: 0 auto 32px;
}

.search-box {
    display: flex;
    gap: 12px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.search-box button {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.search-box button:hover {
    background: var(--gray-800);
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
        padding: 12px;
    }
    
    .search-box button {
        width: 100%;
        justify-content: center;
    }
}

.search-hint {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 12px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
    margin-top: 40px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.trust-badge i {
    font-size: 1.25rem;
    color: var(--green);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 100px 24px;
}

.section-gray {
    background: var(--gray-100);
}

.section-dark {
    background: var(--black);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 500px;
    margin: 16px auto 0;
}

/* ==================== REVIEW CARDS ==================== */
.review-card {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--white);
    margin-bottom: 12px;
}

.review-card:hover {
    border-color: var(--gray-400);
}

.review-card.selected {
    border-color: var(--green);
    background: var(--green-50);
}

.review-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

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

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.reviewer-name {
    font-weight: 600;
}

.reviewer-date {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.review-stars {
    color: var(--yellow);
    font-size: 0.9rem;
}

.review-text {
    color: var(--gray-700);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.review-text.empty {
    font-style: italic;
    color: var(--gray-500);
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-400);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
}

.review-card.selected .review-checkbox {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

/* ==================== PROGRESS STEPS ==================== */
.progress-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
}

.progress-step.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.progress-step.completed {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green-dark);
}

.progress-step .num {
    width: 24px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.progress-step.active .num {
    background: var(--white);
    color: var(--black);
}

.progress-step.completed .num {
    background: var(--green);
    color: var(--white);
}

@media (max-width: 768px) {
    .progress-bar {
        flex-wrap: wrap;
    }
    
    .progress-step span:not(.num) {
        display: none;
    }
    
    .progress-step {
        padding: 10px 16px;
    }
}

/* ==================== SIGNATURE PAD ==================== */
.signature-container {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.signature-pad-wrapper {
    background: var(--white);
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 16px;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-sm);
    cursor: crosshair;
    touch-action: none;
}

.signature-actions {
    display: flex;
    gap: 12px;
}

.signature-hint {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 12px;
}

/* ==================== SUMMARY CARD ==================== */
.summary-card {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-300);
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-label {
    color: var(--gray-600);
}

.summary-value {
    font-weight: 600;
}

.summary-total {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
}

/* ==================== SUCCESS PAGE ==================== */
.success-container {
    text-align: center;
    padding: 60px 24px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon i {
    font-size: 3rem;
    color: var(--green);
}

.success-title {
    font-size: 2rem;
    margin-bottom: 16px;
}

.success-text {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 450px;
    margin: 0 auto 40px;
}

.case-box {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 300px;
    margin: 0 auto 40px;
}

.case-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.case-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* ==================== LOADING ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 3px;
}

.loading-text {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--gray-700);
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--gray-600); }
.text-success { color: var(--green-dark); }
.text-danger { color: var(--red); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }

/* ==================== PAGE SPECIFIC ==================== */
.page-header {
    padding: 120px 24px 40px;
    background: var(--gray-100);
    text-align: center;
}

.page-header h1 {
    margin-bottom: 12px;
}

.page-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.page-content {
    padding: 60px 24px;
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        position: static;
    }
}

/* Business header */
.business-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.business-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.business-avatar {
    width: 56px;
    height: 56px;
    background: var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gray-500);
}

.business-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.business-meta {
    color: var(--gray-600);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-meta .stars {
    color: var(--yellow);
}

/* Action bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 30px;
}

@media (max-width: 600px) {
    .action-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .action-bar .btn {
        width: 100%;
    }
}

/* Checkbox agreement */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
}

.checkbox-group a {
    color: var(--black);
    text-decoration: underline;
}
