/* NamiFlow-Comply Custom Styles - Material Design 3 */

/* ===== MD3 Design Tokens ===== */
:root {
    /* Primary Colors - Blue Theme for Business/Trust */
    --md-sys-color-primary: #1565C0;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #D1E4FF;
    --md-sys-color-on-primary-container: #001D36;

    /* Secondary Colors */
    --md-sys-color-secondary: #535F70;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #D7E3F7;
    --md-sys-color-on-secondary-container: #101C2B;

    /* Tertiary Colors */
    --md-sys-color-tertiary: #6B5778;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #F2DAFF;
    --md-sys-color-on-tertiary-container: #251431;

    /* Error Colors */
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;

    /* Surface Colors */
    --md-sys-color-surface: #FDFCFF;
    --md-sys-color-on-surface: #1A1C1E;
    --md-sys-color-surface-variant: #DFE2EB;
    --md-sys-color-on-surface-variant: #43474E;
    --md-sys-color-outline: #73777F;
    --md-sys-color-outline-variant: #C3C7CF;
    --md-sys-color-surface-container: #EFEDF1;
    --md-sys-color-surface-container-high: #E9E7EB;
    --md-sys-color-surface-container-low: #F5F3F7;

    /* Success Color */
    --md-sys-color-success: #2E7D32;
    --md-sys-color-on-success: #FFFFFF;
    --md-sys-color-success-container: #C8E6C9;

    /* Warning Color */
    --md-sys-color-warning: #ED6C02;
    --md-sys-color-on-warning: #FFFFFF;
    --md-sys-color-warning-container: #FFE0B2;

    /* Spacing */
    --md-sys-spacing-xs: 4px;
    --md-sys-spacing-sm: 8px;
    --md-sys-spacing-md: 16px;
    --md-sys-spacing-lg: 24px;
    --md-sys-spacing-xl: 32px;
    --md-sys-spacing-xxl: 48px;

    /* Shape */
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;

    /* Motion */
    --md-sys-motion-duration-short: 200ms;
    --md-sys-motion-duration-medium: 300ms;
    --md-sys-motion-easing-standard: cubic-bezier(0.2, 0.0, 0, 1.0);
    --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0.0, 0, 1.0);

    /* Elevation */
    --md-sys-elevation-level1: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-level2: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-level3: 0px 1px 3px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-level4: 0px 2px 3px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);

    /* Legacy Variables (for compatibility) */
    --color-primary: var(--md-sys-color-primary);
    --color-success: var(--md-sys-color-success);
    --color-warning: var(--md-sys-color-warning);
    --color-danger: var(--md-sys-color-error);
    --border-radius: var(--md-sys-shape-corner-medium);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== Public Layout Structure ===== */
.public-layout {
    min-height: 100vh;
}

.public-top-bar {
    padding: 8px 16px;
}

.public-main {
    overflow-x: hidden;
}

.header-spacer {
    flex-grow: 1;
}

.desktop-nav__cta {
    margin-left: 8px;
}

.public-footer--flush {
    margin-top: 0;
}

/* ===== Header Responsive Styles ===== */
/* Mobile: show hamburger, hide desktop nav */
.mobile-menu-btn {
    display: flex;
}

.desktop-nav {
    display: none;
}

/* Desktop (768px+): hide hamburger, show desktop nav */
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }

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

/* Mobile drawer styling */
mdui-navigation-drawer mdui-list-item {
    --mdui-color-primary: var(--md-sys-color-primary);
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.header-logo img {
    height: 36px;
    width: auto;
}

.header-logo__text {
    font-size: 18px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.header-logo__product {
    font-size: 18px;
    font-weight: 600;
    color: var(--md-sys-color-primary);
}

/* Navigation Links */
.nav-link {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background-color: var(--md-sys-color-surface-container);
}

/* Desktop nav with proper spacing */
@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .desktop-nav .btn-primary {
        margin-left: 8px;
    }
}

/* ===== Typography Classes ===== */
.md-display-large { font-size: 57px; line-height: 64px; font-weight: 400; letter-spacing: -0.25px; }
.md-display-medium { font-size: 45px; line-height: 52px; font-weight: 400; }
.md-display-small { font-size: 36px; line-height: 44px; font-weight: 400; }

.md-headline-large { font-size: 32px; line-height: 40px; font-weight: 400; }
.md-headline-medium { font-size: 28px; line-height: 36px; font-weight: 400; }
.md-headline-small { font-size: 24px; line-height: 32px; font-weight: 400; }

.md-title-large { font-size: 22px; line-height: 28px; font-weight: 400; }
.md-title-medium { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.15px; }
.md-title-small { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }

.md-body-large { font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 0.5px; }
.md-body-medium { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0.25px; }
.md-body-small { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0.4px; }

.md-label-large { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }
.md-label-medium { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px; }
.md-label-small { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px; }

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--md-sys-spacing-lg);
}

.app-main {
    min-height: calc(100vh - 64px - 60px);
    padding-bottom: var(--md-sys-spacing-xl);
}

/* ===== Page Typography ===== */
.page-title {
    font-size: 28px;
    line-height: 36px;
    font-weight: 400;
    margin-bottom: var(--md-sys-spacing-lg);
    color: var(--md-sys-color-on-surface);
}

.section-title {
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    margin-bottom: var(--md-sys-spacing-md);
    color: var(--md-sys-color-on-surface);
}

/* ===== MD3 Card Component ===== */
.md-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--md-sys-spacing-lg);
    margin-bottom: var(--md-sys-spacing-md);
    box-shadow: var(--md-sys-elevation-level1);
    transition: box-shadow var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

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

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

.md-card--filled {
    background: var(--md-sys-color-surface-container-high);
    box-shadow: none;
}

.md-card--outlined {
    background: var(--md-sys-color-surface);
    box-shadow: none;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--md-sys-spacing-lg);
    margin-bottom: var(--md-sys-spacing-md);
    box-shadow: var(--md-sys-elevation-level1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md-sys-spacing-md);
}

.card-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}

/* ===== MD3 Button Styles (for custom buttons) ===== */
.md-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    border: none;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.2, 0.0, 0, 1.0);
    text-decoration: none;
}

.md-button--filled {
    background-color: #1565C0 !important;
    color: #FFFFFF !important;
}

.md-button--filled:hover {
    background-color: #1976D2 !important;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
}

.md-button--outlined {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.md-button--outlined:hover {
    background: rgba(21, 101, 192, 0.08);
}

.md-button--text {
    background: transparent;
    color: var(--md-sys-color-primary);
}

.md-button--text:hover {
    background: rgba(21, 101, 192, 0.08);
}

.md-button--tonal {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

/* ===== Usage Bar ===== */
.usage-bar {
    background: var(--md-sys-color-surface-container);
    padding: var(--md-sys-spacing-md);
    border-radius: var(--md-sys-shape-corner-medium);
    margin-bottom: var(--md-sys-spacing-lg);
}

.usage-bar__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md-sys-spacing-sm);
}

.usage-bar__plan {
    font-weight: 500;
    color: var(--md-sys-color-primary);
}

.usage-bar__count {
    color: var(--md-sys-color-on-surface-variant);
}

.usage-bar__alert {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-sm);
    margin-top: var(--md-sys-spacing-sm);
    color: var(--md-sys-color-error);
    font-size: 12px;
}

.usage-bar__alert--warning {
    color: var(--md-sys-color-warning);
}

/* ===== Status Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-success);
}

.badge-warning {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-warning);
}

.badge-danger {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
}

.badge-primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* Page Header */
.page-header__description {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Usage Bar Modifiers */
.usage-bar--warning {
    border-left: 4px solid var(--md-sys-color-warning);
}
.usage-bar--danger {
    border-left: 4px solid var(--md-sys-color-error);
}
.progress-warning {
    --mdui-color-primary: var(--md-sys-color-warning);
}
.progress-danger {
    --mdui-color-primary: var(--md-sys-color-error);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--md-sys-spacing-lg);
}
@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Card sub-elements (BEM double-underscore) */
.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--md-sys-spacing-md);
}
.card__title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}
.card__content {
    color: var(--md-sys-color-on-surface-variant);
}

.badge-secondary {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

.badge-info {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--md-sys-spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.data-table th {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-container);
}

.data-table tr:hover {
    background: var(--md-sys-color-surface-container-low);
}

.data-table__actions {
    display: flex;
    gap: var(--md-sys-spacing-xs);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--md-sys-spacing-lg);
}

.form-row {
    display: flex;
    gap: var(--md-sys-spacing-md);
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    gap: var(--md-sys-spacing-md);
    justify-content: flex-end;
    margin-top: var(--md-sys-spacing-lg);
}

.form-error {
    color: var(--md-sys-color-error);
    font-size: 12px;
    margin-top: var(--md-sys-spacing-xs);
}

/* ===== Search Box ===== */
.search-box {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--md-sys-spacing-lg);
    margin-bottom: var(--md-sys-spacing-lg);
    box-shadow: var(--md-sys-elevation-level1);
}

.search-tabs {
    margin-bottom: var(--md-sys-spacing-lg);
}

/* ===== Results ===== */
.result-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    margin-bottom: var(--md-sys-spacing-md);
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-level1);
}

.result-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--md-sys-spacing-md) var(--md-sys-spacing-lg);
    background: var(--md-sys-color-surface-container);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.result-card__title {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-sm);
}

.result-card__body {
    padding: var(--md-sys-spacing-lg);
}

.result-card--ok .result-card__header {
    border-left: 4px solid var(--md-sys-color-success);
}

.result-card--caution .result-card__header {
    border-left: 4px solid var(--md-sys-color-warning);
}

.result-card--warning .result-card__header {
    border-left: 4px solid var(--md-sys-color-error);
}

/* ===== Penalty/News Items ===== */
.penalty-item,
.news-item {
    padding: var(--md-sys-spacing-md);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.penalty-item:last-child,
.news-item:last-child {
    border-bottom: none;
}

.penalty-item__header,
.news-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--md-sys-spacing-sm);
}

.penalty-item__title,
.news-item__title {
    font-size: 14px;
    font-weight: 500;
}

.penalty-item__meta,
.news-item__meta {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.news-item__credibility {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-xs);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--md-sys-spacing-xxl);
    color: var(--md-sys-color-on-surface-variant);
}

.empty-state__icon {
    font-size: 48px;
    margin-bottom: var(--md-sys-spacing-md);
    opacity: 0.5;
}

.empty-state__title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: var(--md-sys-spacing-sm);
}

.empty-state__description {
    font-size: 14px;
    margin-bottom: var(--md-sys-spacing-lg);
}

/* ===== Footer ===== */
.public-footer {
    background: var(--md-sys-color-surface-container);
    padding: var(--md-sys-spacing-xxl) var(--md-sys-spacing-lg);
    margin-top: var(--md-sys-spacing-xxl);
}

.app-footer {
    background: var(--md-sys-color-surface-container);
    padding: var(--md-sys-spacing-md) var(--md-sys-spacing-lg);
    text-align: center;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--md-sys-spacing-lg);
    margin-bottom: var(--md-sys-spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.footer-links a:hover {
    color: var(--md-sys-color-primary);
}

.footer-disclaimer {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: var(--md-sys-spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-copyright {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

/* ===== Loading Indicator ===== */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--md-sys-spacing-md);
    padding: var(--md-sys-spacing-xxl);
    color: var(--md-sys-color-on-surface-variant);
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: flex;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--md-sys-spacing-sm);
    margin-top: var(--md-sys-spacing-lg);
}

.pagination__info {
    padding: 0 var(--md-sys-spacing-md);
    color: var(--md-sys-color-on-surface-variant);
}


/* ============================================================
   LANDING PAGE STYLES
   ============================================================ */

/* ===== Scroll-triggered Fade-in Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation: elements are visible by default (safe fallback).
   JS adds .js-animate-ready to <html>, enabling the hide-then-reveal pattern. */
.js-animate-ready .animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--md-sys-motion-easing-emphasized),
                transform 0.6s var(--md-sys-motion-easing-emphasized);
}

.js-animate-ready .animate-on-scroll.is-visible,
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside an animated container */
.animate-stagger .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.animate-stagger .animate-on-scroll:nth-child(2) { transition-delay: 80ms; }
.animate-stagger .animate-on-scroll:nth-child(3) { transition-delay: 160ms; }
.animate-stagger .animate-on-scroll:nth-child(4) { transition-delay: 240ms; }
.animate-stagger .animate-on-scroll:nth-child(5) { transition-delay: 320ms; }
.animate-stagger .animate-on-scroll:nth-child(6) { transition-delay: 400ms; }
.animate-stagger .animate-on-scroll:nth-child(7) { transition-delay: 480ms; }
.animate-stagger .animate-on-scroll:nth-child(8) { transition-delay: 560ms; }

/* ===== Landing Page - Section Heading ===== */
.section-heading {
    text-align: center;
    margin-bottom: var(--md-sys-spacing-xl);
    font-size: 28px;
    line-height: 36px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

/* ===== Landing Page - Hero Section ===== */
.hero {
    text-align: center;
    padding: 72px var(--md-sys-spacing-lg) 80px;
    background: linear-gradient(160deg, #1976D2 0%, #1565C0 30%, #0D47A1 70%, #0A3A7E 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 100%, rgba(255,255,255,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 0%, rgba(255,255,255,0.05) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s var(--md-sys-motion-easing-emphasized) both;
}

.hero__title {
    font-size: 48px;
    line-height: 58px;
    font-weight: 700;
    margin-bottom: var(--md-sys-spacing-lg);
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: -0.5px;
}

.hero__subtitle {
    font-size: 18px;
    line-height: 30px;
    opacity: 0.92;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: var(--md-sys-spacing-md);
    flex-wrap: wrap;
}

.hero__actions mdui-button {
    min-width: 160px;
}

/* ===== Landing Page - Features Section ===== */
.features {
    padding: 64px var(--md-sys-spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.features--alt {
    background: var(--md-sys-color-surface-container);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--md-sys-spacing-lg);
}

.feature-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    padding: var(--md-sys-spacing-xl) var(--md-sys-spacing-lg);
    text-align: center;
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                box-shadow var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                border-color var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--md-sys-elevation-level3);
    border-color: var(--md-sys-color-primary);
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--md-sys-shape-corner-large);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--md-sys-spacing-md);
    font-size: 28px;
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                background-color var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.1);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.feature-card__title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    margin-bottom: var(--md-sys-spacing-sm);
    color: var(--md-sys-color-on-surface);
}

.feature-card__description {
    font-size: 14px;
    line-height: 22px;
    color: var(--md-sys-color-on-surface-variant);
}

/* ===== Landing Page - Data Sources Section ===== */
section.data-sources {
    padding: 64px var(--md-sys-spacing-lg);
    background: var(--md-sys-color-surface-container-low);
}

.data-sources__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--md-sys-spacing-md);
    max-width: 1100px;
    margin: 0 auto;
}

.data-source-chip {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-sm);
    padding: 12px 20px;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-full);
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    flex: 0 0 auto;
}

.data-source-chip:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-level1);
}

.data-source-chip__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.data-source-chip:hover .data-source-chip__icon {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.data-source-chip__text {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
}

/* ===== Landing Page - Important Notice (Collapsible Disclaimer) ===== */
.notice-section {
    padding: 40px var(--md-sys-spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.notice-accordion {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    border: 1px solid var(--md-sys-color-outline-variant);
    overflow: hidden;
}

.notice-accordion__trigger {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-md);
    padding: var(--md-sys-spacing-md) var(--md-sys-spacing-lg);
    cursor: pointer;
    background: var(--md-sys-color-surface-container-low);
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.notice-accordion__trigger:hover {
    background: var(--md-sys-color-surface-container);
}

.notice-accordion__trigger:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: -2px;
}

.notice-accordion__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notice-accordion__title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    line-height: 1.4;
}

.notice-accordion__subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 2px;
}

.notice-accordion__chevron {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 24px;
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    flex-shrink: 0;
}

.notice-accordion[open] .notice-accordion__chevron {
    transform: rotate(180deg);
}

.notice-accordion__body {
    padding: var(--md-sys-spacing-lg);
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.notice-accordion__intro {
    font-size: 14px;
    line-height: 1.7;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: var(--md-sys-spacing-md);
}

.notice-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
}

.notice-list li {
    margin-bottom: var(--md-sys-spacing-sm);
}

.notice-list li strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}

.notice-footer-text {
    margin-top: var(--md-sys-spacing-md);
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    padding-top: var(--md-sys-spacing-md);
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* ===== Landing Page - Pricing Section ===== */
.pricing {
    background: var(--md-sys-color-surface-container);
    padding: 64px var(--md-sys-spacing-lg);
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--md-sys-spacing-lg);
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: var(--md-sys-spacing-xl);
    text-align: center;
    box-shadow: var(--md-sys-elevation-level1);
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                box-shadow var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    border: 2px solid transparent;
    position: relative;
}

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

.pricing-card--popular {
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-level3);
    transform: scale(1.04);
    background: linear-gradient(180deg, #EBF2FF 0%, var(--md-sys-color-surface) 20%);
    z-index: 1;
}

.pricing-card--popular:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: var(--md-sys-elevation-level4);
}

.pricing-card__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 6px 20px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

.pricing-card__name {
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    margin-bottom: var(--md-sys-spacing-sm);
    color: var(--md-sys-color-on-surface);
}

.pricing-card__price {
    font-size: 40px;
    line-height: 48px;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin-bottom: var(--md-sys-spacing-md);
}

.pricing-card__price small {
    font-size: 14px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface-variant);
}

.pricing-card__features {
    text-align: left;
    margin-bottom: var(--md-sys-spacing-lg);
    list-style: none;
    padding: var(--md-sys-spacing-md) 0;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.pricing-card__features li {
    padding: var(--md-sys-spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-sm);
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
}

.pricing-card__features li mdui-icon,
.pricing-card__features li .material-icons {
    color: var(--md-sys-color-success);
    font-size: 20px;
}

/* ===== Landing Page - FAQ Section ===== */
.faq-section {
    padding: 64px var(--md-sys-spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.faq-section mdui-collapse {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-level1);
}

.faq-section mdui-collapse-item {
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

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

.faq-answer {
    padding: var(--md-sys-spacing-md) var(--md-sys-spacing-lg);
}

.faq-answer p {
    color: var(--md-sys-color-on-surface-variant);
}

.faq-more {
    text-align: center;
    margin-top: var(--md-sys-spacing-lg);
}

/* ===== Landing Page - CTA Section ===== */
.cta-section {
    text-align: center;
    padding: 72px var(--md-sys-spacing-lg);
    background: linear-gradient(160deg, #1976D2 0%, #1565C0 30%, #0D47A1 70%, #0A3A7E 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section__content {
    position: relative;
    z-index: 1;
}

.cta-section__title {
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
    margin-bottom: var(--md-sys-spacing-md);
}

.cta-section__subtitle {
    font-size: 16px;
    line-height: 24px;
    opacity: 0.9;
    margin-bottom: var(--md-sys-spacing-xl);
    font-weight: 300;
}

/* ===== Auth Pages ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: var(--md-sys-spacing-lg);
}

.auth-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: var(--md-sys-spacing-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--md-sys-elevation-level2);
}

.auth-card__title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--md-sys-spacing-lg);
}

.auth-card__links {
    text-align: center;
    margin-top: var(--md-sys-spacing-lg);
    font-size: 14px;
}

.auth-card__links a {
    color: var(--md-sys-color-primary);
}

/* ===== Table Wrapper for Mobile Scroll ===== */
.table-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper::after {
    content: '\2192 \30B9\30AF\30ED\30FC\30EB\3067\304D\307E\3059';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to left, rgba(255,255,255,0.95) 70%, transparent);
    padding: 8px 16px 8px 32px;
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .table-wrapper::after {
        opacity: 1;
    }

    .table-wrapper.scrolled::after {
        opacity: 0;
    }
}


/* ============================================================
   DEMO PAGE STYLES
   ============================================================ */

.demo-intro {
    margin-bottom: var(--md-sys-spacing-lg);
    color: var(--md-sys-color-on-surface-variant);
}

.demo-card {
    cursor: pointer;
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                box-shadow var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                border-color var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    border: 1px solid transparent;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-level3);
    border-color: var(--md-sys-color-primary);
}

.demo-card:active {
    transform: translateY(-2px);
}

.demo-card__header {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-md);
    margin-bottom: var(--md-sys-spacing-md);
}

.demo-card__icon {
    font-size: 48px;
    flex-shrink: 0;
}

.demo-card__icon--success {
    color: var(--md-sys-color-success);
}

.demo-card__icon--warning {
    color: var(--md-sys-color-warning);
}

.demo-card__header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.demo-card__header-text p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
}

.demo-card__description {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

.demo-cards-grid {
    margin-bottom: var(--md-sys-spacing-xl);
}

.demo-result-area {
    display: none;
}

.demo-result-area.is-active {
    display: block;
    animation: fadeInUp 0.4s var(--md-sys-motion-easing-emphasized) both;
}

.demo-result-content {
    display: none;
}

.demo-result-content.is-active {
    display: block;
}

.demo-empty-state {
    padding: var(--md-sys-spacing-md);
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
}

.demo-empty-state mdui-icon {
    font-size: 32px;
    color: var(--md-sys-color-success);
}

.demo-penalty-detail,
.demo-news-detail {
    margin-top: var(--md-sys-spacing-sm);
    font-size: 14px;
    line-height: 1.6;
}

.demo-badge-inline {
    margin-left: var(--md-sys-spacing-sm);
}

.demo-cta {
    text-align: center;
    margin-top: var(--md-sys-spacing-xl);
}

.demo-table-header {
    width: 150px;
}


/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: var(--md-sys-spacing-md);
    }

    .page-title {
        font-size: 24px;
        line-height: 32px;
    }

    /* Hero mobile */
    .hero {
        padding: 48px var(--md-sys-spacing-md) 56px;
    }

    .hero__title {
        font-size: 32px;
        line-height: 40px;
    }

    .hero__subtitle {
        font-size: 15px;
        line-height: 24px;
    }

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

    .hero__actions mdui-button,
    .hero__actions .btn-primary-light,
    .hero__actions .btn-ghost-light {
        width: 100%;
        max-width: 280px;
    }

    /* Features mobile */
    .features {
        padding: 40px var(--md-sys-spacing-md);
    }

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

    /* Data sources mobile */
    section.data-sources {
        padding: 40px var(--md-sys-spacing-md);
    }

    .data-sources__grid {
        gap: var(--md-sys-spacing-sm);
    }

    .data-source-chip {
        padding: 10px 16px;
    }

    /* Pricing mobile */
    .pricing {
        padding: 40px var(--md-sys-spacing-md);
    }

    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

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

    .pricing-card--popular:hover {
        transform: translateY(-4px);
    }

    /* Notice mobile */
    .notice-section {
        padding: var(--md-sys-spacing-lg) var(--md-sys-spacing-md);
    }

    .notice-accordion__trigger {
        padding: var(--md-sys-spacing-md);
    }

    .notice-accordion__body {
        padding: var(--md-sys-spacing-md);
    }

    /* FAQ mobile */
    .faq-section {
        padding: 40px var(--md-sys-spacing-md);
    }

    /* CTA mobile */
    .cta-section {
        padding: 48px var(--md-sys-spacing-md);
    }

    .cta-section__title {
        font-size: 24px;
        line-height: 32px;
    }

    /* Section heading mobile */
    .section-heading {
        font-size: 24px;
        line-height: 32px;
    }

    /* Form mobile */
    .form-row {
        flex-direction: column;
    }

    .form-row > * {
        min-width: 100%;
    }

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

    .form-actions mdui-button {
        width: 100%;
    }

    /* Table mobile */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        white-space: nowrap;
        padding: var(--md-sys-spacing-sm);
    }

    /* Card mobile */
    .card {
        padding: var(--md-sys-spacing-md);
    }

    /* Stack cards on mobile */
    .result-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--md-sys-spacing-sm);
    }

    /* Better empty state on mobile */
    .empty-state {
        padding: var(--md-sys-spacing-lg);
    }

    .empty-state__icon {
        font-size: 36px;
    }

    /* Footer stacking */
    .footer-links {
        flex-direction: column;
        gap: var(--md-sys-spacing-sm);
    }

    /* Demo page mobile */
    .demo-card__header {
        gap: var(--md-sys-spacing-sm);
    }

    .demo-card__icon {
        font-size: 36px;
    }

    .demo-table-header {
        width: 120px;
    }
}

/* ===== Tablet breakpoint (481px-767px) ===== */
@media (min-width: 481px) and (max-width: 767px) {
    .features__grid {
        grid-template-columns: 1fr 1fr;
    }

    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .data-sources__grid {
        gap: var(--md-sys-spacing-sm);
    }
}

/* ===== Small mobile (320px-480px) ===== */
@media (max-width: 480px) {
    .hero__title {
        font-size: 28px;
        line-height: 36px;
    }

    .hero__subtitle {
        font-size: 14px;
        line-height: 22px;
    }

    .data-source-chip {
        min-width: calc(50% - 8px);
        flex: 1 1 calc(50% - 8px);
    }

    .data-source-chip__text {
        font-size: 12px;
    }

    .data-source-chip__icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .pricing-card__price {
        font-size: 32px;
    }

    .notice-accordion__title {
        font-size: 14px;
    }

    .notice-accordion__subtitle {
        font-size: 12px;
    }

    .notice-accordion__icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}


/* ============================================================
   SHARED / UTILITY STYLES
   ============================================================ */

/* ===== Snackbar Colors ===== */
.snackbar-error {
    --mdui-color-inverse-surface: var(--md-sys-color-error);
}

.snackbar-success {
    --mdui-color-inverse-surface: var(--md-sys-color-success);
}

.snackbar-warning {
    --mdui-color-inverse-surface: var(--md-sys-color-warning);
}

/* ===== MDUI Overrides for MD3 Consistency ===== */
/* MDUI uses RGB format without rgb() wrapper: "21,101,192" instead of "#1565C0" */
:root {
    --mdui-color-primary: 21,101,192;  /* #1565C0 in RGB */
    --mdui-color-on-primary: 255,255,255;
}

mdui-button[variant="outlined"] {
    --mdui-color-primary: 21,101,192;
}

/* ===== Custom Button Styles (Fallback for MDUI issues) ===== */
/* Primary filled button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.btn-primary:hover {
    background-color: #1976D2;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

.btn-primary:active {
    background-color: #1565C0;
}

.btn-primary:focus-visible {
    outline: 3px solid rgba(21, 101, 192, 0.5);
    outline-offset: 2px;
}

/* Secondary/outlined button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.btn-secondary:hover {
    background-color: rgba(21, 101, 192, 0.08);
}

.btn-secondary:focus-visible {
    outline: 3px solid rgba(21, 101, 192, 0.5);
    outline-offset: 2px;
}

/* Full width button */
.btn-full-width {
    width: 100%;
}

/* Button on dark background (hero section) */
.btn-primary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: white;
    color: var(--md-sys-color-primary);
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary-light:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-primary-light:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.btn-ghost-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-ghost-light:hover {
    background-color: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-ghost-light:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Auth page buttons */
.auth-card mdui-button[variant="filled"],
.auth-card .btn-primary {
    display: block;
    margin-top: var(--md-sys-spacing-lg);
    width: 100%;
}

mdui-text-field {
    --mdui-color-primary: var(--md-sys-color-primary);
}

mdui-linear-progress {
    --mdui-color-primary: var(--md-sys-color-primary);
}

/* ===== Skeleton Loading Animation ===== */
@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--md-sys-color-surface-container) 0%,
        var(--md-sys-color-surface-container-high) 50%,
        var(--md-sys-color-surface-container) 100%
    );
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: var(--md-sys-shape-corner-small);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--md-sys-spacing-sm);
}

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

.skeleton-text--medium {
    width: 80%;
}

.skeleton-title {
    height: 1.5rem;
    width: 50%;
    margin-bottom: var(--md-sys-spacing-md);
}

.skeleton-badge {
    height: 24px;
    width: 80px;
    border-radius: var(--md-sys-shape-corner-full);
}

.skeleton-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--md-sys-spacing-lg);
    margin-bottom: var(--md-sys-spacing-md);
    box-shadow: var(--md-sys-elevation-level1);
}

.skeleton-table-row {
    display: flex;
    gap: var(--md-sys-spacing-md);
    padding: var(--md-sys-spacing-md);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.skeleton-table-cell {
    flex: 1;
    height: 1rem;
}

/* ===== Enhanced Card Hover Effects ===== */
.card {
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard),
                box-shadow var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-level2);
}

.card--clickable {
    cursor: pointer;
}

.card--clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-level2);
}

.card--clickable:active {
    transform: translateY(0);
    box-shadow: var(--md-sys-elevation-level1);
}

/* ===== Quick Action Cards ===== */
.quick-action {
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-md);
    padding: var(--md-sys-spacing-lg);
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    box-shadow: var(--md-sys-elevation-level1);
    text-decoration: none;
    color: inherit;
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    border: 1px solid transparent;
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-level2);
    border-color: var(--md-sys-color-primary);
}

.quick-action:active {
    transform: translateY(0);
}

.quick-action__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.quick-action__icon--primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.quick-action__icon--secondary {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.quick-action__icon--tertiary {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

.quick-action__content {
    flex: 1;
    min-width: 0;
}

.quick-action__title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--md-sys-color-on-surface);
}

.quick-action__description {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action__arrow {
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.quick-action:hover .quick-action__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Stats Card ===== */
.stat-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: var(--md-sys-spacing-lg);
    box-shadow: var(--md-sys-elevation-level1);
    display: flex;
    align-items: center;
    gap: var(--md-sys-spacing-md);
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card__icon--primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.stat-card__icon--success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-success);
}

.stat-card__icon--warning {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-warning);
}

.stat-card__icon--error {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
}

.stat-card__content {
    flex: 1;
}

.stat-card__value {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--md-sys-color-on-surface);
}

.stat-card__label {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

/* ===== Button Ripple Effect ===== */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.ripple-effect:active::after {
    width: 200px;
    height: 200px;
}

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

.card:focus-within {
    box-shadow: var(--md-sys-elevation-level2), 0 0 0 2px var(--md-sys-color-primary);
}

/* ===== Table Row Hover Animation ===== */
.data-table tbody tr {
    transition: background-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

.data-table tbody tr:hover {
    background: var(--md-sys-color-surface-container-low);
}

/* ===== Improved Badge Styles ===== */
.badge {
    transition: transform var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}

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

/* Badge with icon */
.badge--with-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge--with-icon mdui-icon {
    font-size: 14px;
}

/* ===== Page Header Improvements ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--md-sys-spacing-lg);
    flex-wrap: wrap;
    gap: var(--md-sys-spacing-md);
}

.page-header__title {
    font-size: 28px;
    line-height: 36px;
    font-weight: 400;
    margin: 0;
    color: var(--md-sys-color-on-surface);
}

.page-header__actions {
    display: flex;
    gap: var(--md-sys-spacing-sm);
    flex-wrap: wrap;
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    gap: var(--md-sys-spacing-md);
    align-items: flex-end;
    flex-wrap: wrap;
    padding: var(--md-sys-spacing-md);
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    box-shadow: var(--md-sys-elevation-level1);
    margin-bottom: var(--md-sys-spacing-lg);
}

.filter-bar__field {
    flex: 1;
    min-width: 150px;
}

.filter-bar__actions {
    display: flex;
    gap: var(--md-sys-spacing-sm);
}

/* ===== Improved Alert Cards ===== */
.alert-card {
    display: flex;
    gap: var(--md-sys-spacing-md);
    padding: var(--md-sys-spacing-md);
    border-radius: var(--md-sys-shape-corner-medium);
    margin-bottom: var(--md-sys-spacing-md);
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.alert-card--info {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.alert-card--success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-success);
}

.alert-card--warning {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-warning);
}

.alert-card--error {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
}

/* ===== Tooltip Enhancement ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    font-size: 12px;
    border-radius: var(--md-sys-shape-corner-small);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== Mobile Improvements ===== */
@media (max-width: 768px) {
    /* Larger touch targets */
    .quick-action {
        padding: var(--md-sys-spacing-md);
    }

    .quick-action__icon {
        width: 40px;
        height: 40px;
    }

    /* Better page header on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions mdui-button {
        flex: 1;
    }

    /* Filter bar stacking */
    .filter-bar {
        flex-direction: column;
    }

    .filter-bar__field {
        width: 100%;
    }

    .filter-bar__actions {
        width: 100%;
    }

    .filter-bar__actions mdui-button {
        flex: 1;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Quick actions grid */
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Stats Grid Layout ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--md-sys-spacing-md);
    margin-bottom: var(--md-sys-spacing-lg);
}

/* ===== Quick Actions Grid Layout ===== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--md-sys-spacing-md);
    margin-bottom: var(--md-sys-spacing-lg);
}

/* ===== Fade In Animation ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

/* Staggered fade in */
.stagger-fade-in > * {
    opacity: 0;
    animation: fadeIn var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard) forwards;
}

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

/* ===== Screen Reader Only ===== */
.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;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ===== High Contrast Mode Support ===== */
@media (prefers-contrast: high) {
    .badge {
        border: 2px solid currentColor;
    }

    .card {
        border: 1px solid var(--md-sys-color-outline);
    }

    .data-table th,
    .data-table td {
        border: 1px solid var(--md-sys-color-outline);
    }
}

/* ===== Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .skeleton {
        animation: none;
        background: var(--md-sys-color-surface-container);
    }

    .stagger-fade-in > * {
        animation: none;
        opacity: 1;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ===== Keyboard Navigation Indicators ===== */
.card:focus-visible,
.quick-action:focus-visible,
.stat-card:focus-visible {
    outline: 3px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* ===== Button Loading State ===== */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===== Progress Indicator ===== */
.progress-bar {
    height: 4px;
    background: var(--md-sys-color-surface-container);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--md-sys-color-primary);
    transition: width var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.progress-bar--success .progress-bar__fill {
    background: var(--md-sys-color-success);
}

.progress-bar--warning .progress-bar__fill {
    background: var(--md-sys-color-warning);
}

.progress-bar--error .progress-bar__fill {
    background: var(--md-sys-color-error);
}

/* ============================================================
   CONVERSION OPTIMIZATION - Behavioral Psychology Elements
   ============================================================ */

/* ===== Social Proof Section ===== */
.social-proof {
    padding: 48px 24px;
    text-align: center;
}
.social-proof__stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}
.social-proof__stat {
    min-width: 160px;
}
.social-proof__number {
    font-size: 48px;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    line-height: 1.2;
}
.social-proof__number small {
    font-size: 24px;
    font-weight: 400;
}
.social-proof__label {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 8px;
}

/* ===== Why Needed Section ===== */
.why-needed {
    padding: 48px 24px;
}
.why-needed__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--md-sys-spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}
.why-needed__card {
    padding: var(--md-sys-spacing-lg);
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    border: 1px solid var(--md-sys-color-outline-variant);
}
.why-needed__card mdui-icon {
    font-size: 32px;
    color: var(--md-sys-color-primary);
    margin-bottom: var(--md-sys-spacing-sm);
}
.why-needed__card h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--md-sys-color-on-surface);
}
.why-needed__card p {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin: 0;
}

/* ===== Pricing Daily Cost ===== */
.pricing-card__daily {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

/* ===== Usage Bar Info State ===== */
.usage-bar__alert--info {
    color: var(--md-sys-color-primary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.usage-bar__alert--info mdui-icon {
    font-size: 16px;
}

/* ===== Responsive: Social Proof ===== */
@media (max-width: 600px) {
    .social-proof__stats {
        gap: 24px;
    }
    .social-proof__number {
        font-size: 36px;
    }
}
