/* VINReveal Main Stylesheet */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

/* Header & Navigation */
.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-logo {
    color: inherit;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
}

.nav-cta {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
}

.nav-cta:hover {
    background-color: var(--primary-hover);
    color: white;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-control {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

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

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

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* VIN Input Form */
.vin-form {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.vin-input {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    text-transform: uppercase;
}

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

.vin-validation-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.vin-validation-feedback.valid {
    color: var(--success-color);
}

.vin-validation-feedback.invalid {
    color: var(--danger-color);
}

/* Decode Options */
.decode-options {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* OCR Upload Section */
.ocr-upload-section {
    margin-top: 2rem;
    padding-top: 2rem;
    position: relative;
}

.divider-text {
    text-align: center;
    position: relative;
    margin-bottom: 1.5rem;
    color: #666;
    font-weight: 500;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

.ocr-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ocr-upload-area:hover,
.ocr-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(0, 102, 204, 0.05);
}

.ocr-upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-help {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.ocr-preview {
    margin-top: 1rem;
    text-align: center;
}

.ocr-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
    margin-top: 1rem;
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.remove-image-btn:hover {
    background: #c82333;
}

.ocr-submit-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Sample VINs */
.sample-vins {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sample-vins p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.sample-list {
    display: flex;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
}

.sample-vin {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* VIN Results */
.vin-result {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.vin-display {
    font-family: var(--font-mono);
    color: var(--primary-color);
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.result-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Messages */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error,
.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
}

.close:hover {
    opacity: 1;
}

/* Decode Error Styles */
.decode-error {
    background-color: var(--bg-primary);
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    text-align: center;
}

.error-content h4 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Result Footer */
.result-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.data-source {
    margin: 0;
}

.source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.decode-timestamp {
    margin: 0;
}

/* Recall Section */
.recall-section {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.recall-section h4 {
    color: #92400e;
}

.recall-item {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #fde68a;
}

.recall-item:last-child {
    margin-bottom: 0;
}

.recall-item h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.recall-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.recall-description,
.recall-remedy {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.recall-remedy {
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

/* Authenticated Layout */
.authenticated-layout {
    margin-top: 2rem;
}

.authenticated-layout .row {
    display: flex;
    gap: 2rem;
}

.sidebar {
    flex: 0 0 250px;
}

.main-content {
    flex: 1;
}

.sidebar-nav {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.nav-menu {
    list-style: none;
    margin-bottom: 2rem;
}

.nav-menu .nav-item {
    margin-bottom: 0.25rem;
}

.nav-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    border: none;
}

.nav-menu .nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-menu .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-menu .icon {
    font-size: 1.25rem;
}

/* Usage Overview */
.usage-overview {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
}

.usage-overview h5 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.progress {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.subscription-tier {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Form Pages */
.form-page {
    padding: 3rem 0;
}

.form-container {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.form-header h2 {
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

.form-body {
    padding: 2rem;
}

.form-footer {
    padding: 1.5rem 2rem;
    background-color: var(--bg-secondary);
    text-align: center;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Mobile Navigation Toggle */
.navbar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    align-items: center;
    justify-content: center;
}

.navbar-toggle-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.navbar-toggle-icon::before {
    top: -8px;
}

.navbar-toggle-icon::after {
    top: 8px;
}

.navbar-toggle.active .navbar-toggle-icon {
    background-color: transparent;
}

.navbar-toggle.active .navbar-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.navbar-toggle.active .navbar-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    /* Navigation */
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .navbar-menu.mobile-active {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 1rem;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
        background-color: var(--bg-secondary);
    }

    .nav-cta {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .logout-form {
        width: 100%;
    }

    .logout-btn {
        width: 100%;
        text-align: left;
        padding: 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    /* Container adjustments */
    .container {
        padding: 0 1rem;
    }

    /* Main content spacing */
    .site-main {
        padding: 1.5rem 0;
        min-height: calc(100vh - 180px);
    }

    /* Hero section mobile */
    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    /* VIN Form Mobile */
    .vin-form {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .input-group .form-control {
        width: 100%;
    }

    .decode-btn {
        width: 100%;
    }

    .vin-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }

    /* Sample VINs mobile */
    .sample-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .sample-vin {
        display: inline-block;
        padding: 0.5rem 0;
    }

    /* Features grid mobile */
    .features {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    /* API section mobile */
    .api-section {
        padding: 2rem 0;
    }

    .api-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .code-example {
        padding: 1rem;
        font-size: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .code-example pre {
        font-size: 0.75rem;
        white-space: pre-wrap;
        word-break: break-all;
    }

    .api-actions {
        flex-direction: column;
        width: 100%;
    }

    .api-actions .btn {
        width: 100%;
    }

    /* Pricing mobile */
    .pricing {
        padding: 2rem 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .price {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    /* CTA section mobile */
    .cta {
        padding: 2rem 0;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .cta-actions .btn {
        width: 100%;
    }

    /* Dashboard mobile */
    .authenticated-layout {
        margin-top: 1rem;
    }

    .authenticated-layout .row {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        flex: 1;
        width: 100%;
    }

    .sidebar-nav {
        padding: 0.75rem;
    }

    .nav-menu .nav-link {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .nav-menu .icon {
        font-size: 1rem;
    }

    .usage-overview {
        padding: 0.75rem;
    }

    /* Info grid mobile */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .info-item {
        padding: 0.75rem;
        background-color: var(--bg-secondary);
        border-radius: 0.375rem;
    }

    /* Results display mobile */
    .vin-result {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-header h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
        word-break: break-all;
    }

    .vin-display {
        display: block;
        margin-top: 0.5rem;
        font-size: 1rem;
    }

    .result-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .result-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .result-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .result-section h4 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    /* Decode error mobile */
    .decode-error {
        padding: 1.5rem;
    }

    .error-content {
        text-align: center;
    }

    .error-content h4 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .error-message {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    /* Result footer mobile */
    .result-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
        font-size: 0.75rem;
    }

    .data-source {
        margin-bottom: 0.5rem;
    }

    .source-badge {
        display: inline-block;
        padding: 0.25rem 0.5rem;
        background-color: var(--bg-secondary);
        border-radius: 0.25rem;
        margin: 0.25rem;
        font-size: 0.75rem;
    }

    /* Footer mobile */
    .site-footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.75rem;
    }

    /* Forms mobile */
    .form-page {
        padding: 1.5rem 0;
    }

    .form-container {
        margin: 0 1rem;
    }

    .form-header {
        padding: 1.5rem 1rem;
    }

    .form-body {
        padding: 1.5rem 1rem;
    }

    .form-footer {
        padding: 1rem;
    }

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

    .form-actions .btn {
        width: 100%;
    }

    /* Messages mobile */
    .messages-container {
        left: 10px;
        right: 10px;
        top: 70px;
        max-width: none;
    }

    .alert {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    /* Typography mobile */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.875rem; }

    /* Utility classes mobile */
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    /* Buttons mobile */
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-sm {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Error pages mobile */
    .error-page {
        padding: 2rem 0;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-message {
        font-size: 1rem;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .error-actions .btn {
        width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

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

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .vin-form {
        padding: 1rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .pricing-card {
        padding: 1rem;
    }

    .price {
        font-size: 2rem;
    }

    /* Ensure form inputs are large enough for mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar-menu.mobile-active {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .hero {
        padding: 1.5rem 0;
    }

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

    .features {
        padding: 1.5rem 0;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .form-control {
        min-height: 44px;
    }

    .sample-vin {
        padding: 0.75rem 1rem;
        background-color: var(--bg-secondary);
        border-radius: 0.375rem;
        display: inline-block;
        margin: 0.25rem 0;
    }

    /* Larger click targets for mobile */
    a, button, input[type="submit"], input[type="button"] {
        position: relative;
    }

    a::after, button::after, input[type="submit"]::after, input[type="button"]::after {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
}

/* Form Enhancements */
.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-block {
    width: 100%;
}

.form-links {
    text-align: center;
    margin-top: 1rem;
}

.form-terms {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--bg-primary);
    padding: 0 1rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.social-login {
    margin-top: 2rem;
}

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

.socialaccount_providers a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.socialaccount_providers a:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* Django form field styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 0.5rem;
}

/* Home Page Styles */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* API Section */
.api-section {
    background-color: var(--bg-tertiary);
    padding: 4rem 0;
}

.api-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.api-text h2 {
    margin-bottom: 1rem;
}

.api-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.code-example {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 2rem;
}

.code-example pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-example code {
    white-space: pre;
}

.api-actions {
    display: flex;
    gap: 1rem;
}

.api-features h4 {
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Pricing Section */
.pricing {
    padding: 4rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* CTA Section */
.cta {
    background-color: var(--bg-tertiary);
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive adjustments for home page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .api-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .api-actions {
        flex-wrap: wrap;
    }

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

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Touch feedback */
.touch-active {
    opacity: 0.7 !important;
    transform: scale(0.98);
}

/* Mobile-specific body class styles */
.is-mobile .btn,
.is-mobile .nav-link,
.is-mobile .sample-vin {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease;
}

/* Viewport height fix for mobile */
.site-main {
    min-height: calc(var(--vh, 1vh) * 100 - 200px);
}

/* Dashboard Styles */
.dashboard-page {
    padding: 1rem 0;
}

.page-title {
    margin-bottom: 2rem;
}

.dashboard-section {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Usage Cards */
.usage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.375rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Usage Progress */
.usage-progress {
    margin-top: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 10px;
    background-color: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

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

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.vin-cell {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.action-card {
    display: block;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.375rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Dashboard Mobile Styles */
@media (max-width: 768px) {
    .dashboard-page {
        padding: 0.5rem 0;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .dashboard-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .dashboard-section h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .usage-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

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

    .stat-label {
        font-size: 0.75rem;
    }

    .table-responsive {
        margin: 0 -1rem;
        padding: 0;
    }

    .table {
        font-size: 0.875rem;
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    /* Hide less important columns on mobile */
    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        display: none;
    }

    .action-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .action-card {
        padding: 1rem;
    }

    .action-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .action-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .action-card p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .usage-cards {
        grid-template-columns: 1fr;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .navbar,
    .hero,
    .footer,
    .site-footer,
    .messages-container,
    .result-actions,
    .sidebar,
    .vin-input-form,
    .sample-vins,
    .features-section,
    .cta-section,
    .recent-activity,
    .quick-actions,
    .share-dropdown,
    .print-btn,
    .save-btn {
        display: none !important;
    }

    .authenticated-layout .row {
        display: block;
    }

    .main-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .vin-result {
        border: none;
        box-shadow: none;
        padding: 0;
        page-break-inside: avoid;
    }

    .result-header {
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .result-header h3 {
        font-size: 18pt;
        margin: 0;
    }

    .vin-display {
        font-family: monospace;
        font-size: 14pt;
        font-weight: bold;
    }

    .result-section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .result-section h4 {
        font-size: 14pt;
        border-bottom: 1px solid #ccc;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

    .info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .info-item {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        page-break-inside: avoid;
    }

    .info-label {
        font-weight: bold;
        margin-right: 5px;
    }

    .info-label::after {
        content: ":";
    }

    .recall-section {
        border: 1px solid #000;
        padding: 10px;
        margin-top: 20px;
    }

    .result-footer {
        margin-top: 30px;
        padding-top: 10px;
        border-top: 1px solid #ccc;
        font-size: 10pt;
        color: #666;
    }

    /* Add print header */
    @page {
        margin: 1in;
    }

    .vin-result::before {
        content: "VINReveal Decode Report";
        display: block;
        font-size: 10pt;
        color: #666;
        margin-bottom: 20px;
        text-align: right;
    }
}

/* Share Dropdown Styles */
.share-dropdown {
    display: inline-block;
    position: relative;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    list-style: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    background-color: transparent;
    border: 0;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.dropdown-item:active {
    background-color: var(--bg-tertiary);
}

/* Share Menu Specific */
.share-menu {
    right: 0;
    left: auto;
}

.share-menu .dropdown-item {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-menu .dropdown-item::before {
    content: '';
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.share-copy::before {
    content: '📋';
}

.share-email::before {
    content: '✉️';
}

.share-twitter::before {
    content: '🐦';
}

.share-facebook::before {
    content: '📘';
}

.share-whatsapp::before {
    content: '💬';
}

/* Recall Section Styles */
.recall-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.recall-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.recall-section.no-recalls {
    background-color: #f0fdf4;
    border-color: #86efac;
}

.recall-section.no-recalls h4 {
    color: #16a34a;
}

.recall-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recall-item {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.recall-item:hover {
    box-shadow: var(--shadow-md);
}

/* Severity-based styling */
.recall-item.severity-critical {
    border-left: 4px solid #ef4444;
    background-color: #fef2f2;
}

.recall-item.severity-high {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.recall-item.severity-medium {
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
}

.recall-item.severity-low {
    border-left: 4px solid #6b7280;
}

.recall-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.recall-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.recall-campaign {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.recall-item p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.recall-item p strong {
    font-weight: 600;
    color: var(--text-primary);
}

.recall-date,
.recall-manufacturer {
    color: var(--text-secondary);
}

.recall-summary,
.recall-consequence {
    color: var(--text-primary);
}

.recall-remedy {
    color: var(--success-color);
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recall-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .recall-campaign {
        align-self: flex-start;
    }
}
