/* ==========================================================================
   Card Modern - Global Styles
   Modern card-based light theme with navy blue accents (#1e3a5f - #90cdf4)
   Reference: pic2.png
   ========================================================================== */

/* Blazor error UI - hidden by default, shown by framework on circuit errors */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 10px 20px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 12px;
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Variables */
:root {
    /* =================================================================
       Card Modern - CSS Variables
       Light theme with navy blue accents (#1e3a5f - #90cdf4)
       Reference: pic2.png
       ================================================================= */

    /* -----------------------------------------------------------------
       Primary Colors - Navy Blue Accent Theme
       ----------------------------------------------------------------- */
    --color-primary: #1e3a5f;
    /* Dark navy - main accent */
    --color-primary-medium: #2c5282;
    /* Medium navy - primary buttons */
    --color-primary-light: #4a90c2;
    /* Light navy - hover states */
    --color-primary-lighter: #90cdf4;
    /* Lightest navy - accents */

    /* -----------------------------------------------------------------
       Background Colors - Light Earth Tone Theme
       ----------------------------------------------------------------- */
    --color-bg-page: #F5F3F0;
    /* Page background - warm light gray */
    --color-bg-card: #FDFCFA;
    /* Card background - subtle warm off-white */
    --color-bg-surface: #EBE5DC;
    /* Surface/section/header background - warm beige */
    --color-bg-sidebar: #FAF9F7;
    /* Sidebar background - warm off-white */
    --color-bg-input: #FFFFFF;
    /* Input background - keep white for contrast */
    --color-bg-hover: #F5F2ED;
    /* Hover state background - light warm gray */

    /* -----------------------------------------------------------------
       Text Colors
       ----------------------------------------------------------------- */
    --color-text-primary: #1A1A2E;
    /* Primary text */
    --color-text-secondary: #4A4A68;
    /* Secondary text */
    --color-text-muted: #8C8CA1;
    /* Muted text */
    --color-text-inverse: #FFFFFF;
    /* Text on dark backgrounds */

    /* -----------------------------------------------------------------
       Border Colors - Warm Earth Tones
       ----------------------------------------------------------------- */
    --color-border-light: #E8E4DE;
    /* Light border - warm beige */
    --color-border-medium: #D9D4CC;
    /* Medium border - warm taupe */
    --color-border-dark: #C5BFB5;
    /* Dark border - warm gray */
    --color-divider: #E8E4DE;
    /* Divider lines - warm beige */

    /* -----------------------------------------------------------------
       Sidebar Colors
       ----------------------------------------------------------------- */
    --color-sidebar-bg: #FAF9F7;
    --color-sidebar-border: #E8E4DE;
    --color-sidebar-text: #1A1A2E;
    --color-sidebar-text-hover: #1e3a5f;
    --color-sidebar-active: #2c5282;
    --color-sidebar-active-bg: rgba(44, 82, 130, 0.1);

    /* -----------------------------------------------------------------
       Input Colors
       ----------------------------------------------------------------- */
    --color-input-bg: #FFFFFF;
    --color-input-border: #D1D1DB;
    --color-input-focus: #2c5282;
    --color-input-focus-ring: rgba(44, 82, 130, 0.2);
    --color-input-placeholder: #8C8CA1;

    /* -----------------------------------------------------------------
       Button Colors
       ----------------------------------------------------------------- */
    --color-btn-primary: #2c5282;
    --color-btn-primary-hover: #1e3a5f;
    --color-btn-primary-text: #FFFFFF;
    --color-btn-secondary: #F0EDE8;
    --color-btn-secondary-hover: #E5E1DA;
    --color-btn-secondary-text: #4A4A68;

    /* -----------------------------------------------------------------
       Status Colors
       ----------------------------------------------------------------- */
    --color-success: #00C853;
    --color-success-light: rgba(0, 200, 83, 0.15);
    --color-success-hover: #00E676;
    --color-warning: #FFB74D;
    --color-warning-light: rgba(255, 183, 77, 0.15);
    --color-warning-hover: #FFCC80;
    --color-error: #EF5350;
    --color-error-light: rgba(239, 83, 80, 0.15);
    --color-error-hover: #FF8A80;
    --color-info: #2c5282;
    --color-info-light: rgba(44, 82, 130, 0.15);
    --color-info-hover: #4a90c2;

    /* -----------------------------------------------------------------
       Shadows
       ----------------------------------------------------------------- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    /* Small shadow */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    /* Medium shadow */
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    /* Large shadow */
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    /* Extra large shadow */
    --shadow-glow: 0 0 20px rgba(44, 82, 130, 0.3);
    /* Navy blue glow */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Card shadow */

    /* -----------------------------------------------------------------
       Border Radius
       ----------------------------------------------------------------- */
    --radius-sm: 6px;
    /* Small radius - buttons, inputs */
    --radius-md: 8px;
    /* Medium radius - cards, panels */
    --radius-lg: 12px;
    /* Large radius - modals, large cards */
    --radius-xl: 16px;
    /* Extra large - full layout cards */
    --radius-full: 9999px;
    /* Full pill shape - badges, pills */

    /* -----------------------------------------------------------------
       Spacing Scale
       ----------------------------------------------------------------- */
    --spacing-xs: 4px;
    /* Extra small */
    --spacing-sm: 8px;
    /* Small */
    --spacing-md: 16px;
    /* Medium */
    --spacing-lg: 24px;
    /* Large */
    --spacing-xl: 32px;
    /* Extra large */
    --spacing-xxl: 48px;
    /* Double extra large */

    /* -----------------------------------------------------------------
       Typography
       ----------------------------------------------------------------- */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;

    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.3;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;

    /* -----------------------------------------------------------------
       Transitions
       ----------------------------------------------------------------- */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* -----------------------------------------------------------------
       Z-Index Scale
       ----------------------------------------------------------------- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;

    /* -----------------------------------------------------------------
       Gradients
       ----------------------------------------------------------------- */
    --gradient-primary: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    --gradient-primary-light: linear-gradient(135deg, #4a90c2 0%, #2c5282 100%);
    --gradient-success: linear-gradient(135deg, #00C853 0%, #00A843 100%);
    --gradient-warning: linear-gradient(135deg, #FFB74D 0%, #FFA726 100%);
    --gradient-error: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
}

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

html,
body {
    height: 100%;
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 var(--spacing-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text-primary);
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
}

p {
    margin: 0 0 var(--spacing-md);
    line-height: 1.6;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

code,
pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-bg-hover);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
}

/* ==========================================================================
   Buttons - Card Modern with Enhanced Shadows and Glow
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    background: var(--gradient-primary);
    color: var(--color-btn-primary-text);
    box-shadow: var(--shadow-md), 0 0 20px rgba(44, 82, 130, 0.25);
    position: relative;
    overflow: hidden;
}

/* Button inner glow effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled) {
    box-shadow: var(--shadow-lg), 0 0 30px rgba(44, 82, 130, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(1);
    box-shadow: var(--shadow-sm), 0 0 15px rgba(44, 82, 130, 0.2);
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-btn-primary-text);
    border-color: var(--color-btn-primary);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--color-btn-secondary);
    color: var(--color-btn-secondary-text);
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-btn-secondary-hover);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-md);
}

/* Success Button */
.btn-success {
    background: var(--gradient-success);
    color: white;
    border-color: var(--color-success);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Warning Button */
.btn-warning {
    background: var(--gradient-warning);
    color: #1A1A2E;
    border-color: var(--color-warning);
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Danger/Error Button */
.btn-danger,
.btn-error {
    background: var(--gradient-error);
    color: white;
    border-color: var(--color-error);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover:not(:disabled),
.btn-error:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Info Button */
.btn-info {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--color-info);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.btn-info:hover:not(:disabled) {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

/* Icon Button */
.btn-icon {
    padding: 10px;
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

/* Small Button */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

/* Large Button */
.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

/* Button Variants */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.btn-link {
    background: transparent;
    color: var(--color-primary);
    border: none;
    box-shadow: none;
    padding: 10px 16px;
}

.btn-link:hover:not(:disabled) {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Toolbar Button - Card Modern with Hover Glow
   ========================================================================== */

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.toolbar-btn:hover {
    background: linear-gradient(135deg, var(--color-bg-hover) 0%, var(--color-bg-card) 100%);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    box-shadow: var(--shadow-md), 0 0 15px rgba(44, 82, 130, 0.15);
    transform: translateY(-1px);
}

.toolbar-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md), 0 0 20px rgba(44, 82, 130, 0.3);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Pagination Button */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--color-bg-hover);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.pagination-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--color-primary);
}

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

/* Wizard Navigation Buttons */
.wizard-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.wizard-action-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.wizard-action-primary:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

.wizard-action-secondary {
    background-color: var(--color-btn-secondary);
    color: var(--color-btn-secondary-text);
    border: 1px solid var(--color-border-light);
}

.wizard-action-secondary:hover {
    background-color: var(--color-btn-secondary-hover);
    color: var(--color-text-primary);
}

/* Header Action Button */
.header-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: transparent;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 14px;
}

.header-action:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Back Button - Card Modern with Glow Effect
   ========================================================================== */

.back-button {
    position: fixed;
    bottom: var(--spacing-xl);
    left: var(--spacing-xl);
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, #FAFAFA 100%);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 0, 0, 0.05);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.back-button:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: translateY(-3px) scale(1.02);
}

.back-button:active {
    transform: translateY(-1px) scale(1);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* File Action Button */
.file-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-action-btn:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-primary);
    border-color: var(--color-border-light);
}

/* Cell Action Button */
.cell-action-btn {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cell-action-btn:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 14px;
}

.form-label.required::after {
    content: " *";
    color: var(--color-error);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-input-focus);
    box-shadow: 0 0 0 3px var(--color-input-focus-ring);
}

.form-control::placeholder {
    color: var(--color-input-placeholder);
}

.form-control:disabled {
    background-color: var(--color-bg-hover);
    cursor: not-allowed;
    opacity: 0.7;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231A1A2E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-hint {
    margin-top: var(--spacing-xs);
    font-size: 13px;
    color: var(--color-text-secondary);
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ==========================================================================
   Cards & Panels - Card Modern with Enhanced Shadows and Backlighting
   ========================================================================== */

.card {
    background: linear-gradient(180deg, var(--color-bg-card) 0%, #FAFAFA 100%);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

/* Subtle backlight effect */
.card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 10%;
    right: 10%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(44, 82, 130, 0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-xl), 0 0 50px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.card:hover::after {
    opacity: 1;
}

.card-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-divider);
    background: linear-gradient(180deg, var(--color-bg-surface) 0%, #F5F5FA 100%);
    position: relative;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.3px;
}

.card-body {
    padding: var(--spacing-xl);
    background-color: var(--color-bg-card);
}

.card-footer {
    padding: var(--spacing-md) var(--spacing-xl);
    border-top: 1px solid var(--color-divider);
    background: linear-gradient(180deg, #F5F5FA 0%, var(--color-bg-surface) 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* Alerts */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    background-color: var(--color-success-light);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-warning {
    background-color: var(--color-warning-light);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

.alert-error {
    background-color: var(--color-error-light);
    border-color: var(--color-error);
    color: var(--color-error);
}

.alert-info {
    background-color: var(--color-info-light);
    border-color: var(--color-info);
    color: var(--color-info);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}

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

.table th {
    font-weight: 600;
    background-color: var(--color-bg-surface);
    color: var(--color-text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: var(--color-bg-hover);
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
}

.badge-secondary {
    background-color: var(--color-bg-surface);
    color: var(--color-text-primary);
}

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

.badge-warning {
    background-color: var(--color-warning-light);
    color: var(--color-warning);
}

.badge-error {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

.badge-info {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.success {
    background-color: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-dot.warning {
    background-color: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

.status-dot.error {
    background-color: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
}

.status-dot.info {
    background-color: var(--color-info);
    box-shadow: 0 0 8px var(--color-info);
}

/* Progress */
.progress {
    height: 8px;
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* Loaders */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 249, 250, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

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

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

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

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

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

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

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: var(--spacing-sm);
}

.p-2 {
    padding: var(--spacing-md);
}

.p-3 {
    padding: var(--spacing-lg);
}

.p-4 {
    padding: var(--spacing-xl);
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.align-items-end {
    align-items: flex-end;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

.gap-3 {
    gap: var(--spacing-lg);
}

.gap-4 {
    gap: var(--spacing-xl);
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.rounded {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

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

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

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

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.25s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* Responsive */
@media (max-width: 768px) {

    html,
    body {
        font-size: 13px;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Selection */
::selection {
    background: var(--color-primary-light);
    color: var(--color-text-inverse);
}

/* ========== CellListView Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   CellListView.razor.css - Card Modern
   Spreadsheet cell list with card-based grouped display
   Light theme with purple/violet accents
   ========================================================================== */

/* ==========================================================================
   Cell List Container - Card Modern with Centered Layout
   ========================================================================== */

.cell-list-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(44, 82, 130, 0.08);
    margin: var(--spacing-md) 0;
}

/* ==========================================================================
   Cell List Header - Sticky Card with Button Groups
   ========================================================================== */

.cell-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(180deg, var(--color-bg-card) 0%, var(--color-bg-surface) 100%);
    border-bottom: 1px solid var(--color-divider);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cell-list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

/* ==========================================================================
   Cell List Actions - Button Group Cards
   ========================================================================== */

.cell-list-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Button Group Card Container */
.btn-group-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), 0 0 12px rgba(44, 82, 130, 0.05);
    transition: all var(--transition-normal);
}

.btn-group-card:hover {
    box-shadow: var(--shadow-md), 0 0 20px rgba(44, 82, 130, 0.1);
    border-color: var(--color-border-medium);
}

/* Button Group with Label */
.btn-group-labeled {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

.btn-group-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    padding-left: var(--spacing-xs);
}

/* Inline Button Group */
.btn-group-inline {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-md);
    padding: 2px;
}

.btn-group-inline button,
.btn-group-inline .btn {
    border-radius: var(--radius-sm);
}

/* Divider between button groups */
.btn-group-divider {
    width: 1px;
    height: 32px;
    background-color: var(--color-divider);
    margin: 0 var(--spacing-sm);
}

.cell-list-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-bg-hover);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.cell-list-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 200px;
    color: var(--color-text-primary);
}

.cell-list-search input::placeholder {
    color: var(--color-text-muted);
}

/* Cell List */
.cell-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.cell-group {
    margin-bottom: var(--spacing-lg);
}

.cell-group-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cell-group-header:hover {
    background-color: var(--color-bg-hover);
}

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

.cell-group-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.cell-group-count {
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
}

/* Cell Items */
.cell-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 6px;
    border: 1px solid transparent;
    background-color: var(--color-bg-card);
}

.cell-item:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-primary-light);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.cell-item.selected {
    background-color: var(--color-info-light);
    border-color: var(--color-info);
}

.cell-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.cell-item.active .cell-item-name,
.cell-item.active .cell-item-value {
    color: white;
}

.cell-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.cell-item.selected .cell-checkbox {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.cell-item.active .cell-checkbox {
    background-color: white;
    border-color: white;
    color: var(--color-primary);
}

.cell-info {
    flex: 1;
    min-width: 0;
}

.cell-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-item-value {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.cell-item:hover .cell-item-actions {
    opacity: 1;
}

.cell-action-btn {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cell-action-btn:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-primary);
}

/* Color Indicators */
.cell-color-indicator {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border-light);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.cell-item.active .cell-color-indicator {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Empty State */
.cell-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.cell-list-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.cell-list-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-sm);
}

.cell-list-empty-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .cell-list-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }

    .cell-list-search input {
        width: 100%;
    }

    .cell-item-actions {
        opacity: 1;
    }

    .cell-item:hover {
        transform: none;
    }
}


/* ========== FileUpload Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   FileUpload.razor.css - Card Modern
   File upload component with card-based styling
   Light theme with purple/violet accents
   ========================================================================== */

/* ==========================================================================
   Upload Container - Card Modern Centered Layout
   ========================================================================== */

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: var(--spacing-md) var(--spacing-xl);
    background-color: var(--color-bg-page);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.upload-header {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    letter-spacing: -0.5px;
}

.upload-subheader {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* ==========================================================================
   Upload Area - Card Modern with Enhanced Borders and Shadow
   ========================================================================== */

.upload-area {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: linear-gradient(180deg, var(--color-bg-card) 0%, #FAFAFA 100%);
    border: 2px dashed var(--color-border-medium);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.03);
    position: relative;
}

/* Subtle inner glow */
.upload-area::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: transparent;
    border-radius: calc(var(--radius-xl) - 4px);
    border: 1px solid rgba(44, 82, 130, 0.05);
    pointer-events: none;
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, var(--color-bg-hover) 0%, var(--color-bg-card) 100%);
    transform: scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 50px rgba(44, 82, 130, 0.1);
}

.upload-area:hover::before {
    border-color: rgba(44, 82, 130, 0.15);
}

.upload-area.drag-over {
    border-color: var(--color-primary);
    border-style: solid;
    background: linear-gradient(180deg, rgba(44, 82, 130, 0.08) 0%, rgba(44, 82, 130, 0.02) 100%);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(44, 82, 130, 0.2);
    transform: scale(1.03);
}

/* Upload Content */
.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Upload Icon */
.upload-icon {
    margin-bottom: var(--spacing-lg);
    filter: drop-shadow(0 4px 8px rgba(44, 82, 130, 0.3));
}

/* Processing Indicator */
.processing-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.processing-indicator p {
    color: var(--color-text-secondary);
    margin: 0;
}

/* Spinner */
.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error Message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--color-error-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.error-message p {
    color: var(--color-error);
    margin: 0;
}

/* Retry Button */
.retry-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--color-error);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-button:hover {
    background-color: var(--color-error-hover);
    transform: translateY(-1px);
}

/* Button Row */
.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    width: 100%;
}

/* Upload Option */
.upload-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ==========================================================================
   Browse Button - Card Modern with Enhanced Effects
   ========================================================================== */

.browse-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(44, 82, 130, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Browse button shimmer effect */
.browse-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s ease;
}

.browse-button:hover::before {
    left: 100%;
}

.browse-button:hover {
    box-shadow: var(--shadow-xl), 0 0 40px rgba(44, 82, 130, 0.4);
    transform: translateY(-3px) scale(1.03);
}

.browse-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: var(--shadow-md), 0 0 20px rgba(44, 82, 130, 0.25);
}

.browse-button input[type="file"] {
    display: none;
}

.browse-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Instance Button (secondary style) */
.instance-button {
    background: var(--gradient-success);
}

/* File Type Hint */
.file-type-hint {
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: center;
}

/* Button Divider */
.button-divider {
    color: var(--color-text-muted);
    font-weight: 500;
    padding: 0 var(--spacing-sm);
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
    max-width: 600px;
    margin-top: var(--spacing-lg);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.file-item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.file-item-icon.spreadsheet {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin: 0;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Drop Overlay */
.file-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(44, 82, 130, 0.1);
    border: 3px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.file-upload-overlay-text {
    padding: var(--spacing-xl) var(--spacing-xxl);
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

    .upload-header {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: var(--spacing-lg);
    }

    .button-row {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .button-divider {
        display: none;
    }

    .browse-button {
        width: 100%;
        max-width: 300px;
    }

    .file-item {
        flex-wrap: wrap;
    }

    .file-item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: var(--spacing-sm);
    }
}


/* ========== MainView Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   MainView.razor.css - Card Modern
   Main application container with card-based sidebar and content layout
   Light theme with purple/violet accents
   ========================================================================== */

/* ==========================================================================
   Main View - Card Modern Layout with Margins
   Centered content with proper spacing on all sides
   ========================================================================== */

.main-view {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg-page);
    padding: var(--spacing-sm) var(--spacing-xxl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Auth Status Bar */
.auth-bar {
    width: 100%;
    margin-bottom: 12px;
}

.auth-bar-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 8px 0;
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.auth-user-name {
    font-weight: 600;
    color: #1A1A2E;
}

.auth-user-email {
    color: #8C8CA1;
}

.auth-guest-label {
    font-size: 14px;
    color: #8C8CA1;
    font-style: italic;
}

.auth-logout-btn,
.auth-signin-btn,
.auth-purchases-btn,
.auth-profile-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #E5E5EB;
    background: transparent;
    color: #4A4A68;
}

.auth-logout-btn:hover,
.auth-signin-btn:hover,
.auth-purchases-btn:hover,
.auth-profile-btn:hover {
    border-color: #9D4EDD;
    color: #9D4EDD;
    background: rgba(157, 78, 221, 0.05);
}

.auth-purchases-btn {
    border-color: #1e3a5f;
    color: #1e3a5f;
}

.auth-purchases-btn:hover {
    border-color: #1e3a5f;
    color: white;
    background: #1e3a5f;
}

.auth-profile-btn {
    border-color: #9D4EDD;
    color: #9D4EDD;
}

.auth-profile-btn:hover {
    border-color: #9D4EDD;
    color: white;
    background: #9D4EDD;
}

/* Responsive margins for main-view */
@media (max-width: 1200px) {
    .main-view {
        padding: var(--spacing-md) var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .main-view {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
}

.sidebar.collapsed {
    width: 64px;
    min-width: 64px;
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    color: var(--color-sidebar-text);
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
}

.nav-section {
    margin-bottom: var(--spacing-lg);
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--color-sidebar-text);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 4px;
    position: relative;
}

.nav-item:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-sidebar-text-hover);
    text-decoration: none;
    transform: translateX(4px);
}

.nav-item.active {
    background-color: var(--color-sidebar-active-bg);
    color: var(--color-sidebar-active);
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-sidebar-active);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--color-primary);
}

.nav-item-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item.active .nav-item-icon {
    opacity: 1;
}

.nav-item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.nav-item-badge {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
}

/* Main Content Area - Centered Layout */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-page);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Header - Sticky */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-xl);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: transparent;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 14px;
}

.header-action:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text-primary);
}

/* Content Container */
.content-container {
    flex: 1;
    background-color: transparent;
}

/* Content Panel - Card Style */
.content-panel {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    transition: box-shadow var(--transition-normal);
}

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

.content-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-divider);
    background-color: var(--color-bg-surface);
}

.content-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.content-panel-body {
    padding: var(--spacing-lg);
    background-color: var(--color-bg-card);
}

.content-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-divider);
    background-color: var(--color-bg-surface);
}

/* Footer */
.main-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-xl);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-lg);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Back Button - Card Modern with Glow Effect
   ========================================================================== */

.back-button {
    position: fixed;
    bottom: var(--spacing-xl);
    left: var(--spacing-xl);
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, #FAFAFA 100%);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 0, 0, 0.05);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.back-button:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: translateY(-3px) scale(1.02);
}

.back-button:active {
    transform: translateY(-1px) scale(1);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }

    .back-button {
        left: 276px;
    }
}

@media (max-width: 1024px) {
    .content-container {
        padding: var(--spacing-md);
    }

    .back-button {
        left: 244px;
    }
}

@media (max-width: 768px) {
    .main-view {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
    }

    .sidebar-nav {
        display: none;
    }

    .sidebar-nav.open {
        display: block;
    }

    .main-header {
        padding: var(--spacing-md);
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }

    .content-panel-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }

    .main-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .back-button {
        left: var(--spacing-md);
        bottom: var(--spacing-md);
    }
}


/* ========== PluginGeneratorWizard Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   PluginGeneratorWizard.razor.css - Card Modern
   Advanced plugin generator wizard with card-based layout
   Light theme with purple/violet accents
   ========================================================================== */

.plugin-wizard-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background-color: transparent;
}

.plugin-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-divider);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.plugin-wizard-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.plugin-wizard-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: var(--spacing-xs) 0 0;
}

/* Wizard Layout */
.plugin-wizard-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Steps Sidebar */
.wizard-steps-sidebar {
    width: 300px;
    min-width: 300px;
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border-light);
    padding: var(--spacing-md);
    overflow-y: auto;
}

.wizard-step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.wizard-step-item:hover {
    background-color: var(--color-bg-hover);
}

.wizard-step-item.active {
    background-color: var(--color-sidebar-active-bg);
    box-shadow: var(--shadow-sm);
}

.wizard-step-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--color-sidebar-active);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--color-primary);
}

.wizard-step-item.completed {
    opacity: 0.7;
}

.wizard-step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-bg-hover);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    flex-shrink: 0;
}

.wizard-step-item.active .wizard-step-number {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.wizard-step-item.completed .wizard-step-number {
    background-color: var(--color-success);
    color: white;
}

.wizard-step-content {
    flex: 1;
    min-width: 0;
}

.wizard-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.wizard-step-description {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Wizard Content Area */
.wizard-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wizard-content-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-divider);
    background-color: var(--color-bg-surface);
}

.wizard-content-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-sm);
}

.wizard-content-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

.wizard-content-body {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    background-color: var(--color-bg-page);
}

.wizard-content-section {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.wizard-content-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Sections */
.wizard-form-section {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.wizard-form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-divider);
}

.wizard-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

/* Preview Area */
.wizard-preview-area {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.wizard-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-divider);
}

.wizard-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.wizard-preview-tabs {
    display: flex;
    gap: var(--spacing-sm);
}

.wizard-preview-tab {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wizard-preview-tab:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.wizard-preview-tab.active {
    background: var(--gradient-primary);
    color: white;
}

.wizard-preview-body {
    padding: var(--spacing-lg);
    min-height: 300px;
    max-height: 500px;
    overflow: auto;
}

/* Code Preview */
.code-preview {
    background-color: #1A1A2E;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    overflow-x: auto;
    border: 1px solid var(--color-border-light);
}

.code-preview code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #E0E0E0;
    white-space: pre;
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-divider);
    background-color: var(--color-bg-surface);
}

.wizard-footer-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.wizard-footer-info {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .plugin-wizard-body {
        flex-direction: column;
    }

    .wizard-steps-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
        display: flex;
        overflow-x: auto;
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .wizard-step-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .wizard-step-content {
        display: none;
    }
}

@media (max-width: 768px) {
    .wizard-form-grid {
        grid-template-columns: 1fr;
    }

    .wizard-footer {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .wizard-footer-actions {
        width: 100%;
        justify-content: center;
    }
}


/* ========== SimplePluginWizard Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   SimplePluginWizard.razor.css - Card Modern
   Plugin generation wizard with card-based steps
   Light theme with purple/violet accents
   ========================================================================== */

.wizard-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background-color: transparent;
}

.wizard-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-divider);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.wizard-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-xs);
    letter-spacing: -0.5px;
}

.wizard-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Progress Steps */
.wizard-steps {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.wizard-step:hover {
    background-color: var(--color-bg-hover);
}

.wizard-step.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.wizard-step.completed {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.wizard-step.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-bg-hover);
    font-size: 13px;
    font-weight: 600;
}

.wizard-step.active .wizard-step-number {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.wizard-step.completed .wizard-step-number {
    background-color: var(--color-success);
    color: white;
}

.wizard-step-label {
    font-size: 14px;
    font-weight: 500;
}

.wizard-step-divider {
    flex: 1;
    height: 2px;
    background-color: var(--color-divider);
    margin: 0 var(--spacing-sm);
    border-radius: var(--radius-full);
}

.wizard-step.completed+.wizard-step-divider,
.wizard-step.active+.wizard-step-divider {
    background: linear-gradient(90deg, var(--color-success), var(--color-primary));
}

/* Wizard Content */
.wizard-content {
    flex: 1;
    padding: var(--spacing-lg);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
}

.wizard-section {
    display: none;
}

.wizard-section.active {
    display: block;
    animation: fadeIn var(--transition-normal);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-md);
}

.wizard-section-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 var(--spacing-lg);
    line-height: 1.6;
}

/* Form Grid */
.wizard-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.wizard-form-group {
    margin-bottom: 0;
}

/* Preview Section */
.wizard-preview {
    background-color: var(--color-bg-hover);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.wizard-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-divider);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-lg);
}

.wizard-footer-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.wizard-footer-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Wizard Actions */
.wizard-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.wizard-action-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.wizard-action-primary:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

.wizard-action-secondary {
    background-color: var(--color-btn-secondary);
    color: var(--color-btn-secondary-text);
    border: 1px solid var(--color-border-light);
}

.wizard-action-secondary:hover {
    background-color: var(--color-btn-secondary-hover);
    color: var(--color-text-primary);
}

/* ==========================================================================
   SimplePluginWizard Button Styles - Card Modern
   Additional button styles for SimplePluginWizard component
   These styles ensure all wizard buttons use the Card Modern purple theme
   ========================================================================== */

/* Base Wizard Button - Uses Card Modern purple gradient */
.wizard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    white-space: nowrap;
}

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

.wizard-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.wizard-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Primary Wizard Button - Next, Generate, Download */
.wizard-btn-primary,
.wizard-btn-next,
.wizard-btn-generate,
.wizard-btn-download {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.wizard-btn-primary:hover:not(:disabled),
.wizard-btn-next:hover:not(:disabled),
.wizard-btn-generate:hover:not(:disabled),
.wizard-btn-download:hover:not(:disabled) {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Secondary Wizard Button - Back */
.wizard-btn-secondary,
.wizard-btn-back {
    background-color: var(--color-btn-secondary);
    color: var(--color-btn-secondary-text);
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.wizard-btn-secondary:hover:not(:disabled),
.wizard-btn-back:hover:not(:disabled) {
    background-color: var(--color-btn-secondary-hover);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-md);
}

/* Success Wizard Button - New Project */
.wizard-btn-success,
.wizard-btn-new-project {
    background: var(--gradient-success);
    color: white;
    border-color: var(--color-success);
    box-shadow: var(--shadow-sm);
}

.wizard-btn-success:hover:not(:disabled),
.wizard-btn-new-project:hover:not(:disabled) {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

/* Danger Wizard Button - Retry */
.wizard-btn-danger,
.wizard-btn-retry {
    background: var(--gradient-error);
    color: white;
    border-color: var(--color-error);
    box-shadow: var(--shadow-sm);
}

.wizard-btn-danger:hover:not(:disabled),
.wizard-btn-retry:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Cancel Button */
.simple-wizard-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.simple-wizard-cancel-btn:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .wizard-steps {
        overflow-x: auto;
        padding: var(--spacing-sm);
        gap: var(--spacing-xs);
    }

    .wizard-step-label {
        display: none;
    }

    .wizard-content {
        padding: var(--spacing-md);
    }

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

    .wizard-footer {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .wizard-footer-left,
    .wizard-footer-right {
        width: 100%;
        justify-content: center;
    }
}


/* ========== PluginGeneratorWizard Additional Styles ========== */

/* Main wizard container - ensures proper layout with scrollable content */
.wizard-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    background-color: transparent;
    overflow: hidden;
}

/* Header top row with title and cancel button */
.wizard-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

/* Cancel button styling */
.wizard-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.wizard-cancel-btn:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

/* Fix wizard content to be scrollable with footer always visible */
.wizard-container .wizard-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: var(--spacing-lg);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

/* Download section specific styles */
.wizard-download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.download-ready,
.download-success,
.download-error,
.thank-you-page {
    max-width: 500px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
}

.plugin-summary h3 {
    margin: 0 0 var(--spacing-lg);
    color: var(--color-text-primary);
}

.summary-details p {
    margin: var(--spacing-sm) 0;
    color: var(--color-text-secondary);
}

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

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-success);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.error-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-error);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.thank-you-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.thank-you-message {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.thank-you-details {
    margin-bottom: var(--spacing-xl);
}

.shortcode-reminder code {
    background-color: var(--color-bg-hover);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.file-info {
    background-color: var(--color-bg-hover);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}


/* ========== PluginMetadataForm Styles ========== */

.metadata-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.metadata-form .form-section {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.metadata-form .form-section h3 {
    margin: 0 0 var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-divider);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.metadata-form .form-group {
    margin-bottom: var(--spacing-md);
}

.metadata-form .form-group:last-child {
    margin-bottom: 0;
}

.metadata-form .form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.metadata-form .form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    font-family: var(--font-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.metadata-form .form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
}

.metadata-form .form-input::placeholder {
    color: var(--color-text-muted);
}

.metadata-form .form-textarea {
    resize: vertical;
    min-height: 80px;
}

.metadata-form .form-input-short {
    max-width: 200px;
}

.metadata-form .form-hint {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 13px;
    color: var(--color-text-secondary);
}

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

.metadata-form .form-group-half {
    flex: 1;
}

.metadata-form select.form-input {
    cursor: pointer;
}

.metadata-form select.form-input option {
    padding: var(--spacing-sm);
}

.metadata-form select.form-input optgroup {
    font-weight: 600;
    color: var(--color-text-primary);
}

.validation-errors {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.validation-errors h4 {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-error);
    font-size: 14px;
}

.validation-errors ul {
    margin: 0;
    padding-left: var(--spacing-lg);
}

.validation-errors li {
    color: var(--color-error);
    font-size: 13px;
    margin-bottom: var(--spacing-xs);
}

.validation-errors li:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for metadata form */
@media (max-width: 768px) {
    .metadata-form .form-row {
        flex-direction: column;
    }

    .metadata-form .form-input-short {
        max-width: 100%;
    }
}


/* ========== PluginPreview Styles ========== */

.plugin-preview {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.preview-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
}

.preview-tab {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preview-tab:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.preview-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.preview-content {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    min-height: 300px;
}

.preview-info {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.data-groups-summary h4 {
    margin: 0 0 var(--spacing-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.group-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.group-color {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.group-name {
    font-weight: 500;
    color: var(--color-text-primary);
    flex: 1;
}

.group-type {
    font-size: 13px;
    color: var(--color-text-secondary);
    padding: 2px 8px;
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-sm);
}

.group-count {
    font-size: 13px;
    color: var(--color-text-muted);
}

.no-groups {
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 0;
}


/* ========== Preview Tab Components Styles ========== */

.admin-preview-tab,
.frontend-preview-tab,
.code-preview-tab,
.file-tree-tab {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-divider);
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.generate-btn:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

.preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    background-color: var(--color-bg-surface);
    border: 1px dashed var(--color-border-light);
    border-radius: var(--radius-lg);
    min-height: 200px;
}

.preview-empty p {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-text-secondary);
}

.preview-empty .hint {
    font-size: 13px;
    color: var(--color-text-muted);
}

.preview-frame {
    background-color: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    overflow: auto;
    max-height: 400px;
}

/* Code Preview Tab */
.code-file-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.code-file-selector label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.code-file-selector select {
    flex: 1;
    max-width: 300px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
    cursor: pointer;
}

.code-container {
    background-color: #1A1A2E;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: #252542;
    border-bottom: 1px solid #3a3a5c;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 13px;
    color: #E0E0E0;
    background-color: transparent;
    border: 1px solid #3a3a5c;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background-color: #3a3a5c;
}

.code-content {
    padding: var(--spacing-md);
    overflow-x: auto;
    max-height: 350px;
}

.code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #E0E0E0;
    white-space: pre;
}

/* File Tree Tab */
.file-tree {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.file-tree-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-primary);
}

.file-tree-item.folder {
    font-weight: 500;
}

.file-tree-item .icon {
    width: 20px;
    text-align: center;
}

.file-tree-children {
    margin-left: var(--spacing-lg);
    border-left: 1px solid var(--color-border-light);
    padding-left: var(--spacing-sm);
}


/* ========== SpreadsheetViewer Styles (Embedded for Compatibility) ========== */

/* ==========================================================================
   SpreadsheetViewer.razor.css - Card Modern
   Spreadsheet data grid with card-based styling
   Light theme with purple/violet accents
   ========================================================================== */

.spreadsheet-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-card);
}

.spreadsheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-divider);
}

.spreadsheet-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.spreadsheet-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.spreadsheet-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Toolbar */
.spreadsheet-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--color-bg-hover);
    border-bottom: 1px solid var(--color-divider);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding-right: var(--spacing-md);
    border-right: 1px solid var(--color-divider);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background-color: var(--color-bg-surface);
    color: var(--color-text-primary);
    border-color: var(--color-border-light);
}

.toolbar-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.toolbar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--color-divider);
}

/* Grid Container */
.spreadsheet-grid-container {
    flex: 1;
    overflow: auto;
    position: relative;
}

.spreadsheet-grid {
    display: table;
    border-collapse: collapse;
    min-width: 100%;
}

/* Grid Headers */
.spreadsheet-header-row {
    display: table-row;
    background-color: var(--color-bg-surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.spreadsheet-header-cell {
    display: table-cell;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-divider);
    border-right: 1px solid var(--color-divider);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.spreadsheet-header-cell:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.spreadsheet-header-cell.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

/* Grid Rows */
.spreadsheet-row {
    display: table-row;
    transition: background-color var(--transition-fast);
}

.spreadsheet-row:hover {
    background-color: var(--color-bg-hover);
}

.spreadsheet-row.active {
    background-color: var(--color-info-light);
}

.spreadsheet-row.selected {
    background-color: var(--color-info-light);
}

/* Grid Cells */
.spreadsheet-cell {
    display: table-cell;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 13px;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-divider);
    border-right: 1px solid var(--color-divider);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.spreadsheet-cell:hover {
    background-color: var(--color-bg-hover);
}

.spreadsheet-cell.active {
    background: var(--gradient-primary);
    color: white;
    position: relative;
}

.spreadsheet-cell.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--color-primary-light);
    pointer-events: none;
}

.spreadsheet-cell.row-header {
    font-weight: 600;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-surface);
    text-align: center;
}

.spreadsheet-cell.empty {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Color Cell */
.cell-color {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

/* Status Badges */
.cell-status {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.cell-status.success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.cell-status.warning {
    background-color: var(--color-warning-light);
    color: var(--color-warning);
}

.cell-status.error {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

.cell-status.info {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

/* Pagination */
.spreadsheet-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-divider);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--color-bg-hover);
    border-color: var(--color-text-muted);
}

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

.pagination-info {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* Empty State */
.spreadsheet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    min-height: 200px;
}

.spreadsheet-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.spreadsheet-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-sm);
}

.spreadsheet-empty-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .spreadsheet-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: flex-start;
    }

    .spreadsheet-toolbar {
        overflow-x: auto;
        padding: var(--spacing-sm);
    }

    .toolbar-group {
        border-right: none;
    }

    .spreadsheet-cell {
        max-width: 150px;
    }
}

/* ==========================================================================
   CellListView Component Styles - Card Modern
   Purple/violet accent theme (#7B2CBF - #E0AAFF)
   ========================================================================== */

/* Override cell-list-container with margins */
.cell-list-container {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--color-bg-page);
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-xxl);
    box-sizing: border-box;
    zoom: 0.82;
}

/* Fixed Header with Card Modern styling */
.cell-list-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--color-bg-card) 0%, var(--color-bg-surface) 100%);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.08);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-lg);
}

.header-title {
    margin-bottom: 0.75rem;
}

.header-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.sheet-name {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.3);
}

.header-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    align-items: flex-start;
}

/* Stacked nav buttons (Back to Upload + Convert/Advanced row) */
.nav-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

/* Row for Convert Spreadsheet + Advanced button */
.nav-btn-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Save button always pinned to far right */
.header-save-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* Spacer to push Save button to far right */
.header-spacer {
    flex: 1;
    min-width: 20px;
}

.sort-toggle-btn {
    min-width: 150px;
    padding: 0.625rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(44, 82, 130, 0.25);
}

.sort-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.4);
}

.profile-selector {
    min-width: 180px;
    padding: 0.625rem 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

.profile-selector:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
}

/* Profile selector with scroll (more than 10 items) */
.profile-selector.has-scroll {
    max-height: 300px;
}

/* Coming Soon profile options - grayed out and disabled */
.profile-selector option:disabled,
.profile-selector option.coming-soon-option {
    color: #999;
    background-color: #f5f5f5;
    font-style: italic;
}

.apply-profile-btn {
    min-width: 150px;
    padding: 0.625rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(44, 82, 130, 0.25);
}

.apply-profile-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.4);
}

.apply-profile-btn:disabled {
    background: var(--color-border-light);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

/* ISH Processing Toggle */
.ish-toggle-container {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.ish-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.ish-toggle-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.ish-toggle-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
}

/* ISH Slider */
.ish-slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    padding: 0.375rem 0.875rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: opacity 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.ish-slider-container.disabled {
    opacity: 0.5;
    background: var(--color-bg-surface);
}

.ish-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    min-width: 55px;
}

.ish-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gradient-primary);
    border-radius: 3px;
    cursor: pointer;
}

.ish-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.3);
    transition: all 0.2s ease;
}

.ish-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(44, 82, 130, 0.4);
}

/* Back to Upload Button */
.back-btn {
    min-width: 130px;
    padding: 0.625rem 1.25rem;
    background: var(--color-bg-card);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.4);
}

.back-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Sort to Pages Button */
.sort-page-btn {
    min-width: 120px;
    padding: 0.625rem 1.25rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}

.sort-page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.sort-page-btn:disabled {
    background: var(--color-border-light);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* Save Profile Button */
.save-profile-btn {
    min-width: 120px;
    padding: 0.625rem 1.25rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}

.save-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

/* Sheet Dropdown Container */
.sheet-dropdown-container {
    position: relative;
    min-width: 180px;
}

.sheet-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

.sheet-dropdown-trigger:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(44, 82, 130, 0.15);
}

.sheet-color-swatch {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.sheet-dropdown-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sheet-dropdown-arrow {
    font-size: 0.7rem;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.sheet-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    max-height: 280px;
    overflow-y: auto;
}

.sheet-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    color: var(--color-text-primary);
}

.sheet-dropdown-item:hover {
    background: var(--color-bg-hover);
}

.sheet-dropdown-item.selected {
    background: rgba(44, 82, 130, 0.1);
    font-weight: 600;
}

/* Add Sheet Button */
.add-sheet-btn {
    min-width: 100px;
    padding: 0.5rem 1rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}

.add-sheet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

/* Add Cell Button */
.add-cell-btn {
    min-width: 100px;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(44, 82, 130, 0.25);
}

.add-cell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.4);
}

/* LLFF Controls */
.llff-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.llff-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.llff-info, .llff-page-info {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.llff-page-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.llff-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text-primary);
}

.llff-page-btn:hover:not(:disabled) {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--color-primary);
}

.llff-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.llff-page-btn-active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: 600;
}

.llff-limit-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.llff-limit-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.llff-limit-input {
    width: 60px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    text-align: center;
    background: var(--color-bg-card);
    color: var(--color-text-primary);
}

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

.llff-change-btn {
    padding: 0 16px;
    height: 32px;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.llff-change-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
}

/* Cell List Content (Scrollable) */
.cell-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.cell-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--color-border-light);
}

.cell-row:hover {
    box-shadow: var(--shadow-md), 0 0 20px rgba(44, 82, 130, 0.08);
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
}

.cell-location {
    min-width: 60px;
    padding: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.3);
}

.cell-display {
    flex: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    transition: border-color 0.3s ease;
    background: var(--color-bg-card);
}

.cell-display:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.cell-input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--color-text-primary);
}

/* Cell Color Button */
.cell-color-btn {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.cell-color-btn:hover {
    box-shadow: var(--shadow-md), 0 0 15px rgba(44, 82, 130, 0.2);
    transform: scale(1.05);
    border-color: var(--color-primary);
}

/* Cell Color Dropdown */
.cell-color-dropdown {
    position: absolute;
    right: 0;
    top: 55px;
    width: 280px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    overflow: hidden;
}

.cell-color-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}

.cell-color-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.cell-color-close-btn:hover {
    opacity: 0.8;
}

.cell-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 55px);
    gap: 8px;
    padding: 0.75rem;
    max-height: 240px;
    overflow-y: auto;
    justify-content: center;
    background: var(--color-bg-surface);
}

.cell-color-option {
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    min-height: 55px !important;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.cell-color-option:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(44, 82, 130, 0.3);
}

/* Delete Cell Button */
.delete-cell-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: var(--gradient-error);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delete-cell-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(239, 83, 80, 0.3);
}

/* Color Palette Row */
.color-palette-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.palette-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.palette-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.palette-swatch {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin: 4px;
    flex-shrink: 0;
    border: 3px solid var(--color-border-light);
}

.palette-swatch:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(44, 82, 130, 0.3);
}

.palette-swatch.selected {
    border: 3px solid var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.3), 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.palette-swatch.greyed-out {
    filter: grayscale(50%);
    opacity: 0.4;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(44, 82, 130, 0.3);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Compose/Generate Buttons */
.compose-btn,
.save-instance-btn,
.generate-plugin-btn {
    min-width: 100px;
    padding: 0.625rem 1.25rem;
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.compose-btn {
    background: var(--gradient-primary-light);
    box-shadow: 0 2px 10px rgba(74, 144, 194, 0.25);
}

.compose-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 144, 194, 0.4);
}

/* Advanced Options Section (Web Only) */
.advanced-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.advanced-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.25);
}

.advanced-toggle-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4246 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.35);
}

.advanced-toggle-icon {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.advanced-options-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(108, 117, 125, 0.08);
    border: 1px solid rgba(108, 117, 125, 0.2);
    border-radius: var(--radius-md);
    animation: slideIn 0.2s ease-out;
}

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

/* Adjust ISH toggle and slider within advanced panel */
.advanced-options-panel .ish-toggle-container,
.advanced-options-panel .ish-slider-container {
    background: var(--color-bg-card);
    box-shadow: var(--shadow-xs);
}

/* Compact buttons in advanced panel */
.advanced-options-panel .compose-btn,
.advanced-options-panel .add-sheet-btn,
.advanced-options-panel .apply-profile-btn,
.advanced-options-panel .save-instance-btn {
    min-width: 80px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.save-instance-btn {
    background: var(--gradient-success);
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}

.save-instance-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.save-instance-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-plugin-btn {
    background: var(--gradient-success);
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.25);
}

.generate-plugin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.generate-plugin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Confirmation Dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.confirm-dialog {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl), 0 0 40px rgba(44, 82, 130, 0.15);
    border: 1px solid var(--color-border-light);
}

.confirm-dialog h3 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.confirm-dialog p {
    margin: 0 0 24px 0;
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.confirm-save-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
}

.confirm-dont-save-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: var(--gradient-error);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-dont-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(239, 83, 80, 0.4);
}

.confirm-cancel-btn {
    flex: 1;
    min-width: 80px;
    padding: 12px 20px;
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-cancel-btn:hover {
    background: var(--color-bg-hover);
    transform: translateY(-1px);
}

/* Empty States */
.empty-state,
.no-workbook {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-secondary);
}

.empty-state p,
.no-workbook p {
    font-size: 1.125rem;
    margin: 0;
}

/* Cell List Footer */
.cell-list-footer {
    position: sticky;
    bottom: 0;
    padding: 0.75rem 1.5rem;
    background: var(--color-bg-card);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-md);
}

/* Responsive for CellListView */
@media (max-width: 1200px) {
    .cell-list-container {
        padding: var(--spacing-md) var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .cell-list-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .cell-list-header {
        padding: 1rem;
    }

    .header-controls {
        gap: 0.5rem;
    }

    .cell-row {
        flex-wrap: wrap;
    }
}
