* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* =============================================
   CSS DESIGN SYSTEM - Variables
   ============================================= */
:root {
    /* 8px Spacing Grid System */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;

    /* Typography Scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    --text-5xl: 48px;
    --text-6xl: 60px;

    /* Line Heights */
    --line-height-tight: 1.3;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;

    /* Shadow System - Elevation */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.2);

    /* Shadow System - Focus Rings */
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.2);
    --focus-ring-error: 0 0 0 3px rgba(239, 68, 68, 0.2);
    --focus-ring-success: 0 0 0 3px rgba(16, 185, 129, 0.2);

    /* Shadow System - Colored Shadows */
    --shadow-primary: 0 4px 12px rgba(37, 99, 235, 0.3);
    --shadow-primary-lg: 0 6px 20px rgba(37, 99, 235, 0.5);
    --shadow-danger: 0 4px 12px rgba(239, 68, 68, 0.3);
    --shadow-success: 0 4px 12px rgba(16, 185, 129, 0.4);

    /* Color System - Brand & Semantic Colors */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --primary-hover: #1e40af;

    --success: #10B981;
    --success-light: #D1FAE5;
    --success-dark: #065F46;

    --warning: #F59E0B;
    --warning-light: #FEF3C7;

    --error: #EF4444;
    --error-light: #FEE2E2;
    --error-dark: #991B1B;

    /* Gray Scale */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: #4B5563;
    --text-muted: #6B7280;

    /* Background Colors */
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-card: #FFFFFF;

    /* Button System Colors */
    --btn-primary-bg: var(--primary);
    --btn-primary-hover: var(--primary-dark);
    --btn-primary-active: var(--primary-hover);
    --btn-secondary-border: var(--gray-200);
    --btn-secondary-hover-bg: var(--gray-100);
    --btn-secondary-hover-border: var(--primary);
    --btn-danger-bg: var(--error);
    --btn-danger-hover: #dc2626;

    /* Border Colors */
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);
    --border-dark: var(--gray-400);

    /* Legacy Compatibility - Mapping old variables to new */
    --color-primary: var(--primary);
    --color-primary-dark: var(--primary-dark);
    --color-primary-light: var(--primary-light);
    --color-success: var(--success);
    --color-danger: var(--error);
    --color-warning: var(--warning);
    --bg-primary: var(--primary);
    --bg-secondary: var(--bg-light);
    --border-primary: var(--primary);
    --text-white: #ffffff;

    /* Font Properties */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Sizing for backwards compatibility */
    --font-size-xs: var(--text-xs);
    --font-size-sm: var(--text-sm);
    --font-size-base: var(--text-base);
    --font-size-md: var(--text-lg);
    --font-size-lg: var(--text-xl);
    --font-size-xl: var(--text-2xl);
    --font-size-2xl: var(--text-3xl);
    --font-size-3xl: var(--text-4xl);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-3xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-all: all 0.2s ease;

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-modal: 2000;
    --z-tooltip: 3000;

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 900px;
    --container-xl: 1200px;

    /* Breakpoints (for reference in media queries) */
    --breakpoint-mobile: 0px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
}

/* =============================================
   Dark Mode Theme Variables
   ============================================= */
[data-theme="dark"] {
    /* Background Colors - Dark */
    --bg-white: #1e2128;
    --bg-light: #252830;
    --bg-card: #2a2d35;

    /* Text Colors - Dark */
    --text-primary: #e4e6eb;
    --text-secondary: #c4c7cc;  /* Updated from #b0b3b8 for WCAG AA compliance */
    --text-muted: #a0a3a9;      /* Updated from #8a8d93 for WCAG AA compliance */

    /* Border Colors - Dark */
    --border-light: #2f3339;
    --border-medium: #3a3f47;
    --border-dark: #4a4f57;

    /* Semantic Colors - Adjusted for dark */
    --success: #22c55e;
    --success-light: #1a3d2a;
    --error: #ef4444;
    --error-light: #3d1a1a;
    --warning: #eab308;
    --warning-light: #3d361a;

    /* Shadows - Softer for dark mode */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
    --shadow-primary: 0 4px 12px rgba(37, 99, 235, 0.4);
    --shadow-primary-lg: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* System preference dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Background Colors - Dark */
        --bg-white: #1e2128;
        --bg-light: #252830;
        --bg-card: #2a2d35;

        /* Text Colors - Dark */
        --text-primary: #e4e6eb;
        --text-secondary: #c4c7cc;  /* Updated from #b0b3b8 for WCAG AA compliance */
        --text-muted: #a0a3a9;      /* Updated from #8a8d93 for WCAG AA compliance */

        /* Border Colors - Dark */
        --border-light: #2f3339;
        --border-medium: #3a3f47;
        --border-dark: #4a4f57;

        /* Semantic Colors - Adjusted for dark */
        --success: #22c55e;
        --success-light: #1a3d2a;
        --error: #ef4444;
        --error-light: #3d1a1a;
        --warning: #eab308;
        --warning-light: #3d361a;

        /* Shadows - Softer for dark mode */
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
        --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
        --shadow-primary: 0 4px 12px rgba(37, 99, 235, 0.4);
        --shadow-primary-lg: 0 6px 20px rgba(37, 99, 235, 0.5);
    }
}

/* =============================================
   Lucide Icon Helpers
   ============================================= */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    vertical-align: middle;
    display: inline-block;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-xl {
    width: 2rem;
    height: 2rem;
}

/* =============================================
   Button Component System
   ============================================= */
/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-family-base);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: var(--shadow);
}

.btn:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Primary Button - Main actions */
.btn-primary {
    background: var(--btn-primary-bg);
    color: white;
    border: none;
}

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

.btn-primary:active:not(:disabled) {
    background: var(--btn-primary-active);
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button - Less prominent actions */
.btn-secondary {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--btn-secondary-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--btn-secondary-hover-border);
    color: var(--btn-primary-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

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

/* Tertiary Button - Subtle actions */
.btn-tertiary {
    background: transparent;
    color: var(--primary);
    border: none;
}

.btn-tertiary:hover:not(:disabled) {
    background: var(--btn-secondary-hover-bg);
    color: var(--primary-dark);
}

/* Danger Button - Destructive actions */
.btn-danger {
    background: var(--btn-danger-bg);
    color: white;
    border: none;
}

.btn-danger:hover:not(:disabled) {
    background: var(--btn-danger-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-danger);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-2) var(--space-6);
    font-size: var(--font-size-md);
}

/* Full Width Button */
.btn-block {
    width: 100%;
}

/* AI Disclaimer */
.ai-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 16px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.ai-disclaimer .icon {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.7;
}

/* Button States */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

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

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

/* Icon in buttons */
.btn .icon {
    flex-shrink: 0;
}

/* =============================================
   Typography Hierarchy
   ============================================= */
/* Base Typography */
body {
    font-family: var(--font-family-base);
    background: #ffffff;
    min-height: 100vh;
    line-height: var(--line-height-normal);
    font-size: var(--text-base);
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin: 0;
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl); /* 48px - increased from 36px */
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: var(--space-4);
}

h2 {
    font-size: var(--text-4xl); /* 36px - increased from 30px */
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-3xl); /* 30px - increased from 24px */
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-3);
}

h5 {
    font-size: var(--font-size-md);
    margin-bottom: var(--space-2);
}

h6 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-semibold);
}

/* Paragraphs and Text */
p {
    margin: 0 0 var(--space-4) 0;
    line-height: var(--line-height-relaxed);
}

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

/* Text Utilities */
.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

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

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-6);
}

li {
    margin-bottom: var(--space-2);
    line-height: var(--line-height-relaxed);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-white);
}

/* =============================================
   Header - Modern Flexbox Layout
   ============================================= */
header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}

.header-brand {
    flex-shrink: 0;
}

.header-brand h1 {
    font-size: var(--text-xl);
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--gray-900);
}

/* Logo styles matching landing page */
.header-brand .logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.header-brand .logo:hover {
    opacity: 0.9;
}

.header-brand .logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtitle {
    font-size: var(--text-xs);
    color: var(--gray-600);
    margin: 0;
    display: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

/* Credit Display - Simplified */
.credit-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
}

.credit-icon {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

.credit-count {
    font-weight: 700;
    color: var(--gray-900);
    min-width: 20px;
}

.credit-count.low-credits {
    color: var(--warning);
}

.credit-count.no-credits {
    color: var(--error);
}

/* Tooltip styles removed */

/* =============================================
   Credit History Page Styles
   ============================================= */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-5);
}

.history-header {
    padding: var(--space-5) 0;
    margin-bottom: var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.history-title h1 {
    margin: 0 0 var(--space-1) 0;
    font-size: var(--text-2xl);
    color: var(--text-primary);
}

.history-title p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.current-balance {
    text-align: right;
}

.balance-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    font-weight: 600;
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-value.green { color: #22c55e; }
.stat-value.blue { color: #3b82f6; }
.stat-value.purple { color: #a855f7; }

.history-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.transaction-item {
    padding: var(--space-4);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.transaction-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary);
    background: var(--bg-white);
    transform: translateY(-1px);
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.transaction-date {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: var(--text-xl);
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.transaction-amount.credit {
    color: #22c55e;
}

.transaction-amount.debit {
    color: #ef4444;
}

.credit-buy-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.credit-buy-link:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-trigger:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.user-menu-trigger .user-email {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-dropdown {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu.active .user-menu-dropdown {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.menu-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.menu-item.logout {
    color: var(--error);
}

.menu-item.logout:hover {
    background: var(--error-light);
    color: var(--error-dark);
}

.menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
}

main {
    padding: var(--space-4) 20px;
}

.form-section {
    margin-bottom: var(--space-10);
}

.form-section h2 {
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-xl);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* =============================================
   File Upload Styles - Enhanced
   ============================================= */
.file-upload-wrapper {
    position: relative;
}

#resumeFile {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-8);
    background: var(--bg-light);
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-all);
    min-height: 150px;
}

.file-upload-label:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-upload-label:hover .icon {
    color: var(--primary);
    transform: translateY(-2px);
}

.file-upload-label:active {
    transform: translateY(0);
}

.file-upload-text {
    font-size: var(--text-base);
    color: var(--text-primary);
}

.file-upload-text strong {
    color: var(--primary);
    font-weight: 600;
}

.file-name {
    display: block;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

.file-hint {
    display: block;
    color: var(--text-muted);
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}

#fileName {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

/* Resume Selection Styles */
.section-subtitle {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin: calc(var(--space-2) * -1) 0 var(--space-5) 0;
}

.resume-selection-container {
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.resume-selection-container:hover {
    border-color: var(--border-dark);
    box-shadow: var(--shadow-sm);
}

/* Remove bottom margin from first container to bring sections closer */
.resume-selection-container:first-of-type {
    margin-bottom: 0;
}

.resume-selection-container h3 {
    margin: 0 0 var(--space-4) 0;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.link-btn {
    /* Extends btn-tertiary */
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: var(--transition-all);
    padding: var(--space-1) var(--space-2);
}

.link-btn:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.saved-resume-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.saved-resume-selection:empty::before {
    content: 'No saved resumes. Click "Manage Resumes" to add some.';
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    text-align: center;
    display: block;
}

.resume-checkbox-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-all);
}

.resume-checkbox-item:hover {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.resume-checkbox-item.selected {
    border-color: var(--color-primary);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: var(--shadow-sm);
}

.resume-checkbox-item input[type="checkbox"],
.resume-checkbox-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: var(--space-3);
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Disabled state for resume checkbox items */
.resume-checkbox-item input[type="checkbox"]:disabled,
.resume-checkbox-item input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.resume-checkbox-item:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-light);
}

.resume-checkbox-item:has(input:disabled):hover {
    border-color: var(--border-light);
    background: var(--bg-light);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.resume-checkbox-item:has(input:disabled) .resume-checkbox-label {
    cursor: not-allowed;
}

.resume-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
}

.resume-checkbox-label .resume-icon {
    font-size: 1.3rem;
}

.resume-checkbox-info h4 {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.resume-checkbox-info p {
    margin: calc(var(--space-1) / 2) 0 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* OR Divider */
.or-divider {
    position: relative;
    text-align: center;
    margin: var(--space-3) 0;
}

.or-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border-light);
}

.or-divider span {
    position: relative;
    background: var(--bg-white);
    padding: 0 var(--space-4);
    color: var(--text-muted);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
}

/* Uploaded Files List */
.uploaded-files-list {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

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

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.uploaded-file-info span:first-child {
    font-size: var(--font-size-lg);
}

.uploaded-file-info span:last-child {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: var(--font-size-lg);
    padding: 0 var(--space-2);
    transition: var(--transition-all);
    border-radius: var(--radius-sm);
}

.remove-file-btn:hover {
    transform: scale(1.2);
    background: rgba(239, 68, 68, 0.1);
}

/* Selected Resumes Summary */
.selected-resumes-summary {
    margin-top: 15px;
    padding: 12px 15px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
}

.selected-resumes-summary strong {
    font-weight: 700;
}

#selectedCount {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Input Group Styles */
.input-group {
    margin-bottom: var(--space-5);
}

.input-group label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
}

.input-group label .icon {
    color: var(--color-primary);
}

/* Enhanced Input & Textarea Styles */
.input-group input,
.input-group textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--transition-all);
    line-height: var(--line-height-normal);
}

/* Placeholder Styles */
.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Focus States - Enhanced with ring effect */
.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Hover States */
.input-group input:hover:not(:focus):not(:disabled),
.input-group textarea:hover:not(:focus):not(:disabled) {
    border-color: var(--border-dark);
}

/* Disabled States */
.input-group input:disabled,
.input-group textarea:disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Textarea Specific */
.input-group textarea {
    resize: vertical;
    min-height: 150px;
    line-height: var(--line-height-relaxed);
}

/* Error States */
.input-group.error input,
.input-group.error textarea {
    border-color: var(--color-danger);
}

.input-group.error input:focus,
.input-group.error textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success States */
.input-group.success input,
.input-group.success textarea {
    border-color: var(--color-success);
}

.input-group.success input:focus,
.input-group.success textarea:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Helper Text */
.input-helper {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.input-group.error .input-helper {
    color: var(--color-danger);
}

.input-group.success .input-helper {
    color: var(--color-success);
}

/* Radio Button Styles - Enhanced */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.radio-option {
    display: flex;
    align-items: flex-start;
}

.radio-option input[type="radio"] {
    margin-top: var(--space-1);
    margin-right: var(--space-3);
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.radio-option label {
    cursor: pointer;
    flex: 1;
    padding: var(--space-4);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: var(--transition-all);
}

.radio-option input[type="radio"]:checked + label {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.radio-option label:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--border-dark);
}

.radio-title {
    display: block;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-md);
}

.radio-desc {
    display: block;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

/* Checkbox Group - Enhanced */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
}

.checkbox-option input[type="checkbox"] {
    margin-top: var(--space-1);
    margin-right: var(--space-3);
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-option label {
    cursor: pointer;
    flex: 1;
    padding: var(--space-4);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: var(--transition-all);
}

.checkbox-option input[type="checkbox"]:checked + label {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.checkbox-option label:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--border-dark);
}

.checkbox-title {
    display: block;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-md);
}

.checkbox-desc {
    display: block;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

/* Submit Button - extends btn-primary */
.submit-btn {
    /* Inherits from .btn and .btn-primary via class application in HTML */
    /* Additional specific styling can go here if needed */
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #666;
    font-size: 1rem;
    transform: none !important;
    animation: none !important;
}

/* Progress Bar */
.progress-bar-container {
    margin-top: var(--space-6);
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    transform: none !important;
    animation: none !important;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: none !important;
    animation: none !important;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on progress bar */
.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    bottom: 0;
    width: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-3);
    gap: var(--space-4);
    transform: none !important;
    animation: none !important;
}

.progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 600;
    transform: none !important;
    animation: none !important;
}

.progress-text span {
    color: var(--primary);
    font-weight: 700;
}

.progress-time {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    transform: none !important;
    animation: none !important;
}

.progress-time span {
    color: var(--primary);
    font-weight: 700;
}

/* Mobile: Stack progress info vertically */
@media (max-width: 767px) {
    .progress-info {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }
}

/* Message Area */
.message-area {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.message-area.show {
    display: block;
}

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

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

/* Footer */
footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Formatting Button */
/* Header Buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 10px 16px;
    background: var(--btn-primary-bg);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow);
    min-height: 44px;
}

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

.logout-btn {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.logout-btn:hover {
    background: var(--gray-100);
    border-color: var(--error);
    color: var(--error);
    box-shadow: var(--shadow);
}

/* User Email Display */
.user-email-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--gray-50);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-weight: var(--font-weight-medium);
    font-size: 13px;
}

.user-icon {
    flex-shrink: 0;
    color: var(--primary);
}

.user-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    color: var(--gray-700);
}

/* Credit Widget */
.credit-widget {
    position: relative;
    cursor: pointer;
}

.credit-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-weight: var(--font-weight-semibold);
    transition: all 0.2s ease;
    font-size: 13px;
}

.credit-balance:hover {
    background: var(--gray-50);
    border-color: var(--primary);
}

.credit-icon {
    font-size: 16px;
    color: var(--primary);
}

.credit-count {
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    color: var(--gray-900);
}

.credit-count.low-credits {
    color: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.credit-count.no-credits {
    color: #ef4444;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.credit-label {
    font-size: 0.9rem;
}

.credit-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 1000;
}

.credit-widget:hover .credit-dropdown {
    display: block;
}

.credit-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    border-bottom: 1px solid var(--border-light);
}

.credit-link:last-child {
    border-bottom: none;
}

.credit-link:hover {
    background: var(--color-gray-100);
    color: var(--color-primary);
}

/* Modal Styles - Modern Design */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-white);
    margin: var(--space-5);
    padding: 0;
    border-radius: var(--radius-2xl);
    width: 95%;
    max-width: var(--container-xl);
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideIn var(--transition-slow);
    display: flex;
    flex-direction: column;
}

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

/* Modal Header - Enhanced */
.modal-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: var(--space-6) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.modal-header h2 .icon {
    color: var(--color-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-all);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-color: var(--color-danger);
    transform: scale(1.1);
}

.close:active {
    transform: scale(0.95);
}

/* Mobile Modal Optimization */
@media (max-width: 767px) {
    .modal {
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        animation: slideUpMobile 0.3s ease-out;
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: var(--bg-white);
        z-index: 10;
        padding: var(--space-4) var(--space-5);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .modal-header h2 {
        font-size: var(--text-xl);
    }

    #formattingForm {
        padding: var(--space-5);
    }
}

/* Formatting Form Styles - Modern Design */
#formattingForm {
    padding: var(--space-8);
    overflow-y: auto;
    flex: 1;
    background: var(--bg-light);
}

.formatting-section {
    /* Extends .card */
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--border-light);
    transition: var(--transition-all);
}

.formatting-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-dark);
}

.formatting-section:last-of-type {
    margin-bottom: 0;
}

.formatting-section h3 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.formatting-section h3 .icon {
    color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #b0b0b0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="number"] {
    width: 100px;
}

.validation-hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: 5px;
}

.form-group input:invalid {
    border-color: #dc3545;
}

.form-group input:valid {
    border-color: #28a745;
}

.form-group.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
    padding-bottom: 4px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.checkbox-group label:hover {
    color: #667eea;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    cursor: pointer;
    accent-color: #667eea;
    margin: 0;
    flex-shrink: 0;
}

/* Template Preview */
.template-preview {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    min-height: 300px;
    font-family: Calibri, sans-serif;
}

.preview-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.preview-name {
    font-size: 20px;
    margin-bottom: 5px;
}

.preview-contact {
    font-size: 12px;
    color: #666;
}

.preview-section {
    margin-bottom: 20px;
}

.preview-section-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.preview-content {
    font-size: 12px;
    line-height: 1.6;
}

.preview-role {
    font-size: 14px;
    margin: 10px 0 5px 0;
}

.preview-bullet {
    margin-left: 20px;
    margin-bottom: 5px;
}

/* Modal Actions - Sticky Footer */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 32px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

/* Out of Credits Modal */
.out-of-credits-body {
    padding: var(--space-8);
    text-align: center;
    background: var(--bg-light);
}

.out-of-credits-body .credits-icon-wrapper {
    margin-bottom: var(--space-6);
}

.out-of-credits-body .icon-xl {
    width: 64px;
    height: 64px;
    stroke-width: 1.5;
    color: var(--color-primary);
}

.out-of-credits-body h3 {
    margin: 0 0 var(--space-4) 0;
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.out-of-credits-body p {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
}

.out-of-credits-body .modal-actions {
    border-top: none;
    padding: 0;
    justify-content: center;
    background: transparent;
    flex-direction: column;
    gap: var(--space-3);
}

/* =============================================
   Responsive Design - Mobile & Tablet
   ============================================= */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .header-content {
        gap: var(--space-4);
    }

    .header-nav {
        gap: var(--space-3);
    }

    .header-actions {
        gap: var(--space-1);
    }

    .header-user {
        gap: var(--space-1);
    }

    .header-btn .btn-text {
        display: none;
    }

    .user-email {
        display: none;
    }

    .credit-label {
        display: none;
    }
}

/* Mobile (0px - 767px) */
@media (max-width: 767px) {
    header {
        padding: var(--space-4);
    }

    .header-content {
        flex-wrap: wrap;
        gap: var(--space-3);
    }

    .header-brand h1 {
        font-size: var(--font-size-xl);
    }

    .subtitle {
        font-size: var(--font-size-xs);
    }

    .header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: var(--space-2);
        padding-top: var(--space-3);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .header-nav.mobile-open {
        display: flex;
    }

    .header-actions,
    .header-user {
        flex-direction: column;
        width: 100%;
        gap: var(--space-2);
    }

    .header-btn,
    .user-email-display,
    .credit-balance {
        width: 100%;
        justify-content: center;
    }

    .header-btn .btn-text {
        display: inline;
    }

    .user-email {
        display: inline;
        max-width: none;
    }

    .credit-label {
        display: inline;
    }

    .mobile-menu-toggle {
        display: block;
    }

    main {
        padding: var(--space-5);
    }

    .form-section h2 {
        font-size: 1.3rem;
    }

    /* Stack saved resumes vertically on mobile */
    .saved-resume-selection {
        grid-template-columns: 1fr;
    }

    .radio-option {
        flex-direction: column;
    }

    .radio-option input[type="radio"] {
        margin-bottom: 10px;
    }

    .checkbox-option {
        flex-direction: column;
    }

    .checkbox-option input[type="checkbox"] {
        margin-bottom: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

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

    .modal-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    /* Mobile container adjustments */
    .container {
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
    }

    body {
        padding: 0;
    }

    /* Job cards mobile optimization */
    .job-card {
        padding: var(--space-4);
        margin-bottom: var(--space-3);
    }

    .job-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .job-card-header-actions {
        width: 100%;
        flex-direction: column;
        gap: var(--space-3);
    }

    .job-card-checkboxes {
        width: 100%;
        flex-wrap: wrap;
    }

    .remove-job-btn {
        width: 100%;
    }

    /* Mobile form inputs */
    .job-card-inputs {
        gap: var(--space-3);
    }

    /* Touch-friendly checkboxes/radios */
    .resume-checkbox-item,
    .radio-option label,
    .checkbox-option label {
        min-height: 48px;
        padding: var(--space-4);
    }

    /* Modal mobile optimizations */
    .modal-header {
        padding: var(--space-4);
    }

    .modal-header h2 {
        font-size: var(--font-size-xl);
    }

    #formattingForm {
        padding: var(--space-4);
    }

    .formatting-section {
        padding: var(--space-4);
    }

    /* Card system mobile */
    .card {
        padding: var(--space-4);
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
}

/* =============================================
   Touch-Friendly Enhancements (All Devices)
   ============================================= */

/* Minimum tap target size of 44x44px for better touch experience */
@media (hover: none) and (pointer: coarse) {
    /* Touch device specific styles */
    .btn,
    .header-btn,
    .link-btn,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    .close {
        min-height: 44px;
        min-width: 44px;
    }

    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
    }

    /* Increase touch target for labels */
    .resume-checkbox-item,
    .job-card-checkboxes label,
    .radio-option label,
    .checkbox-option label {
        min-height: 48px;
        padding: var(--space-3) var(--space-4);
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover,
    .job-card:hover,
    .resume-checkbox-item:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .card:active,
    .job-card:active {
        transform: translateY(0);
        opacity: 0.95;
    }
}

/* =============================================
   Unified Card Component System
   ============================================= */

/* Base Card Styles */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
}

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

/* Prevent text overflow in all card components */
.card,
.job-card,
.document-card,
.pricing-card,
.resume-item {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Card Variants */
.card-outlined {
    border: 2px solid var(--border-dark);
    box-shadow: none;
}

.card-outlined:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

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

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

.card-accent-left {
    border-left: 4px solid var(--color-primary);
}

.card-accent-left:hover {
    border-left-color: var(--color-secondary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.card-accent-top {
    border-top: 4px solid var(--color-primary);
}

/* Card Sizes */
.card-sm {
    padding: var(--space-3);
}

.card-lg {
    padding: var(--space-8);
}

/* Card Components */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    gap: var(--space-4);
}

.card-header h3,
.card-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
}

.card-body {
    padding: var(--space-4) 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
    gap: var(--space-3);
}

/* Card Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Card Badge (for labels/tags) */
.card-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-light);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

.card-badge.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
}

.card-badge.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.card-badge.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: var(--color-warning);
}

.card-badge.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* =============================================
   Phase 6: Polish & Details
   ============================================= */

/* Smooth Animations & Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

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

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

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

.btn-primary.loading::after {
    border-color: white;
    border-top-color: transparent;
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-light) 0%,
        #e0e0e0 50%,
        var(--bg-light) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-md);
}

.skeleton-container {
    width: 100%;
    padding: var(--space-4);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-2);
    border-radius: var(--radius-sm);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
}

.skeleton-card {
    height: 200px;
    margin-bottom: var(--space-4);
}

/* Loading state for credit count */
.credit-count.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Smooth Page Transitions */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

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

/* Stagger animations for lists */
.job-card:nth-child(1) { animation-delay: 0ms; }
.job-card:nth-child(2) { animation-delay: 50ms; }
.job-card:nth-child(3) { animation-delay: 100ms; }
.job-card:nth-child(4) { animation-delay: 150ms; }
.job-card:nth-child(5) { animation-delay: 200ms; }

/* Focus Visible (Accessibility) */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }

    .card,
    .job-card,
    .modal-content {
        border-width: 2px;
    }
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to main content link for keyboard navigation */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    z-index: var(--z-tooltip);
    border-radius: var(--radius-md);
}

.skip-to-main:focus {
    top: var(--space-2);
    left: var(--space-2);
}

/* Improved Focus Indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--bg-white);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 400px;
    z-index: var(--z-modal);
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast.info {
    border-left: 4px solid var(--color-primary);
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

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

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

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--space-2) var(--space-3);
    background: var(--text-primary);
    color: white;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-all);
    z-index: var(--z-tooltip);
}

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

/* Dark Mode Toggle Switch */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle:hover {
    background: var(--gray-100);
}

.theme-toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition-all);
    border: 1px solid var(--gray-400);
}

.theme-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-toggle-switch {
    background: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .theme-toggle-switch::after {
    transform: translateX(20px);
}

.theme-toggle:hover .theme-toggle-switch {
    background: var(--gray-400);
}

[data-theme="dark"] .theme-toggle:hover .theme-toggle-switch {
    background: var(--primary-dark);
}

.theme-toggle-icon,
.theme-icon {
    width: 14px;
    height: 14px;
    color: var(--gray-600);
    transition: var(--transition-all);
}

[data-theme="dark"] .theme-icon {
    color: var(--gray-300);
}

.theme-toggle:hover .theme-icon {
    color: var(--gray-900);
}

[data-theme="dark"] .theme-toggle:hover .theme-icon {
    color: white;
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =============================================
   Job Cards - Extends Card System
   ============================================= */
.job-card {
    /* Extends .card .card-accent-left */
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s ease-out backwards;
}

.job-card:hover {
    border-left-color: var(--color-secondary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.job-card-header {
    /* Extends .card-header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    gap: var(--space-4);
}

.job-card-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.job-card-header h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.job-card-header-actions {
    /* Extends .card-actions */
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.job-card-checkboxes {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.job-card-checkboxes label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

.job-card-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Cover Letter Format Toggle */
.cover-letter-format-toggle {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);

    /* Smooth transition animation - hidden by default */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding: 0 var(--space-2);
    transition: max-height 0.3s ease-out, opacity 0.25s ease-out, margin-top 0.3s ease-out, padding 0.3s ease-out;
}

/* Shown state with smooth slide-in animation */
.cover-letter-format-toggle.show {
    max-height: 100px;
    opacity: 1;
    margin-top: var(--space-2);
    padding: var(--space-2);
}

.format-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
}

.format-option input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary);
}

.format-option:hover {
    color: var(--primary);
}

.format-option span {
    white-space: nowrap;
}

.remove-job-btn {
    /* Extends btn-danger with small size */
    padding: var(--space-1) var(--space-3);
    background: transparent;
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-all);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.remove-job-btn:hover {
    background: var(--color-danger);
    color: var(--text-white);
    transform: scale(1.05);
}

/* Compact Input Groups for Job Cards */
.job-card .input-group {
    margin-bottom: 14px;
}

.job-card .input-group label {
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: #555;
}

.job-card .input-group label .required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* Input Helper - wrapper for character counters and hints */
.input-helper {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-2);
    min-height: 20px;
}

.input-helper .char-counter {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--error);
}

.job-card .input-group input,
.job-card .input-group textarea {
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid #ddd;
}

.job-card .input-group textarea {
    min-height: 100px;
}

.job-card .input-group input:focus,
.job-card .input-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#addJobBtnBottom:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e0e0e0;
    color: #999;
    border-color: #ccc;
}

/* Two-column layout for larger screens */
@media (min-width: 1024px) {
    .job-card-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .job-card-inputs .input-group.full-width {
        grid-column: 1 / -1;
    }
}

/* Responsive header for mobile */
@media (max-width: 768px) {
    .job-card-header {
        flex-wrap: wrap;
    }

    .job-card-header h3 {
        flex: 1 1 100%;
        margin-bottom: 12px;
    }

    .job-card-header-actions {
        flex: 1 1 100%;
        justify-content: space-between;
    }

    .job-card-checkboxes {
        gap: 12px;
    }
}

/* ========================================
   RESUME MANAGER MODAL STYLES
   ======================================== */

.resume-manager-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.resume-manager-body {
    padding: 20px 0;
}

.resume-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.resume-section h3 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resume-count {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: normal;
}

.optional-badge {
    font-size: 0.75rem;
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Resume List */
.resume-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

.resume-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.resume-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.resume-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.resume-icon {
    font-size: 1.5rem;
}

.resume-details h4 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 1rem;
}

.resume-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.resume-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #f8f9fa;
}

.icon-btn.delete:hover {
    background: #ffe5e5;
    color: #dc3545;
}

/* Upload Form */
.upload-resume-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.char-counter-small {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
}

.file-upload-label-small {
    display: inline-block;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.file-upload-label-small:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

#resumeFileUpload {
    display: none;
}

#uploadFileName {
    color: #6c757d;
}

/* LinkedIn Section */
.linkedin-section {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

.linkedin-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.linkedin-info p {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
}

.linkedin-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Button with icon */
.btn-secondary svg {
    margin-right: 6px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .resume-manager-modal {
        max-width: 95%;
        margin: 20px;
    }

    .resume-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .resume-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .header-buttons {
        flex-direction: column;
        gap: 8px;
        top: 10px;
        right: 10px;
    }

    .header-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .user-email-display {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .user-email {
        max-width: 150px;
    }
}

/* =============================================
   Login Page Styles
   ============================================= */

body.login-page {
    font-family: var(--font-family-base);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
}

.login-container {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 450px;
    width: 100%;
    padding: var(--space-6) var(--space-8);
    text-align: center;
}

.login-container .logo {
    font-size: 32px;
    margin-bottom: var(--space-1);
    color: var(--primary);
}

.login-container .logo svg {
    stroke: var(--primary);
    width: 32px;
    height: 32px;
}

.login-container h1 {
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-weight: 700;
}

.login-container .subtitle {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.signup-benefits {
    background: var(--primary-light);
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
}

.benefits-icon {
    font-size: 20px;
}

.benefits-text {
    color: var(--text-primary);
}

.auth-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-primary);
}

.auth-button:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.auth-button:active {
    transform: translateY(0);
}

.google-button {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.google-button:hover {
    background: #357ae8;
    border-color: #357ae8;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 3px;
    padding: 2px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-4) 0;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.divider span {
    padding: 0 var(--space-4);
}

.magic-link-form {
    margin-top: var(--space-3);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.magic-link-form .input-group {
    position: relative;
    margin-bottom: var(--space-3);
}

.email-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: var(--transition-base);
    background: var(--bg-white);
    color: var(--text-primary);
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.magic-link-button {
    width: 100%;
    padding: var(--space-2) var(--space-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.magic-link-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-lg);
}

.magic-link-button:active {
    transform: translateY(0);
}

.magic-link-button:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.login-container .message {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    display: none;
}

.login-container .message.success {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid var(--success);
    display: block;
}

.login-container .message.error {
    background: var(--error-light);
    color: var(--error-dark);
    border: 1px solid var(--error);
    display: block;
}

.login-container .message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

.login-container .loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

.signup-note {
    margin: var(--space-3) 0;
    padding: var(--space-2);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
}

.login-container .footer {
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* =============================================
   Pricing Page Styles
   ============================================= */

.pricing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-5);
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--space-4);
    padding: var(--space-3) 0;
}

.pricing-header h1 {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-header p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Credit Info Box */
.credit-info-box {
    background: linear-gradient(135deg, #e8f0ff 0%, #f0f7ff 100%);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-3);
}

.credit-info-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    color: var(--primary);
}

.credit-info-header .icon {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

.credit-info-header h3 {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
}

.credit-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.credit-info-list li {
    display: flex;
    align-items: flex-start;
    font-size: var(--text-xs);
    color: var(--text-primary);
    line-height: 1.3;
}

.credit-info-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    font-size: var(--text-sm);
    margin-right: var(--space-1);
    flex-shrink: 0;
    line-height: 1.3;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--bg-white);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-5px);
}

.promo-section {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
}

.promo-title {
    font-size: var(--text-base);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.promo-form {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    flex-wrap: wrap;
}

.promo-input-group {
    flex: 1;
    min-width: 250px;
}

.promo-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    text-transform: uppercase;
}

.promo-input:focus {
    outline: none;
    border-color: var(--primary);
}

.promo-buttons {
    display: flex;
    gap: var(--space-2);
}

.btn-promo {
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.btn-redeem {
    background: #22c55e;
    color: white;
    display: none;
}

.btn-redeem:hover {
    background: #16a34a;
}

.promo-message {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    display: none;
}

.promo-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}

.promo-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.pricing-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    transition: all var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.pricing-card.popular {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    right: var(--space-4);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--bg-white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-badge.popular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pricing-badge.value {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.package-name {
    font-size: var(--text-lg);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.package-credits {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0;
    line-height: 1;
}

.package-credits-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.package-price {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1;
}

.package-price-per {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-3) 0;
    flex: 1;
}

.package-features li {
    padding: var(--space-1) 0;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    line-height: 1.3;
    font-size: var(--text-sm);
}

.package-features li::before {
    content: "✓";
    color: #22c55e;
    font-weight: bold;
    font-size: var(--text-lg);
    font-family: monospace;
}

.buy-button {
    width: 100%;
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.policy-section {
    background: var(--bg-gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    text-align: center;
}

.policy-title {
    font-size: var(--text-base);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.policy-text {
    color: var(--text-secondary);
    font-size: var(--text-xs);
    line-height: 1.5;
    margin-bottom: var(--space-2);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: var(--bg-white);
    padding: var(--space-10);
    border-radius: var(--radius-xl);
    text-align: center;
}

.loading-overlay .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-5);
}

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

.loading-text {
    color: var(--text-primary);
    font-size: var(--text-base);
}

/* =============================================
   My Documents Page Styles
   ============================================= */

.documents-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-5);
}

.documents-header {
    padding: var(--space-4) 0;
    margin-bottom: var(--space-5);
}

.documents-header h1 {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--text-2xl);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.documents-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.back-link {
    display: inline-block;
    margin-bottom: var(--space-5);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-5px);
}

.document-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.document-card.expired {
    opacity: 0.6;
    background: var(--bg-gray-50);
}

.document-info {
    flex: 1;
}

.document-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.document-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.document-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-download {
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-download:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-download:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.status-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.status-badge.downloaded {
    background: #dcfce7;
    color: #166534;
}

.status-badge.not-downloaded {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

.expiry-warning {
    color: #f59e0b;
    font-size: var(--text-xs);
    font-weight: 600;
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.empty-state {
    text-align: center;
    padding: 80px var(--space-5);
    color: #94a3b8;
}

.empty-state h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.empty-state p {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
}

.empty-state a {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-base);
}

.empty-state a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.loading-state {
    text-align: center;
    padding: 60px var(--space-5);
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

.documents-container .loading-spinner,
.loading-state .loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-4);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.pagination button {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-base);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
}

/* =============================================
   Form Validation Error Styles
   ============================================= */

.input-error {
    display: none;
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
    font-weight: 500;
}

.input-error.show {
    display: block;
}

.input-group.error input,
.input-group.error textarea {
    border-color: var(--error);
    background-color: rgba(239, 68, 68, 0.05);
}

.input-group.error input:focus,
.input-group.error textarea:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group.success input,
.input-group.success textarea {
    border-color: var(--success);
}

/* =============================================
   Toast Notification System
   ============================================= */

.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--bg-white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    pointer-events: auto;
    min-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hiding {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-icon {
    flex-shrink: 0;
}

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

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
    color: var(--text-muted);
    transition: color var(--transition-base);
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-light);
}

/* Pricing Grid Responsive Layout */
@media (max-width: 1199px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

@media (max-width: 767px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .pricing-header h1 {
        font-size: var(--text-3xl);
    }

    .pricing-header p {
        font-size: var(--text-base);
    }
}

/* Mobile Toast Styles */
@media (max-width: 767px) {
    .toast-container {
        bottom: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        max-width: none;
    }

    .toast {
        min-width: auto;
    }
}

/* =============================================
   Extra Small Devices (320px - iPhone SE)
   ============================================= */
@media (max-width: 374px) {
    /* Ensure proper spacing on very small screens */
    :root {
        --space-1: 4px;
        --space-2: 6px;
        --space-3: 10px;
        --space-4: 14px;
        --space-5: 18px;
    }

    /* Reduce font sizes slightly for better fit */
    .btn {
        font-size: var(--text-sm);
        padding: var(--space-2) var(--space-3);
    }

    .btn-lg {
        font-size: var(--text-base);
        padding: var(--space-3) var(--space-4);
    }

    /* Ensure containers don't overflow */
    .container,
    .pricing-container,
    .documents-container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Reduce heading sizes for better fit */
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    /* Make sure job cards don't overflow */
    .job-card {
        padding: var(--space-4);
    }

    /* Reduce modal padding */
    .modal-content {
        padding: var(--space-4);
    }

    #formattingForm {
        padding: var(--space-4);
    }

    /* Ensure progress bar container fits */
    .progress-bar-container {
        max-width: 100%;
        padding: 0;
    }

    /* Make pricing cards stack with less padding */
    .pricing-card {
        padding: var(--space-5);
    }

    .package-credits {
        font-size: 40px;
    }

    .package-price {
        font-size: 32px;
    }

    /* Reduce credit info box padding */
    .credit-info-box {
        padding: var(--space-3) var(--space-4);
    }
}
