/* ==========================================================================
   経費スッキリ (Keihi Sukkiri) Curated Design System
   Bright Theme Default (Safety Blue & Success Green) with Dark Mode Toggle
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Base Setup
   -------------------------------------------------------------------------- */
:root {
    /* Bright Theme Constants (Safety B2B Focus) */
    --bg-base: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-header: rgba(255, 255, 255, 0.9);
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(37, 99, 235, 0.3);
    
    --color-text-main: #0f172a;
    --color-text-sub: #475569;
    --color-text-light: #64748b;
    
    --primary-blue: #2563eb;          /* Safety & Professionalism Accent */
    --primary-blue-hover: #1d4ed8;
    --primary-blue-light: rgba(37, 99, 235, 0.08);
    
    --success-green: #10b981;         /* Transactional & Success Markers */
    --success-green-hover: #059669;
    --success-green-light: rgba(16, 185, 129, 0.08);
    
    --error-red: #ef4444;
    --error-red-light: rgba(239, 68, 68, 0.08);
    
    --highlight-text-bg: linear-gradient(120deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
    
    --shadow-premium: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 20px 40px -8px rgba(37, 99, 235, 0.12);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables Override */
body.dark-theme {
    --bg-base: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-header: rgba(11, 15, 25, 0.9);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(37, 99, 235, 0.5);
    
    --color-text-main: #f3f4f6;
    --color-text-sub: #9ca3af;
    --color-text-light: #6b7280;
    
    --primary-blue: #3b82f6;
    --primary-blue-hover: #60a5fa;
    --primary-blue-light: rgba(59, 130, 246, 0.15);
    
    --success-green: #34d399;
    --success-green-hover: #6ee7b7;
    --success-green-light: rgba(52, 211, 153, 0.15);
    
    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 4px 12px -2px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 40px -8px rgba(59, 130, 246, 0.25);
    
    --highlight-text-bg: linear-gradient(120deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--color-text-main);
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    line-height: 1.6;
    transition: var(--transition-smooth);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hidden Utility class */
.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. App Header Layout
   -------------------------------------------------------------------------- */
.app-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-blue);
    line-height: 1.1;
}

.logo-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-sub);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--primary-blue);
}

.btn-nav-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-blue-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-nav-blog:hover {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
}

.theme-toggle-btn {
    background: var(--primary-blue-light);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-blue);
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   3. Main Workspace Layout & Hero
   -------------------------------------------------------------------------- */
.main-layout {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 3.5rem;
}

.hero-badge {
    display: inline-block;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.hero-section h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 1.2rem;
}

.highlight-text {
    background: var(--highlight-text-bg);
    padding: 0.1rem 0.6rem;
    border-radius: 8px;
    color: var(--primary-blue);
}

.hero-desc {
    max-width: 760px;
    margin: 0 auto;
    font-size: 0.95rem;
    color: var(--color-text-sub);
}

/* Premium Workspace Card Component */
.workspace-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    margin-bottom: 4rem;
}

/* --------------------------------------------------------------------------
   4. Files Drag-and-Drop Zone
   -------------------------------------------------------------------------- */
.drop-zone {
    border: 2px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-blue);
    background: var(--primary-blue-light);
    transform: scale(1.015);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.08);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Avoid mouse hover target issues with children */
}

.drop-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    margin-bottom: 1.2rem;
    transition: var(--transition-smooth);
}

.drop-zone:hover .drop-icon-wrapper {
    transform: translateY(-4px);
    background: var(--primary-blue);
    color: #ffffff;
}

.drop-svg {
    width: 30px;
    height: 30px;
}

.drop-zone h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.drop-sub {
    font-size: 0.9rem;
    color: var(--color-text-sub);
    margin-bottom: 0.8rem;
}

.drop-tip {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    pointer-events: auto !important;
}

/* Supported B2B Brand Badges & Logos */
.supported-stores {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

body.dark-theme .store-badge {
    background: rgba(255, 255, 255, 0.02);
}

.store-icon {
    font-size: 0.95rem;
}

.store-badge.amazon {
    color: #ff9900;
    border-color: rgba(255, 153, 0, 0.25);
    background: rgba(255, 153, 0, 0.04);
}
.store-badge.amazon:hover {
    background: #ff9900;
    color: #ffffff;
    border-color: #ff9900;
    transform: translateY(-2px);
}

.store-badge.rakuten {
    color: #bf0000;
    border-color: rgba(191, 0, 0, 0.25);
    background: rgba(191, 0, 0, 0.04);
}
.store-badge.rakuten:hover {
    background: #bf0000;
    color: #ffffff;
    border-color: #bf0000;
    transform: translateY(-2px);
}

.store-badge.monotaro {
    color: #e65c00;
    border-color: rgba(230, 92, 0, 0.25);
    background: rgba(230, 92, 0, 0.04);
}
.store-badge.monotaro:hover {
    background: #e65c00;
    color: #ffffff;
    border-color: #e65c00;
    transform: translateY(-2px);
}

.store-badge.askul {
    color: #004d99;
    border-color: rgba(0, 77, 153, 0.25);
    background: rgba(0, 77, 153, 0.04);
}
.store-badge.askul:hover {
    background: #004d99;
    color: #ffffff;
    border-color: #004d99;
    transform: translateY(-2px);
}

.drop-zone-tip {
    margin-top: 1.2rem;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--color-text-sub);
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    transition: var(--transition-smooth);
}

body.dark-theme .drop-zone-tip {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

.drop-zone-tip-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

/* File Queue Component */
.file-queue-container {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

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

.file-queue-container h4 {
    font-size: 0.95rem;
    color: var(--color-text-main);
    font-weight: 700;
}

.queue-remaining-indicator {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: var(--transition-smooth);
}

.queue-remaining-indicator.limit-reached {
    background: var(--error-red-light);
    color: var(--error-red);
    border-color: rgba(239, 68, 68, 0.15);
}

.file-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.queue-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .queue-item {
    background: rgba(255, 255, 255, 0.02);
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.queue-item-icon {
    font-size: 1.3rem;
}

.queue-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-size {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.queue-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success-green);
    background: var(--success-green-light);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
}

.queue-item-status.error {
    color: var(--error-red);
    background: var(--error-red-light);
}

/* --------------------------------------------------------------------------
   5. Local Process / Loader Spinner
   -------------------------------------------------------------------------- */
.processing-loader {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.processing-loader p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Top micro progress bar loader */
.top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--success-green) 100%);
    z-index: 1000;
    transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   6. Parsed Results Preview Table
   -------------------------------------------------------------------------- */
.results-section {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.results-title-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.results-title-group h3 {
    font-size: 1.2rem;
    font-weight: 800;
}

.badge {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.results-summary {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.summary-chip {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

body.dark-theme .summary-chip {
    background: rgba(255, 255, 255, 0.02);
}

.summary-chip .label {
    color: var(--color-text-sub);
    font-weight: 500;
}

.summary-chip .val {
    font-weight: 700;
    color: var(--color-text-main);
}

.summary-chip.highlight {
    background: var(--success-green-light);
    border-color: var(--success-green);
}

.summary-chip.highlight .val {
    color: var(--success-green);
    font-size: 0.95rem;
}

/* Ledger Preview Table component */
.grid-scroll-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.parsed-ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.parsed-ledger-table th {
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-text-sub);
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

body.dark-theme .parsed-ledger-table th {
    background: rgba(15, 23, 42, 0.4);
}

.parsed-ledger-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text-main);
    vertical-align: middle;
}

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

.parsed-ledger-table tbody tr:hover {
    background: var(--primary-blue-light);
}

/* Category column Badge select */
.ledger-cat-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-base);
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ledger-cat-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue-light);
}

/* Trash delete button */
.btn-delete-row {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.btn-delete-row:hover {
    background: var(--error-red-light);
    color: var(--error-red);
}

/* --------------------------------------------------------------------------
   7. Export Action & Paywall Alert
   -------------------------------------------------------------------------- */
.export-action-bar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

/* Premium Stripe checkout card */
.paywall-card {
    width: 100%;
    max-width: 680px;
    background: var(--primary-blue-light);
    border: 2px solid var(--primary-blue);
    padding: 1.8rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.05);
    animation: pulseGlow 2.5s infinite alternate;
}

.paywall-badge {
    display: inline-block;
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.8rem;
}

.paywall-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.paywall-card p {
    font-size: 0.85rem;
    color: var(--color-text-sub);
    margin-bottom: 1.2rem;
}

.paywall-note {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.78rem;
    text-align: left;
    color: var(--color-text-sub);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

body.dark-theme .paywall-note {
    background: rgba(0, 0, 0, 0.2);
}

.free-usage-banner {
    font-size: 0.85rem;
    color: var(--color-text-sub);
    font-weight: 500;
}

.free-usage-banner strong {
    color: var(--primary-blue);
    font-size: 1rem;
}

.export-button-group {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-paywall {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    width: 100%;
    max-width: 320px;
}

.btn-paywall:hover {
    background: var(--primary-blue-hover);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-export {
    min-width: 260px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.btn-yayoi:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-freee:hover {
    background: var(--success-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25);
}

.btn-icon {
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   8. Commercial Features Section
   -------------------------------------------------------------------------- */
.features-section {
    margin-bottom: 5rem;
}

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

.section-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 500;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.2rem 1.8rem;
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.feature-emoji {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-blue-light);
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--color-text-sub);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Static PSEO Blog Layout & Cards
   -------------------------------------------------------------------------- */
.blog-section {
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

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

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.blog-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.blog-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.88rem;
    color: var(--color-text-sub);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-cta {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
}

.blog-cta:hover {
    color: var(--primary-blue-hover);
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   10. App Footer Component
   -------------------------------------------------------------------------- */
.app-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-align: center;
    transition: var(--transition-smooth);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.trademark-disclaimer {
    font-size: 0.72rem;
    color: var(--color-text-light);
    line-height: 1.5;
    max-width: 900px;
    margin: 0.5rem auto 1rem auto;
    text-align: center;
}

/* --------------------------------------------------------------------------
   10b. PDF Export Tip notice and B2B Affiliate Banners
   -------------------------------------------------------------------------- */
.tip-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.tip-column p {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.tip-column:not(:first-child) {
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
}

.affiliate-banners-container {
    margin-top: 3.5rem;
    width: 100%;
    border-top: 1px dashed var(--border-color);
    padding-top: 2rem;
}

.affiliate-banner-header h4 {
    text-align: left;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 1.2rem;
}

.affiliate-banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.affiliate-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

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

.affiliate-card-content {
    flex: 1;
    z-index: 2;
}

.affiliate-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
}

.affiliate-card h5 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 0.4rem;
}

.affiliate-card p {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    line-height: 1.6;
    margin-bottom: 1.4rem;
}

.btn-affiliate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-affiliate:hover {
    transform: translateY(-1px);
}

.affiliate-card-icon {
    font-size: 3.5rem;
    opacity: 0.08;
    margin-left: 1rem;
    flex-shrink: 0;
    user-select: none;
    transition: var(--transition-smooth);
    transform: rotate(5deg);
}

.affiliate-card:hover .affiliate-card-icon {
    opacity: 0.2;
    transform: scale(1.15) rotate(0deg);
}

/* Rakuten Card Banner Colors */
.rakuten-card-banner {
    border-color: rgba(191, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(191, 0, 0, 0.03) 0%, rgba(191, 0, 0, 0.01) 100%);
}

body.dark-theme .rakuten-card-banner {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.01) 100%);
}

.rakuten-card-banner:hover {
    border-color: rgba(191, 0, 0, 0.4);
}

body.dark-theme .rakuten-card-banner:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.rakuten-card-banner .affiliate-tag {
    background: rgba(191, 0, 0, 0.08);
    color: #bf0000;
}

body.dark-theme .rakuten-card-banner .affiliate-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.rakuten-card-banner .btn-affiliate {
    background: #bf0000;
    color: #ffffff !important;
}

body.dark-theme .rakuten-card-banner .btn-affiliate {
    background: #ef4444;
}

.rakuten-card-banner .btn-affiliate:hover {
    background: #a00000;
}

body.dark-theme .rakuten-card-banner .btn-affiliate:hover {
    background: #dc2626;
}

/* Cloud Accounting Software Colors */
.yayoi-freee-banner {
    border-color: rgba(16, 185, 129, 0.15);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.01) 100%);
}

body.dark-theme .yayoi-freee-banner {
    border-color: rgba(52, 211, 153, 0.2);
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.05) 0%, rgba(52, 211, 153, 0.01) 100%);
}

.yayoi-freee-banner:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

body.dark-theme .yayoi-freee-banner:hover {
    border-color: rgba(52, 211, 153, 0.5);
}

.yayoi-freee-banner .affiliate-tag {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

body.dark-theme .yayoi-freee-banner .affiliate-tag {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.yayoi-freee-banner .btn-affiliate {
    background: #10b981;
    color: #ffffff !important;
}

body.dark-theme .yayoi-freee-banner .btn-affiliate {
    background: #34d399;
}

.yayoi-freee-banner .btn-affiliate:hover {
    background: #059669;
}

body.dark-theme .yayoi-freee-banner .btn-affiliate:hover {
    background: #059669;
}

/* --------------------------------------------------------------------------
   11. CSS Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 10px rgba(37, 99, 235, 0.05); }
    to { box-shadow: 0 0 25px rgba(37, 99, 235, 0.2); }
}

/* Responsive Styling limits for mobile viewports */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section h2 {
        font-size: 1.7rem;
    }
    
    .workspace-card {
        padding: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-export {
        width: 100%;
    }

    .tip-content-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .tip-column:not(:first-child) {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 1.2rem;
    }
    
    .affiliate-banners-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .affiliate-card {
        padding: 1.4rem;
    }
}

/* ==========================================================================
   12. Glassmorphic Modal & Contact Form Styles
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.4);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: var(--transition-smooth);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 2.2rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--error-red);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.4rem;
}

.modal-header p {
    font-size: 0.82rem;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.form-group .required {
    color: var(--error-red);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

body.dark-theme .form-group input, 
body.dark-theme .form-group select, 
body.dark-theme .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue-light);
}

.btn-submit-contact {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit-contact:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
}

/* Success Screen Modal states */
.modal-success-screen {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.4s ease;
}

.success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-success-screen h4 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--success-green);
    margin-bottom: 0.8rem;
}

.modal-success-screen p {
    font-size: 0.85rem;
    color: var(--color-text-sub);
    line-height: 1.6;
    margin-bottom: 1.8rem;
}

.btn-close-success {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    width: 100%;
    max-width: 200px;
}

.btn-close-success:hover {
    background: var(--primary-blue-hover);
}

/* Queue items validation statuses and delete button */
.queue-item-status.success {
    color: var(--success-green);
    background: var(--success-green-light);
}

.queue-item-status.warning, 
.queue-item-status.premium-limit {
    color: #b45309; /* warm dark amber */
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

body.dark-theme .queue-item-status.warning,
body.dark-theme .queue-item-status.premium-limit {
    color: #f59e0b; /* bright amber */
    background: rgba(245, 158, 11, 0.15);
}

.queue-item-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: var(--transition-smooth);
    margin-left: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.queue-item-delete:hover {
    background: var(--error-red-light);
    transform: scale(1.1);
}

/* Process run button styles */
.process-action-wrapper {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-process {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-hover) 100%);
    color: #ffffff;
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    width: 100%;
    max-width: 320px;
    animation: pulseGlow 2.5s infinite alternate;
}

.btn-process:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-process:active {
    transform: translateY(0) scale(1);
}

/* Reconciliation validation badges in ledger */
.reconcile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

.reconcile-badge.match-warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

body.dark-theme .reconcile-badge.match-warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.btn-row-report {
    background: transparent;
    border: none;
    color: var(--color-text-light);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: underline;
    margin-left: 0.6rem;
}

.btn-row-report:hover {
    color: var(--primary-blue);
}

/* Lockout status styles for disabled drop-zone */
.drop-zone.locked {
    pointer-events: none !important;
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.03) !important;
    cursor: not-allowed !important;
}

body.dark-theme .drop-zone.locked {
    background: rgba(245, 158, 11, 0.05) !important;
}

.drop-zone.locked .drop-icon-wrapper {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

