/* assets/css/style.css - Label Crop Senior-Level SaaS Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
    /* Brand Emerald System */
    --primary: #047857;
    --primary-hover: #065F46;
    --primary-active: #064E3B;
    --primary-focus: rgba(4, 120, 87, 0.14);
    --primary-light: #ECFDF5;
    --primary-border: #D1FAE5;
    --primary-accent: #10B981;
    
    /* Charcoal & Neutral Palette */
    --charcoal-950: #090D16;
    --charcoal-900: #0F172A;
    --charcoal-800: #1E293B;
    --charcoal-700: #334155;
    --charcoal-600: #475569;
    --charcoal-500: #64748B;
    --charcoal-400: #94A3B8;
    --charcoal-300: #CBD5E1;
    --charcoal-200: #E2E8F0;
    --charcoal-100: #F1F5F9;
    --charcoal-50:  #F8FAFC;

    /* Semantic Text Colors */
    --text-heading: #18231F;
    --text-body: #1E293B;
    --text-muted: #52615A;
    --text-dim: #64748B;
    
    /* Header Tokens - Pure White Theme */
    --header-bg: #FFFFFF;
    --header-border: #E2E8F0;
    --header-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --header-nav-color: #334155;
    --header-nav-hover: #047857;
    --header-nav-hover-bg: #F8FAFC;
    --header-nav-active: #047857;
    --header-nav-active-bg: #ECFDF5;
    
    /* Footer Tokens - Professional Light Theme */
    --footer-bg: #F3F6F4;
    --footer-heading: #18231F;
    --footer-text: #52615A;
    --footer-link: #047857;
    --footer-link-hover: #065F46;
    --footer-border: #DCE5DF;
    
    /* Surfaces */
    --bg-canvas: #F8FAF9;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F1F5F3;
    --bg-inset: #F8FAF9;
    
    /* Borders */
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;
    --border-strong: #CBD5E1;
    
    /* Controlled Border Radii - Restrained & Professional */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;

    /* Subtle Depth - Multi-layer Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
    --shadow-focus: 0 0 0 3px rgba(4, 120, 87, 0.16);

    /* Typography Font Stacks */
    --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Responsive Typographic Scale Tokens (Clamp) */
    --font-size-h1: clamp(1.875rem, 1.45rem + 1.8vw, 2.75rem);       /* 30px -> 44px */
    --font-size-h2: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);       /* 24px -> 34px */
    --font-size-h3: clamp(1.25rem, 1.125rem + 0.55vw, 1.5rem);      /* 20px -> 24px */
    --font-size-h4: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);       /* 17px -> 20px */
    --font-size-body: clamp(0.9375rem, 0.9rem + 0.18vw, 1.0625rem); /* 15px -> 17px */
    --font-size-nav: 0.9375rem;                                     /* 15px */
    --font-size-btn: 0.9375rem;                                     /* 15px */
    --font-size-label: 0.9rem;                                      /* 14.4px */
    --font-size-desc: 0.84rem;                                      /* 13.5px */
    --font-size-footer: 0.875rem;                                   /* 14px */
}

/* ==========================================================================
   CSS Reset & Foundations
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-body);
    font-size: var(--font-size-body);
    line-height: 1.625;
    letter-spacing: -0.011em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings with Standardized Hierarchy */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
    color: var(--text-heading);
    margin-top: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

h1, .h1 {
    font-size: var(--font-size-h1);
    font-weight: 800;
    letter-spacing: -0.028em;
    line-height: 1.2;
}

h2, .h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.25;
}

h3, .h3 {
    font-size: var(--font-size-h3);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.3;
}

h4, .h4 {
    font-size: var(--font-size-h4);
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.35;
}

h5, .h5 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

h6, .h6 {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.4;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.625;
}

p:last-child {
    margin-bottom: 0;
}

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

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

label, .form-label {
    font-size: var(--font-size-label);
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 0.4rem;
}

.form-text, .help-text, .text-desc {
    font-size: var(--font-size-desc);
    color: var(--text-muted);
}

.btn {
    font-family: var(--font-sans);
    font-size: var(--font-size-btn);
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.4;
    transition: all 0.15s ease;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* ==========================================================================
   Site Header & Navigation (Clean White Theme)
   ========================================================================== */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--header-shadow);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header .navbar {
    padding: 0.75rem 0;
}

.site-header .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-heading);
    text-decoration: none;
    padding: 0;
    margin: 0;
}

.site-header .navbar-brand .brand-logo {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header .navbar-brand:hover .brand-logo {
    opacity: 0.95;
}

.brand-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    white-space: nowrap;
}

.site-header .navbar-toggler {
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color) !important;
    background: #F8FAFC;
    color: var(--charcoal-800);
    transition: all 0.15s ease;
}

.site-header .navbar-toggler:hover,
.site-header .navbar-toggler:focus {
    background: #F1F5F9;
    border-color: var(--border-strong) !important;
    outline: none;
}

.site-header .navbar-toggler i {
    color: var(--charcoal-800) !important;
}

/* Nav Links - Professional Dark on White */
.site-header .nav-link {
    font-size: var(--font-size-nav);
    font-weight: 500;
    color: var(--header-nav-color);
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--header-nav-hover);
    background-color: var(--header-nav-hover-bg);
}

.site-header .nav-link.active {
    color: var(--header-nav-active);
    font-weight: 600;
    background-color: var(--header-nav-active-bg);
}

/* Dropdown Caret & Open Indicators */
.site-header .dropdown-toggle {
    display: inline-flex;
    align-items: center;
}

.site-header .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.45em;
    vertical-align: 0.1em;
    border-top: 0.32em solid currentColor;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header .nav-item.dropdown.show .dropdown-toggle::after,
.site-header .nav-item.dropdown.is-open .dropdown-toggle::after,
.site-header .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Header Action Button */
.btn-header-cta {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #FFFFFF !important;
    border: 1px solid var(--primary);
    box-shadow: 0 1px 2px rgba(4, 120, 87, 0.2);
    transition: all 0.15s ease;
}

.btn-header-cta:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

/* Mega Menu Dropdown Submenu - Crisp White & High Contrast */
.site-header .nav-item.dropdown {
    position: relative;
}

.dropdown-mega-grid {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 1rem;
    z-index: 1060;
}

/* Invisible bridge prevents closing when cursor traverses gap between toggle & menu */
.dropdown-mega-grid::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

@media (min-width: 992px) {
    .site-header .dropdown-mega-grid {
        position: absolute;
        top: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%) translateY(6px);
        width: 640px;
        max-width: min(640px, calc(100vw - 32px));
        margin: 0;
        display: none;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.45rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                    visibility 0.2s;
    }

    .site-header .nav-item.dropdown.show > .dropdown-mega-grid,
    .site-header .nav-item.dropdown.is-open > .dropdown-mega-grid,
    .site-header .dropdown-mega-grid.show {
        display: grid;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.mega-menu-item:hover,
.mega-menu-item:focus {
    background-color: #F8FAFC;
    border-color: var(--border-color);
    outline: none;
}

.mega-menu-item.active {
    background-color: var(--primary-light);
    border-color: var(--primary-border);
}

.mega-menu-item .item-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    transition: all 0.15s ease;
}

.mega-menu-item:hover .item-icon,
.mega-menu-item:focus .item-icon {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    transform: scale(1.05);
}

.mega-menu-item.active .item-icon {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.mega-menu-item .item-text {
    flex-grow: 1;
    min-width: 0;
}

.mega-menu-item .item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal-900);
    display: block;
    line-height: 1.25;
    transition: color 0.15s ease;
}

.mega-menu-item:hover .item-name,
.mega-menu-item:focus .item-name {
    color: var(--primary);
}

.mega-menu-item.active .item-name {
    color: var(--primary);
}

.mega-menu-item .item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
    line-height: 1.35;
}

.badge-format {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    background: #F1F5F9;
    color: var(--charcoal-600);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    line-height: 1.2;
    transition: all 0.15s ease;
}

.mega-menu-item:hover .badge-format,
.mega-menu-item:focus .badge-format {
    color: var(--primary-hover);
    border-color: var(--primary-border);
    background: var(--primary-light);
}

.mega-menu-item .badge-dim {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    background: #F1F5F9;
    color: var(--charcoal-600);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-xs);
}

/* ==========================================================================
   Hero Section - Clean, High-Impact & Editorial
   ========================================================================== */
.hero-section {
    padding: 4.5rem 0 3.5rem 0;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-canvas) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    color: var(--text-body);
    font-weight: 500;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.5rem;
}

.hero-pill .pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--primary-border);
}

.hero-title {
    font-size: var(--font-size-h1);
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.2;
    letter-spacing: -0.028em;
    max-width: 820px;
    margin: 0 auto 1.25rem auto;
}

.hero-subtitle {
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.625;
    max-width: 680px;
    margin: 0 auto 2rem auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.btn-primary-hero {
    background: var(--primary);
    color: #FFFFFF !important;
    border: 1px solid var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.65rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.btn-primary-hero:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary-hero {
    background: #FFFFFF;
    color: var(--charcoal-800) !important;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.45rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.btn-secondary-hero:hover {
    background: var(--bg-subtle);
    border-color: var(--charcoal-300);
}

/* Trust Bar / Metrics */
.hero-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    max-width: 780px;
    margin: 0 auto;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    color: var(--charcoal-600);
    font-weight: 500;
}

.trust-item i {
    color: var(--primary);
    font-size: 0.95rem;
}

/* ==========================================================================
   The Main PDF Processing Studio Workbench
   Visual Step-by-Step Flow:
   1. Channel -> 2. Upload -> 3. Options -> 4. Process -> 5. Download
   ========================================================================== */
.studio-workbench {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 3.5rem;
}

.studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: gap;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.studio-step-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
}

/* Step 1: Channel Switcher Ribbon */
.channel-strip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-subtle);
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-bottom: 1.75rem;
    scrollbar-width: none;
}

.channel-strip::-webkit-scrollbar {
    display: none;
}

.channel-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--charcoal-700);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.channel-tab:hover {
    color: var(--charcoal-900);
    background: rgba(255, 255, 255, 0.6);
}

.channel-tab.active {
    background: #FFFFFF;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
}

.channel-tab .tab-dim {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--charcoal-500);
    background: var(--charcoal-100);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-xs);
}

/* Step 2: Upload Zone */
.upload-container {
    margin-bottom: 1.75rem;
}

.upload-zone {
    border: 2px dashed var(--charcoal-300);
    background: var(--bg-canvas);
    border-radius: var(--radius-md);
    padding: 2.75rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.upload-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.upload-title .browse-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.upload-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 1.25rem auto;
}

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

.upload-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
    color: var(--charcoal-600);
}

.upload-chip i {
    color: var(--primary);
}

/* File Queue Table / Items */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 0.65rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.file-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}

.file-pdf-badge {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-md);
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #DC2626;
    flex-shrink: 0;
}

.file-pdf-badge .file-pdf-icon {
    font-size: 1.35rem;
    color: #DC2626;
    line-height: 1;
}

.file-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.35;
    margin-bottom: 2px;
}

.file-size {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
    line-height: 1.25;
}

/* Close / Cancel Button */
.file-remove-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.file-remove-btn .file-remove-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
    transition: stroke 0.2s ease, transform 0.2s ease;
    display: block;
}

.file-remove-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
    transform: scale(1.06);
}

.file-remove-btn:hover .file-remove-icon {
    transform: rotate(90deg);
}

.file-remove-btn:focus-visible {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.file-remove-btn:active {
    transform: scale(0.95);
    background: #FCA5A5;
    color: #B91C1C;
}

/* Step 3: Options Panel */
.options-panel-box {
    background: var(--bg-canvas);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.options-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.options-heading-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Controls */
.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.form-select,
.form-control {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--charcoal-300);
    background-color: #FFFFFF;
    color: var(--text-heading);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Switch Controls */
.switches-group {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.15rem;
    margin-top: 1rem;
}

.form-check-input {
    width: 2.25em;
    height: 1.2em;
    margin-top: 0.15em;
    cursor: pointer;
    border-color: var(--charcoal-400);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: var(--shadow-focus);
    border-color: var(--primary);
}

.form-check-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
}

.switch-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* Action Area */
.studio-actions {
    text-align: center;
    padding-top: 0.5rem;
}

.btn-process-action {
    background: var(--primary);
    color: #FFFFFF !important;
    border: 1px solid var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.85rem 2.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-process-action:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-process-action:disabled {
    background: var(--charcoal-300);
    border-color: var(--charcoal-300);
    cursor: not-allowed;
    opacity: 0.65;
}

/* Status & Results */
.status-box {
    display: none;
    background: #FFFFFF;
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-top: 1.5rem;
}

.status-step-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-xs);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.result-card {
    display: none;
    background: #FFFFFF;
    border: 1px solid var(--primary-accent);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem 0;
    margin: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.stat-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.35rem;
}

/* ==========================================================================
   Section Headers & Editorial Typography
   ========================================================================== */
.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--charcoal-900);
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

.section-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   Marketplace Channels - Structured Matrix
   Avoids generic repeated cards; provides clean, purposeful layout
   ========================================================================== */
.channels-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.channel-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.channel-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.channel-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.channel-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--charcoal-700);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-color);
}

.channel-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.channel-summary {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1rem;
}

.channel-couriers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.courier-pill {
    font-size: 0.68rem;
    font-weight: 500;
    background: var(--bg-canvas);
    color: var(--charcoal-600);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
}

.channel-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.channel-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   Editorial Feature Section (Split Layout)
   Replaces AI-generated card clusters with an elegant editorial design
   ========================================================================== */
.editorial-section {
    padding: 4.5rem 0;
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.editorial-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-heading);
}

.feature-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Technical Specification Table */
.specs-table-wrapper {
    background: var(--bg-canvas);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.specs-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.specs-table th {
    background: var(--bg-subtle);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--charcoal-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.specs-table td {
    padding: 0.85rem 1rem;
    font-size: 0.84rem;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-light);
}

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

.dim-code {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--charcoal-900);
}

/* ==========================================================================
   FAQ Section - Clean Accordion
   ========================================================================== */
.faq-section {
    padding: 4.5rem 0;
}

.clean-accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    overflow: hidden;
}

.clean-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-light);
}

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

.clean-accordion .accordion-button {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal-900);
    padding: 1.15rem 1.25rem;
    background: #FFFFFF;
    box-shadow: none !important;
}

.clean-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: var(--primary-light);
}

.clean-accordion .accordion-body {
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    font-size: 0.875rem;
    color: var(--charcoal-600);
    line-height: 1.6;
}

/* ==========================================================================
   Minimalist Conversion Banner
   ========================================================================== */
.minimal-cta-banner {
    background: var(--charcoal-900);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    color: #FFFFFF;
    margin: 3.5rem 0;
    border: 1px solid var(--charcoal-800);
    position: relative;
    overflow: hidden;
}

.minimal-cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.minimal-cta-banner h2 {
    color: #FFFFFF;
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

.minimal-cta-banner p {
    color: var(--charcoal-300);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* ==========================================================================
   Site Footer (Professional Light Theme)
   ========================================================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--footer-border);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
    font-size: var(--font-size-footer);
}

.footer-status-bar {
    border-bottom: 1px solid var(--footer-border);
}

.footer-engine-badge {
    background: #E6F4EA;
    color: var(--primary) !important;
    border: 1px solid #B7E1CD !important;
    font-size: 0.75rem;
    font-weight: 600;
}

.footer-status-meta {
    color: var(--footer-text);
}

.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    text-decoration: none;
}

.site-footer .footer-brand img {
    height: 32px;
    width: auto;
}

.site-footer .footer-desc,
.footer-text {
    color: var(--footer-text);
    line-height: 1.625;
    font-size: var(--font-size-footer);
    max-width: 360px;
}

.footer-heading {
    color: var(--footer-heading);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.15rem;
}

.footer-security-card {
    background: #FFFFFF;
    border: 1px solid var(--footer-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.footer-security-title {
    color: var(--footer-heading);
    font-size: 0.875rem;
    font-weight: 600;
}

.footer-security-text {
    color: var(--footer-text);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-link {
    color: var(--footer-link);
    text-decoration: none;
    font-size: var(--font-size-footer);
    font-weight: 500;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.45rem;
}

.footer-link:hover {
    color: var(--footer-link-hover);
    transform: translateX(3px);
}

.footer-divider {
    border-color: var(--footer-border);
    opacity: 1;
}

.footer-bottom {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--footer-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--footer-text);
}

.footer-copyright,
.footer-tagline {
    color: var(--footer-text);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ==========================================================================
   Backward Compatibility Helpers for Existing JS & Pages
   ========================================================================== */
.tool-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.tool-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.crop-preview-wrapper {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: auto;
    max-height: 520px;
    padding: 1rem;
}

#crop-canvas, #manual-crop-canvas {
    box-shadow: var(--shadow-sm);
    background: #FFFFFF;
    cursor: crosshair;
}
