/* Sigvera Global Styles */
:root {
    --primary: #1E3A5F;
    --primary-dark: #152A45;
    --primary-light: #2D5A8A;
    --secondary: #00A878;
    --secondary-dark: #008560;
    --accent: #F4A261;
    --success: #00A878;
    --warning: #F4A261;
    --error: #E63946;
    --info: #457B9D;
    --white: #FFFFFF;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    margin: 0;
    padding: 0;
}

/* Accessibility - prevent focus outline on h1 during FocusOnNavigate */
h1:focus {
    outline: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

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

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

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

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Landing Page */
.landing-page section {
    padding: 4rem 0;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

.hero-cta .btn-outline {
    color: var(--white);
    border-color: var(--white);
}

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

/* How It Works */
.how-it-works {
    background: var(--gray-100);
}

.how-it-works h2, .features h2, .pricing-preview h2, .trust h2, .cta h2 {
    text-align: center;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

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

.step {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

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

.feature h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* Pricing */
.pricing-preview {
    background: var(--gray-100);
}

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

.pricing-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--secondary);
    transform: scale(1.05);
}

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

.pricing-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

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

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-600);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.pricing-card li:before {
    content: "✓ ";
    color: var(--secondary);
    font-weight: bold;
}

/* Trust Section */
.trust {
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

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

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
}

.cta p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Card */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--success);
}

.invalid {
    outline: 2px solid var(--error);
}

.validation-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Blazor Error */
.blazor-error-boundary {
    background: var(--error);
    padding: 1rem;
    color: white;
    border-radius: 8px;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred. Please refresh the page.";
}

/* Ink Code Display */
.ink-code-display {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    color: var(--primary);
    text-align: center;
    font-family: 'Courier New', monospace;
    background: var(--gray-100);
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem;
}

.auth-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

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

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.auth-footer p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-check-label a {
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.alert p {
    margin: 0;
    font-size: 0.95rem;
}

.alert p + p {
    margin-top: 0.5rem;
}

.alert .btn {
    margin-top: 1rem;
}

.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

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

    .pricing-card.featured {
        transform: none;
    }

    .stats {
        gap: 2rem;
    }

    .auth-container {
        padding: 2rem;
    }
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
    background: var(--gray-100);
    min-height: 100vh;
}

.dashboard-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.action-card.primary {
    border: 2px solid var(--secondary);
}

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

.action-card h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.action-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.dashboard-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.section-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.section-header a {
    color: var(--primary);
    text-decoration: none;
}

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

.code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.code-value {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.code-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.code-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active { background: #d4edda; color: #155724; }
.status-used { background: #cce5ff; color: #004085; }
.status-expired { background: #fff3cd; color: #856404; }
.status-revoked { background: #f8d7da; color: #721c24; }

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

.upgrade-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-content h3 {
    margin: 0 0 0.5rem 0;
}

.upgrade-content p {
    margin: 0;
    opacity: 0.9;
}

.stat-sub {
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Coverage Widget */
.coverage-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.coverage-widget {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.coverage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.coverage-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.coverage-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

.coverage-info {
    display: flex;
    flex-direction: column;
}

.coverage-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.coverage-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.coverage-status {
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coverage-status.status-protected {
    background: linear-gradient(135deg, rgba(0, 168, 120, 0.1) 0%, rgba(0, 168, 120, 0.05) 100%);
    border: 2px solid var(--secondary);
}

.coverage-status.status-basic {
    background: rgba(244, 162, 97, 0.1);
    border: 2px solid var(--accent);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary);
}

.status-badge.basic {
    color: var(--accent);
}

.status-badge .checkmark {
    color: var(--secondary);
    font-size: 1.25rem;
}

.status-badge .icon {
    font-size: 1.25rem;
}

.status-desc {
    margin: 0;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.status-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

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

/* Generate Page */
.generate-page, .verify-page, .upload-page, .history-page, .settings-page, .subscription-page {
    padding: 2rem 0;
    background: var(--gray-100);
    min-height: 100vh;
}

.generate-header, .verify-header, .upload-header, .history-header, .settings-header, .subscription-header {
    margin-bottom: 2rem;
}

.generate-header h1, .verify-header h1, .upload-header h1, .settings-header h1, .subscription-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.generate-prompt {
    text-align: center;
    padding: 3rem;
}

.prompt-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.codes-available {
    margin: 1.5rem 0;
}

.available-count {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.available-label {
    display: block;
    color: var(--gray-600);
}

.code-display-container {
    max-width: 600px;
    margin: 0 auto;
}

.code-display-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.code-instruction {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.code-timer {
    margin: 1.5rem 0;
    font-size: 1.25rem;
}

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

.timer-value {
    font-weight: 600;
    color: var(--primary);
}

.timer-warning .timer-value {
    color: var(--error);
}

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

.code-instructions {
    margin-bottom: 1.5rem;
}

.code-instructions h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.code-instructions ol {
    padding-left: 1.5rem;
}

.code-instructions li {
    margin-bottom: 0.75rem;
}

.code-instructions .code-tip {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--info-bg, #e8f4fd);
    border-left: 3px solid var(--info, #0284c7);
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #4b5563);
}

.generate-another {
    text-align: center;
}

/* Verification Page */
.code-input {
    font-family: monospace;
    font-size: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.25rem;
}

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

.verification-result {
    margin-top: 2rem;
    padding: 2rem;
}

.verification-result.result-valid {
    border: 2px solid var(--success);
}

.verification-result.result-invalid {
    border: 2px solid var(--error);
}

.result-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.verification-result h2 {
    text-align: center;
    color: var(--primary);
}

.result-message {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.result-details {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

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

.detail-value.code-value {
    font-family: monospace;
    font-weight: 600;
}

.legal-coverage .coverage-yes {
    color: var(--success);
    font-weight: 600;
}

.result-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.trust-message {
    color: var(--success);
    font-weight: 600;
}

.verify-info {
    margin-top: 3rem;
}

/* History Page */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.history-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--white);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: var(--gray-600);
}

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

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

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
}

.item-code {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.item-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.item-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.item-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.expires-in {
    color: var(--warning);
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.4s ease-out;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    line-height: 100px;
    animation: pulse 3s ease-in-out infinite;
}

.empty-state h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.empty-state .btn {
    margin-top: 0.5rem;
}

/* Onboarding/Getting Started */
.onboarding-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.onboarding-step.completed {
    background: rgba(0, 168, 120, 0.1);
    color: var(--secondary);
}

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

.onboarding-step.completed .step-num {
    background: var(--secondary);
    color: var(--white);
}

/* Getting Started Card */
.getting-started-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.4s ease-out;
}

.getting-started-card h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.getting-started-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.getting-started-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gs-step {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gs-step:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.gs-step-num {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

.gs-step-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.gs-step-desc {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.5;
}

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

.document-card {
    overflow: hidden;
}

.document-thumbnail {
    height: 150px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.document-info {
    padding: 1rem;
}

.document-code {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
}

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

.document-description {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.document-actions {
    padding: 0 1rem 1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info {
    color: var(--gray-600);
}

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

/* Settings Page */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.subscription-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.plan-expiry {
    display: block;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.danger-zone {
    border: 1px solid var(--error);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.verified {
    color: var(--success);
}

.unverified {
    color: var(--warning);
}

/* Subscription Page */
.current-plan-section {
    margin-bottom: 2rem;
}

.plan-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.plan-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.badge-basic { background: var(--gray-200); color: var(--gray-700); }
.badge-pro { background: var(--secondary); color: var(--white); }
.badge-enterprise { background: var(--primary); color: var(--white); }

.plan-usage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.usage-item {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.usage-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.usage-bar {
    height: 8px;
    background: var(--gray-300);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.usage-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 0.85rem;
    color: var(--gray-700);
}

.credits-section {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.credits-count {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.plans-section h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

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

.plan-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    border: 2px solid var(--gray-200);
}

.plan-card.featured {
    border-color: var(--secondary);
}

.plan-card.current {
    border-color: var(--primary);
}

.plan-current-badge, .plan-recommended {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-current-badge {
    background: var(--primary);
    color: var(--white);
}

.plan-recommended {
    background: var(--secondary);
    color: var(--white);
}

.plan-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-600);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.plan-features li:before {
    content: "✓ ";
    color: var(--secondary);
}

.legal-defense-section {
    text-align: center;
}

.defense-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.legal-defense-section ul {
    text-align: left;
    max-width: 600px;
    margin: 1rem auto;
}

.defense-note {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.upgrade-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.upgrade-cta h2 {
    color: var(--white);
}

/* Upload Page */
.upload-form {
    max-width: 600px;
}

.file-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-100);
    border-radius: 4px;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--gray-600);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--gray-400);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: var(--gray-100);
    position: relative;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--primary-light);
    background: var(--white);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.05);
    transform: scale(1.01);
}

.drop-zone.has-file {
    border-style: solid;
    border-color: var(--secondary);
    background: var(--white);
}

.drop-zone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-500);
}

.drop-zone-text {
    margin: 0 0 0.5rem;
    color: var(--gray-700);
}

.browse-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    pointer-events: auto;
}

.browse-link:hover {
    color: var(--primary-dark);
}

.drop-zone-hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.drop-zone-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.drop-zone-preview .preview-icon {
    font-size: 2.5rem;
}

.drop-zone-preview .file-name {
    font-weight: 600;
    color: var(--gray-800);
    word-break: break-all;
}

.drop-zone-preview .file-size {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.drop-zone-preview .remove-file {
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.upload-tips {
    margin-top: 2rem;
}

.upload-tips h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-tips ul {
    padding-left: 1.5rem;
}

.upload-tips li {
    margin-bottom: 0.5rem;
}

.alert-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

/* Checkout Result Pages */
.checkout-result {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.result-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.result-card.success .result-icon {
    color: var(--success);
}

.result-card.cancelled .result-icon {
    color: var(--gray-500);
}

.result-card h1 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.result-card .benefits {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.result-card .benefits h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.result-card .benefits ul {
    padding-left: 1.5rem;
    margin: 0;
}

.result-card .benefits li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.result-card .help-text {
    color: var(--gray-600);
    margin: 2rem 0;
}

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

/* Enhanced Landing Page Styles */

/* Hero with Video Background */
.hero-with-media {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(45, 90, 138, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Demo Video Section */
.demo-section {
    padding: 5rem 0;
    text-align: center;
}

.demo-section h2 {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.demo-video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.demo-video-placeholder {
    position: relative;
    cursor: pointer;
}

.demo-thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.play-button svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-left: 4px;
}

.demo-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Step Images */
.step-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-200);
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Feature Images */
.feature-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Use Cases Section */
.use-cases {
    padding: 5rem 0;
    background: var(--white);
}

.use-cases h2 {
    text-align: center;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

.use-case {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background: var(--gray-100);
    transition: transform 0.2s, box-shadow 0.2s;
}

.use-case:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.use-case-image {
    height: 180px;
    overflow: hidden;
    background: var(--gray-200);
}

.use-case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.use-case-content {
    padding: 1.5rem;
}

.use-case-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.use-case-content p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.95rem;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--gray-100);
}

.testimonials h2 {
    text-align: center;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

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

.testimonial {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: var(--gray-700);
    line-height: 1.7;
    margin: 0;
}

.testimonial-content p::before {
    content: '"';
    font-size: 2rem;
    color: var(--secondary);
    line-height: 0;
    vertical-align: -0.3em;
    margin-right: 0.25rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-200);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: var(--primary);
}

.author-info span {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Security Section */
.security-section {
    padding: 5rem 0;
    background: var(--white);
}

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

.security-text h2 {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.security-text > p {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.security-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-features li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

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

.security-features li strong {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.security-features li span {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.security-image {
    text-align: center;
}

.security-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* App Showcase Section */
.app-showcase {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

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

.app-text h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.app-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.app-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-badge {
    display: inline-block;
    transition: transform 0.2s;
}

.app-badge:hover {
    transform: scale(1.05);
}

.app-badge img {
    height: 50px;
    width: auto;
}

.app-mockup {
    text-align: center;
}

.app-mockup img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
    }

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

    .security-content,
    .app-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .security-image,
    .app-mockup {
        order: -1;
    }

    .app-mockup img {
        max-height: 350px;
    }

    .step-image {
        width: 150px;
        height: 150px;
    }
}

/* Legal Defense Pages */
.legal-defense-page {
    padding: 2rem 0;
    background: var(--gray-100);
    min-height: 100vh;
}

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

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

.page-header h1 {
    color: var(--primary);
    margin: 0.5rem 0;
}

.page-header p {
    color: var(--gray-600);
}

/* Upgrade Required State */
.upgrade-required {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
}

.upgrade-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upgrade-required h1 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.upgrade-desc {
    color: var(--gray-700);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

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

/* Legal Defense Header */
.legal-defense-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.header-content h1 {
    color: var(--primary);
    margin: 0 0 0.5rem 0;
}

.header-content p {
    color: var(--gray-600);
    margin: 0;
}

/* Coverage Banner */
.coverage-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 168, 120, 0.1) 0%, rgba(0, 168, 120, 0.05) 100%);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.coverage-status-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
}

.coverage-info h3 {
    color: var(--secondary);
    margin: 0 0 0.25rem 0;
}

.coverage-info p {
    color: var(--gray-700);
    margin: 0;
    font-size: 0.95rem;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.quick-action:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

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

.quick-action .action-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.quick-action .action-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Requests Section */
.requests-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
}

.requests-section .section-header {
    margin-bottom: 1rem;
}

.requests-section .section-header h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin: 0;
}

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

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--gray-100);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.request-item:hover {
    background: var(--gray-200);
}

.request-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.request-type {
    font-weight: 600;
    color: var(--primary);
}

.request-code {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.request-case {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.request-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.request-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-review { background: #cce5ff; color: #004085; }
.status-progress { background: #d4edda; color: #155724; }
.status-info { background: #f8d7da; color: #721c24; }
.status-completed { background: var(--secondary); color: var(--white); }
.status-declined { background: var(--gray-400); color: var(--gray-700); }
.status-cancelled { background: var(--gray-300); color: var(--gray-600); }

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

.request-deadline {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.request-deadline.urgent {
    color: var(--error);
    font-weight: 600;
}

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

.empty-icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

/* Form Sections */
.form-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.section-desc {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Document Selector */
.document-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.document-option:hover {
    background: var(--gray-200);
}

.document-option.selected {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.05);
}

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

.doc-code {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
}

.doc-name {
    font-size: 0.9rem;
    color: var(--gray-700);
}

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

/* Request Types */
.request-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--gray-100);
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.type-option:hover {
    background: var(--gray-200);
}

.type-option.selected {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.05);
}

.type-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.type-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.type-desc {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

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

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

/* Success State */
.success-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 12px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.success-state h2 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.success-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Request Detail */
.request-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
}

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

.request-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.request-title h1 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
}

.request-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-danger {
    border-color: var(--error);
    color: var(--error);
}

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

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

.info-card {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.info-card.urgent {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--error);
}

.info-card h3 {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card p {
    margin: 0;
    color: var(--gray-900);
}

.ink-code-value {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.description-section,
.messages-section,
.document-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.description-section h2,
.messages-section h2,
.document-section h2 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.description-content {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Messages */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 12px;
    max-width: 80%;
}

.user-message {
    background: var(--primary);
    color: var(--white);
    margin-left: auto;
}

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

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.user-message .message-header {
    opacity: 0.8;
}

.admin-message .message-header {
    color: var(--gray-600);
}

.message-sender {
    font-weight: 600;
}

.message-content {
    line-height: 1.5;
}

.no-messages,
.closed-notice {
    padding: 2rem;
    text-align: center;
    background: var(--gray-100);
    border-radius: 8px;
}

.no-messages p,
.closed-notice p {
    margin: 0;
    color: var(--gray-600);
}

.new-message {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.new-message h3 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Document Card */
.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.doc-icon {
    font-size: 2rem;
}

.doc-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.doc-details .doc-name {
    font-weight: 600;
    color: var(--gray-900);
}

.doc-details .doc-meta {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-defense-header {
        flex-direction: column;
        gap: 1rem;
    }

    .coverage-banner {
        flex-direction: column;
        text-align: center;
    }

    .request-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .request-meta {
        flex-wrap: wrap;
    }

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

    .features-list {
        grid-template-columns: 1fr;
    }

    .request-header {
        flex-direction: column;
        gap: 1rem;
    }

    .message {
        max-width: 95%;
    }
}

/* Certificate & Audit Trail Pages */
.certificates-intro,
.audit-intro {
    margin-bottom: 2rem;
}

.info-box {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    border-left: 4px solid var(--primary);
}

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

.info-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.info-content p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.6;
}

.document-list {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.document-list h2 {
    margin: 0 0 1.5rem 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-100);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.document-card:hover {
    background: var(--gray-200);
}

.document-card.selected {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.05);
}

.document-card .doc-icon {
    font-size: 2rem;
}

.document-card .doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.doc-verifications {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 500;
}

.doc-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generating {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Audit Preview Section */
.audit-preview {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.audit-preview h2 {
    margin: 0 0 1.5rem 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.no-verifications {
    text-align: center;
    padding: 2rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.no-verifications p {
    margin: 0 0 0.5rem 0;
    color: var(--gray-600);
}

.no-verifications .hint {
    font-size: 0.85rem;
    color: var(--gray-500);
}

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

.verification-stats .stat {
    background: var(--gray-100);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
}

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

.verification-stats .stat-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.verification-timeline h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--gray-700);
}

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

.timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.timeline-item.success .timeline-marker {
    background: var(--secondary);
}

.timeline-item.failed .timeline-marker {
    background: var(--error);
}

.timeline-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.timeline-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.timeline-time {
    color: var(--gray-700);
    font-size: 0.9rem;
}

.timeline-result {
    font-weight: 600;
    font-size: 0.85rem;
}

.timeline-item.success .timeline-result {
    color: var(--secondary);
}

.timeline-item.failed .timeline-result {
    color: var(--error);
}

.timeline-ip {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.more-hint {
    margin-top: 1rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

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

    .document-card {
        flex-direction: column;
        text-align: center;
    }

    .document-card .doc-info {
        align-items: center;
    }

    .verification-stats {
        grid-template-columns: 1fr;
    }

    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   UI Polish & Animations
   ============================================ */

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner.lg {
    width: 60px;
    height: 60px;
    border-width: 5px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 25%,
        var(--gray-100) 50%,
        var(--gray-200) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 12px;
}

/* Animation Utility Classes */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.4s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Stagger children animations */
.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 50ms; }
.stagger-children > *:nth-child(3) { animation-delay: 100ms; }
.stagger-children > *:nth-child(4) { animation-delay: 150ms; }
.stagger-children > *:nth-child(5) { animation-delay: 200ms; }
.stagger-children > *:nth-child(6) { animation-delay: 250ms; }

/* Button Improvements */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Smooth Page Transitions */
.page-enter {
    animation: fadeInUp 0.3s ease-out;
}

/* Improved Focus States (Accessibility) */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

/* Toast/Notification Animations */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast.toast-exit {
    animation: fadeIn 0.2s ease-in reverse;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Badge Improvements */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(0, 168, 120, 0.1);
    color: var(--secondary);
}

.badge-success {
    background: rgba(0, 168, 120, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(244, 162, 97, 0.1);
    color: #d4790f;
}

.badge-error {
    background: rgba(230, 57, 70, 0.1);
    color: var(--error);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Improved Transitions for Interactive Elements */
a,
button,
input,
select,
textarea,
.btn,
.card-hover,
.document-card,
.request-item,
.type-option,
.document-option {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Icon Animations */
.icon-spin {
    animation: spin 1s linear infinite;
}

.icon-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.4s ease-out, pulse 0.6s ease-out 0.4s;
}

.success-checkmark svg {
    stroke-dasharray: 100;
    animation: checkmark 0.6s ease-out 0.2s forwards;
}

/* Number Counter Animation */
.counter-animate {
    transition: all 0.3s ease;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: var(--gray-900);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Micro-interactions for Form Inputs */
.form-control {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.form-control:hover:not(:focus) {
    border-color: var(--gray-400);
}

/* Table Row Hover */
table tbody tr {
    transition: background-color 0.15s ease;
}

table tbody tr:hover {
    background-color: var(--gray-100);
}

/* Loading State for Buttons */
.btn.loading {
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    color: var(--white);
}

/* Reduce motion for accessibility */
@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;
    }
}

/* ============================================================================
   Pure-SSR progressive enhancement: authenticated app shell, native <dialog>
   modals, drag-and-drop upload, live countdown, and query-string navigation.
   These styles support the TypeScript in wwwroot/ts/site.ts.
   ============================================================================ */

/* The [hidden] attribute must always win over component display rules. */
[hidden] {
    display: none !important;
}

/* --- Authenticated app shell (MainLayout) --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white, #fff);
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.app-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
}

.app-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.app-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--gray-700, #374151);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.app-nav a:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--primary);
}

.app-nav a.active {
    color: var(--primary);
    background: rgba(30, 58, 95, 0.08);
}

.app-logout {
    margin-left: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
}

.btn-link:hover {
    background: var(--gray-100, #f3f4f6);
}

.app-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: none;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 8px;
    cursor: pointer;
}

.app-nav-toggle span {
    display: block;
    height: 2px;
    width: 20px;
    margin: 0 auto;
    background: var(--gray-700, #374151);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .app-nav-toggle {
        display: flex;
        order: 3;
    }

    .app-header-inner {
        flex-wrap: wrap;
    }

    .app-nav {
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.125rem;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.2s ease;
    }

    .app-nav.is-open {
        max-height: 520px;
        padding-bottom: 0.75rem;
    }

    .app-logout {
        margin: 0.25rem 0 0;
    }
}

/* --- Drag-and-drop upload: visually-hide the input (TS + the browse label drive it) --- */
.drop-zone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    inset: auto;
    opacity: 0;
}

.drop-zone-content {
    pointer-events: auto;
}

.drop-zone.is-dragover {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.05);
    transform: scale(1.01);
}

.preview-thumb {
    max-width: 160px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid var(--gray-200, #e5e7eb);
    object-fit: cover;
}

/* --- Live expiry countdown --- */
.timer-value.is-expired {
    color: var(--danger, #dc2626);
    font-weight: 700;
}

/* --- Native <dialog> modal (Early Access) --- */
.ea-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 460px;
    width: calc(100% - 2rem);
    overflow: visible;
}

.ea-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

/* --- History tabs as links + disabled pager controls --- */
.history-tabs .tab {
    text-decoration: none;
    cursor: pointer;
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Settings: resend-verification row --- */
.verify-email-row {
    margin-top: 1rem;
}

.verified-note {
    color: var(--secondary, #00a878);
    font-weight: 600;
}

/* --- Copy-button success flash (set by site.ts) --- */
.is-success {
    color: var(--secondary, #00a878) !important;
    border-color: var(--secondary, #00a878) !important;
}


/* ==========================================================================
   Document detail page, credit purchase, account notices (pure-SSR features)
   ========================================================================== */
.document-view .document-view-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 56em) {
    .document-view .document-view-grid { grid-template-columns: 1fr; }
}
.document-view .document-preview {
    background: var(--gray-100, #f3f4f6);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
}
.document-view .document-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.document-view .document-preview .preview-fallback {
    text-align: center;
    color: var(--gray-600, #4b5563);
}
.document-view .document-preview .preview-fallback .preview-icon { font-size: 3rem; }
.document-view .document-meta dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.5rem 1rem;
    margin: 0;
}
.document-view .document-meta dt { font-weight: 600; color: var(--gray-600, #4b5563); }
.document-view .document-meta dd { margin: 0; overflow-wrap: anywhere; }
.document-view .document-meta code { font-size: 0.8rem; }
.document-view .document-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.document-view .danger-zone { margin-top: 2rem; border-top: 1px solid var(--gray-200, #e5e7eb); padding-top: 1.25rem; }
.document-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.ssr-dialog {
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: min(28rem, calc(100vw - 2rem));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.ssr-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.ssr-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

.buy-credits { margin-top: 1rem; }
.buy-credits .buy-credits-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.buy-credits select { min-width: 12rem; }
.buy-credits .unit-price { color: var(--gray-600, #4b5563); font-size: 0.9rem; }

.notice-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}
.notice-banner.warning { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; }
.notice-banner.danger { background: #fef2f2; border: 1px solid #fca5a5; color: #7f1d1d; }
.notice-banner p { margin: 0; }

/* Account deletion (Settings → Delete Account) */
.delete-account-form {
    margin-top: 1rem;
    max-width: 28rem;
}

.delete-account-form .form-check {
    align-items: flex-start;
}

.delete-account-form .btn-danger {
    margin-top: 0.5rem;
    white-space: normal;
}

/* ------------------------------------------------------------------------------------------------
   Public information pages (Terms, Privacy, About, Contact, Security, Help, Pricing)
   rem-based, wraps at every width, menu collapses on an em breakpoint (works with OS text zoom)
   ------------------------------------------------------------------------------------------------ */
.public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e6e8ee;
    backdrop-filter: blur(6px);
}

.public-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.public-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0f172a;
    text-decoration: none;
}

.public-nav-menu {
    position: relative;
    min-width: 0;
}

.public-nav-menu > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.5rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #0f172a;
}

.public-nav-menu > summary::-webkit-details-marker {
    display: none;
}

.public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.public-nav a {
    color: #334155;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.public-nav a:hover,
.public-nav a:focus-visible {
    color: #0f172a;
    text-decoration: underline;
}

.public-nav a.btn {
    color: #fff;
    text-decoration: none;
}

@media (min-width: 48em) {
    .public-nav-menu > summary {
        display: none;
    }

    /* Author display on the content keeps it visible even while the <details> is closed. */
    .public-nav-menu .public-nav {
        display: flex;
    }
}

@media (max-width: 47.99em) {
    .public-nav-menu[open] .public-nav {
        position: absolute;
        right: 0;
        top: calc(100% + 0.5rem);
        flex-direction: column;
        align-items: flex-start;
        min-width: 12rem;
        padding: 1rem;
        background: #fff;
        border: 1px solid #e6e8ee;
        border-radius: 0.75rem;
        box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12);
    }
}

.public-main {
    flex: 1;
    padding: 3rem 0 4rem;
}

.info-page {
    max-width: 44rem;
    margin: 0 auto;
    color: #1f2937;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.info-page.info-page-wide {
    max-width: 68rem;
}

.info-page h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
    margin: 0 0 0.5rem;
    color: #0f172a;
}

.info-page .info-meta {
    color: #64748b;
    margin: 0 0 2rem;
}

.info-page h2 {
    font-size: 1.35rem;
    margin: 2.25rem 0 0.75rem;
    color: #0f172a;
}

.info-page h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: #0f172a;
}

.info-page p,
.info-page li {
    font-size: 1.05rem;
}

.info-page ul,
.info-page ol {
    padding-left: 1.5rem;
}

.info-page a {
    color: #1d4ed8;
}

.info-page code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}

.info-page .info-summary {
    background: #f5f7fb;
    border: 1px solid #e6e8ee;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.info-page .info-summary h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.info-page .info-summary ul {
    margin-bottom: 0;
}

.info-page .info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-page .info-card {
    border: 1px solid #e6e8ee;
    border-radius: 0.75rem;
    padding: 1.25rem;
    min-width: 0;
}

.info-page .info-card h3 {
    margin-top: 0;
}

.info-page .info-card p:last-child {
    margin-bottom: 0;
}

.info-page details.faq {
    border-bottom: 1px solid #e6e8ee;
    padding: 0.85rem 0;
}

.info-page details.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #0f172a;
}

.info-page details.faq p {
    margin: 0.75rem 0 0;
}

.info-page .pricing-page {
    padding: 1rem 0 2rem;
    background: transparent;
}

.info-page .pricing-page .pricing-grid {
    margin-top: 0;
}
