/* casestatus.in Brand System
   Design tokens, shared components, and visual identity.
   Used across all templates for consistent look and feel. */

/* ============================================================
   1. CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
    /* Primary palette — deep navy to slate */
    --color-navy-950: #0a0f1e;
    --color-navy-900: #0f172a;
    --color-navy-800: #1a2744;
    --color-navy-700: #1e3a5f;
    --color-navy-600: #264a78;

    /* Accent — muted gold for premium feel */
    --color-gold-400: #d4af57;
    --color-gold-500: #c9a84c;
    --color-gold-600: #b8963e;

    /* Surface colors */
    --color-surface: #ffffff;
    --color-surface-muted: #f8fafc;
    --color-surface-hover: #f1f5f9;

    /* Text */
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-text-on-dark: #e2e8f0;
    --color-text-on-dark-muted: #94a3b8;

    /* Status */
    --color-pending: #059669;
    --color-pending-bg: #ecfdf5;
    --color-disposed: #6b7280;
    --color-disposed-bg: #f3f4f6;

    /* Shadows — layered for depth */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 4px 8px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 8px 16px rgba(15, 23, 42, 0.06), 0 16px 48px rgba(15, 23, 42, 0.12);

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. Base Styles
   ============================================================ */

/* Smooth scrolling and font rendering */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text-primary);
    background: var(--color-surface-muted);
}

/* ============================================================
   3. Hero / Gradient Backgrounds
   ============================================================ */

.hero-gradient {
    background: linear-gradient(
        135deg,
        var(--color-navy-950) 0%,
        var(--color-navy-800) 40%,
        var(--color-navy-700) 70%,
        var(--color-navy-600) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow for depth */
.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(38, 74, 120, 0.4) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* Decorative grid pattern overlay */
.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

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

/* ============================================================
   4. Glass Card (Search Box)
   ============================================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
}

/* ============================================================
   5. Card System
   ============================================================ */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

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

.card-elevated {
    box-shadow: var(--shadow-md);
}

.card-elevated:hover {
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   6. Search Input
   ============================================================ */

.search-input {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Dark variant for hero */
.search-input-dark {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.search-input-dark::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.search-input-dark:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   7. Button System
   ============================================================ */

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Light variant for hero */
.btn-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-hero:hover:not(:disabled) {
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
}

/* ============================================================
   8. Status Badges
   ============================================================ */

.badge-pending {
    background: var(--color-pending-bg);
    color: var(--color-pending);
    font-weight: 600;
}

.badge-disposed {
    background: var(--color-disposed-bg);
    color: var(--color-disposed);
    font-weight: 600;
}

/* ============================================================
   9. Loading Spinner
   ============================================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Light spinner for dark backgrounds */
.spinner-light {
    border-color: rgba(255, 255, 255, 0.15);
    border-top-color: #ffffff;
}

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

/* Pulse animation for loading text */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* ============================================================
   10. Data Grid / Detail Items
   ============================================================ */

.detail-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

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

/* ============================================================
   11. Table Styles
   ============================================================ */

.data-table {
    width: 100%;
    font-size: 0.875rem;
}

.data-table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    padding: 0.625rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--color-text-secondary);
}

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

.data-table tbody tr:hover {
    background: var(--color-surface-muted);
}

/* ============================================================
   12. Section Headers
   ============================================================ */

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

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ============================================================
   13. Navigation
   ============================================================ */

.nav-bar {
    background: var(--color-surface);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.nav-logo {
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--color-navy-900);
    letter-spacing: -0.025em;
    text-decoration: none;
}

.nav-logo-dot {
    color: #3b82f6;
    font-weight: 900;
}

/* Transparent nav for pages with hero */
.nav-transparent {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.nav-transparent .nav-logo {
    color: #ffffff;
}

.nav-transparent .nav-logo-dot {
    color: #60a5fa;
}

/* ============================================================
   14. Footer
   ============================================================ */

.site-footer {
    background: var(--color-navy-950);
    color: var(--color-text-on-dark-muted);
    margin-top: 0;
}

.footer-link {
    color: var(--color-text-on-dark-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: #e2e8f0;
}

/* ============================================================
   15. Link Cards (HC navigation)
   ============================================================ */

.link-card {
    display: block;
    text-decoration: none;
    background: var(--color-surface);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.link-card:hover {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ============================================================
   16. FAQ Accordion
   ============================================================ */

.faq-item {
    border-bottom: 1px solid #f1f5f9;
}

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

.faq-question {
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    color: var(--color-text-secondary);
    padding-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* ============================================================
   17. Responsive Utilities
   ============================================================ */

/* Ensure minimum touch target size on mobile */
@media (max-width: 640px) {
    .touch-target {
        min-height: 48px;
    }
}

/* Smooth fade-in for Vue components */
[v-cloak] {
    display: none;
}

/* ============================================================
   18. Breadcrumb
   ============================================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb-separator {
    color: #cbd5e1;
}

/* ============================================================
   19. Error State
   ============================================================ */

.error-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.error-card p {
    color: #991b1b;
}

/* ============================================================
   20. Print Styles
   ============================================================ */

@media print {
    .hero-gradient,
    .nav-bar,
    .nav-transparent,
    .site-footer {
        background: white !important;
        color: black !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
