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

:root {
    /* Primary Brand Colors (Innovative Euforia Enterprises Palette) */
    --primary: #02a4cb;
    --primary-hover: #0284a2;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --primary-glow: rgba(2, 164, 203, 0.12);
    --accent-magenta: #dd0488;
    --accent-amber: #fcbd01;

    /* Background Colors (Canvas: #f9f9f9 as specified by user) */
    --bg-primary: #f9f9f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #eef2f6;

    /* Text Colors (High Contrast Charcoal & Slate) */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;

    /* Border Colors */
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --border-focus: var(--primary);

    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);

    /* Shadows for Light Surface */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

[data-theme="dark"],
[data-theme="moon"] {
    /* Background Colors (Moon Light / Night Theme) */
    --bg-primary: #0b1120;
    --bg-secondary: #131b2e;
    --bg-tertiary: #1e293b;
    --bg-elevated: #1e293b;
    --bg-input: #131b2e;
    --bg-hover: #26354a;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-placeholder: #64748b;

    /* Border Colors */
    --border-primary: #1e2d42;
    --border-secondary: #334155;

    /* Status Colors */
    --success-bg: rgba(16, 185, 129, 0.15);
    --error-bg: rgba(239, 68, 68, 0.15);
    --warning-bg: rgba(245, 158, 11, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ==================== TOP TOOLBAR ==================== */
.top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    min-height: 72px;
    padding: 0 48px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    box-sizing: border-box;
    width: 100%;
    backdrop-filter: blur(10px);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .top-toolbar,
[data-theme="moon"] .top-toolbar {
    background: rgba(19, 27, 46, 0.95);
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.toolbar-left .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    text-decoration: none;
}

.toolbar-left .logo h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Toolbar Actions (Save/Open buttons) */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border-secondary);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.toolbar-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toolbar-btn svg.spin {
    animation: spin 1s linear infinite;
}

.toolbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Platform Dropdown */
.platform-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-dropdown-wrapper label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.platform-dropdown-wrapper select {
    padding: 10px 40px 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 180px;
    transition: all var(--transition-fast);
}

.platform-dropdown-wrapper select:hover {
    border-color: var(--border-focus);
    background-color: var(--bg-hover);
}

.platform-dropdown-wrapper select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.platform-dropdown-wrapper select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
}

/* Center Progress Bar */
.center-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
}

.center-progress-bar {
    width: 240px;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.center-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    width: 0%;
    transition: width var(--transition-slow);
}

.center-progress-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.toolbar-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.toolbar-nav-btn.toolbar-logout-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    user-select: none;
    box-sizing: border-box;
}

.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.theme-toggle-btn .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

/* ==================== MAIN CONTAINER ==================== */
.container {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.panel {
    overflow-y: auto;
}

/* ==================== LEFT PANEL - CONFIGURATION ==================== */
.left-panel {
    width: 400px;
    min-width: 400px;
    max-width: 400px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-primary);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* ==================== RIGHT PANEL - PREVIEW ==================== */
.right-panel {
    flex: 1;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
}

/* ==================== CONFIG FORM ==================== */
.config-form {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
}

/* ==================== SECTIONS ==================== */
.section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-primary);
    transition: all var(--transition-fast);
}

.section:hover {
    border-color: var(--border-secondary);
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--border-secondary);
    background: var(--bg-hover);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-input);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-placeholder);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* ==================== FEATURES GRID ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-item:hover {
    border-color: var(--border-secondary);
    background: var(--bg-hover);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}

.checkbox-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
    line-height: 1.2;
}

.checkbox-item:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.checkbox-item:has(input:checked) .checkbox-label {
    color: var(--text-primary);
}

/* ==================== FILE UPLOAD ==================== */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    background: var(--bg-input);
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary);
    background: var(--primary-glow);
    color: var(--text-secondary);
}

.file-upload-label svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.file-upload-label span {
    font-size: 13px;
    font-weight: 500;
}

.file-upload-label .hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* Keystore info box */
.keystore-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.keystore-info svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.keystore-info-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

/* ==================== BUILD BUTTON ==================== */
.build-button,
.toolbar-right .build-button,
#build-button {
    width: auto !important;
    min-width: unset !important;
    max-width: fit-content !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 12px rgba(2, 164, 203, 0.3) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: all var(--transition-fast) !important;
}

.build-button:hover,
.toolbar-right .build-button:hover,
#build-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(2, 164, 203, 0.45) !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%) !important;
}

.build-button:active,
.toolbar-right .build-button:active,
#build-button:active {
    transform: translateY(0) !important;
    box-shadow: var(--shadow-sm) !important;
}

.build-button:disabled,
.toolbar-right .build-button:disabled,
#build-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.build-button svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* ==================== BUILD PROGRESS ==================== */
.build-progress {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--border-primary);
    flex-shrink: 0;
}

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

.progress-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

#progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    width: 0%;
    transition: width var(--transition-slow);
}

.progress-message {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== BUILD COMPLETE ==================== */
.build-complete {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 16px;
    border: 1px solid var(--success);
    text-align: center;
    flex-shrink: 0;
}

.close-complete-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

.success-icon svg {
    width: 28px;
    height: 28px;
}

.build-complete h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.download-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.download-btn.error {
    color: var(--error);
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.3);
    cursor: not-allowed;
}

.download-btn.error:hover {
    transform: none;
    background: var(--error-bg);
}

/* ==================== PREVIEW PANEL ==================== */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

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

.device-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.device-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.device-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.device-btn.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.device-btn svg {
    width: 20px;
    height: 20px;
}

/* ==================== PREVIEW CONTAINER ==================== */
.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

/* ==================== DEVICE FRAMES ==================== */
.device-frame {
    background: #000;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-slow);
    max-width: 100%;
    max-height: 100%;
}

.device-frame.mobile {
    width: 280px;
    height: 580px;
    border-radius: 40px;
    padding: 12px;
    border: 4px solid #1a1a1a;
}

.device-frame.tablet {
    width: 520px;
    height: 720px;
    border-radius: 32px;
    padding: 12px;
    border: 4px solid #1a1a1a;
}

.device-frame.laptop {
    width: 85%;
    max-width: 1000px;
    aspect-ratio: 16/10;
    border-radius: 16px;
    padding: 16px 16px 40px;
    height: auto;
    border: 4px solid #1a1a1a;
    position: relative;
}

.device-frame.laptop::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
}

.device-frame.desktop {
    width: 90%;
    max-width: 1100px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    padding: 12px;
    height: auto;
    border: 4px solid #1a1a1a;
}

.device-screen {
    width: 100%;
    height: 100%;
    background: #121212;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.device-frame.tablet .device-screen {
    border-radius: 24px;
}

.device-frame.laptop .device-screen,
.device-frame.desktop .device-screen {
    border-radius: 8px;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 16px;
    padding: 24px;
}

.placeholder-content svg {
    opacity: 0.4;
    width: 56px;
    height: 56px;
}

.placeholder-content p {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.preview-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 2;
}

.preview-loading p {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

.preview-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary, #6366f1);
    border-radius: 50%;
    animation: preview-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

#preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

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

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

/* Large Desktop (1920x1080 and above) */
@media (min-width: 1600px) {
    .left-panel {
        width: 440px;
        min-width: 440px;
        max-width: 440px;
        padding: 28px;
    }

    .right-panel {
        padding: 28px;
    }

    .section {
        padding: 24px;
        margin-bottom: 20px;
    }

    .top-toolbar {
        height: 72px;
        min-height: 72px;
        padding: 0 32px;
    }
}

/* Medium Desktop */
@media (min-width: 1200px) and (max-width: 1599px) {
    .device-frame.mobile {
        width: 260px;
        height: 540px;
    }

    .device-frame.tablet {
        width: 480px;
        height: 660px;
    }
}

/* Smaller Desktop / Laptop */
@media (max-width: 1199px) {
    .left-panel {
        width: 360px;
        min-width: 360px;
        max-width: 360px;
        padding: 20px;
    }

    .device-frame.mobile {
        width: 240px;
        height: 500px;
    }

    .device-frame.tablet {
        width: 420px;
        height: 580px;
    }
}

/* Tablet styles are handled in the dedicated responsive section below (<= 1024px) */

/* Mobile / Small Tablet */
@media (max-width: 768px) {
    .top-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .toolbar-left {
        order: 1;
        flex-wrap: wrap;
    }

    .toolbar-actions {
        margin-left: 16px;
        padding-left: 16px;
        gap: 6px;
    }

    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .toolbar-btn span {
        display: none;
    }

    .toolbar-right {
        order: 2;
    }

    .toolbar-nav-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .toolbar-nav-btn span {
        display: none;
    }

    .toolbar-center {
        order: 3;
        width: 100%;
        flex: none;
        justify-content: center;
    }

    .platform-dropdown-wrapper {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .platform-dropdown-wrapper select {
        width: 100%;
    }

    .center-progress {
        width: 100%;
        justify-content: center;
    }

    .center-progress-bar {
        flex: 1;
        max-width: 320px;
    }

    .container {
        flex-direction: column;
        height: auto;
        min-height: 0;
        flex: 1;
        overflow-y: auto;
    }

    .left-panel {
        width: 100%;
        min-width: auto;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
        max-height: none;
    }

    .config-form {
        overflow-y: visible;
    }

    .right-panel {
        min-height: 500px;
        flex: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

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

    .device-frame.laptop,
    .device-frame.desktop,
    .device-frame.tablet {
        width: 280px;
        height: 580px;
        aspect-ratio: auto;
        border-radius: 40px;
        padding: 12px;
    }

    .device-frame.laptop .device-screen,
    .device-frame.desktop .device-screen,
    .device-frame.tablet .device-screen {
        border-radius: 32px;
    }

    .device-frame.laptop::after {
        display: none;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn var(--transition-normal) ease;
}

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

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* ==================== TOOLBAR ICON BUTTON ==================== */
.toolbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.toolbar-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ==================== DIALOG ==================== */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn var(--transition-fast) ease;
}

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

.dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    animation: slideUp var(--transition-normal) ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
}

.dialog-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.dialog-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.dialog-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

/* ==================== SETTINGS GRID ==================== */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-grid .checkbox-item {
    padding: 16px;
}

.settings-grid .checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-grid .checkbox-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: inherit;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

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

/* ==================== ICON UPLOAD ==================== */
.icon-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-preview {
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
    flex-shrink: 0;
}

.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-preview.has-icon {
    border-style: solid;
    border-color: var(--success);
}

.icon-upload-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.icon-upload-info .file-upload {
    width: fit-content;
}

.icon-upload-info .file-upload-label {
    flex-direction: row;
    padding: 10px 16px;
    gap: 8px;
}

.icon-upload-info .file-upload-label svg {
    width: 18px;
    height: 18px;
}

.icon-upload-info .file-upload-label span {
    font-size: 13px;
}

/* ==================== APPLE SIGNING STYLES ==================== */

/* Apple signing notice (warning for non-macOS) */
.apple-signing-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.apple-signing-notice svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 1px;
}

.apple-signing-notice-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.apple-signing-notice-text strong {
    color: var(--warning);
    font-weight: 600;
}

/* Apple info box styling */
.apple-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Certificate validation info */
.certificate-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    margin-top: 8px;
    transition: all var(--transition-fast);
}

.certificate-info.validating {
    background: var(--primary-glow);
    color: var(--primary);
}

.certificate-info.success {
    background: var(--success-bg);
    color: var(--success);
}

.certificate-info.error {
    background: var(--error-bg);
    color: var(--error);
}

.certificate-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Provisioning profile info display */
.profile-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 12px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-primary);
}

.profile-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-row:first-child {
    padding-top: 0;
}

.profile-info-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-info-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

/* Spinning circle animation for loading */
.spin-circle {
    animation: spin 1s linear infinite;
    transform-origin: center;
}

@keyframes dashOffset {
    0% {
        stroke-dashoffset: 32;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -32;
    }
}

/* ==================== BUILDER VIEW SWITCHER (Mobile & Tablet) ==================== */
.builder-view-switcher {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.view-switch-btn {
    flex: 1;
    max-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-switch-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.view-switch-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.view-switch-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==================== RESPONSIVE DESIGN FOR TABLET & DESKTOP WINDOWS (<= 1024px) ==================== */
@media (max-width: 1024px) {
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    .top-toolbar {
        padding: 0 16px;
        height: 64px;
        min-height: 64px;
        gap: 12px;
    }

    .toolbar-left .logo {
        gap: 8px;
    }

    .toolbar-left .logo h1 {
        font-size: 18px;
    }

    .toolbar-left .logo-badge {
        display: none;
    }

    .toolbar-actions {
        gap: 6px;
    }

    /* Buttons with text collapse to sleek icons on Tablet & Phone */
    .toolbar-btn {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
        flex-shrink: 0;
    }

    .toolbar-btn span {
        display: none !important;
    }

    .toolbar-nav-btn {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
        gap: 0 !important;
        flex-shrink: 0;
    }

    .toolbar-nav-btn span {
        display: none !important;
    }

    .toolbar-icon-btn,
    .theme-toggle-btn {
        width: 38px;
        height: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
        flex-shrink: 0;
    }

    .platform-dropdown-wrapper label {
        display: none;
    }

    .platform-dropdown-wrapper select {
        min-width: 140px;
        font-size: 13px;
        padding: 8px 32px 8px 10px;
    }

    .center-progress-bar {
        width: 140px;
    }

    /* Build button collapses to sleek icon on Tablet and Phone */
    .build-button span,
    .toolbar-right .build-button span,
    #build-button span {
        display: none !important;
    }

    .build-button,
    .toolbar-right .build-button,
    #build-button {
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-md);
        gap: 0 !important;
        flex-shrink: 0;
    }

    #cancel-build-btn .btn-text {
        display: none !important;
    }

    #cancel-build-btn {
        padding: 6px 10px !important;
    }

    .builder-view-switcher {
        display: flex !important;
    }

    .container {
        flex-direction: column !important;
        overflow: visible !important;
        height: auto !important;
        flex: 1 0 auto !important;
    }

    /* By default (or show-config active), show left configuration panel full width */
    .container:not(.show-preview) .left-panel {
        display: flex !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        padding: 20px 16px !important;
        overflow-y: visible !important;
    }

    .container:not(.show-preview) .right-panel {
        display: none !important;
    }

    /* When user switches to Live Preview mode */
    .container.show-preview .left-panel {
        display: none !important;
    }

    .container.show-preview .right-panel {
        display: flex !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 20px 16px !important;
        min-height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
    }

    .preview-container {
        width: 100%;
        padding: 10px 0;
    }

    .device-frame.mobile {
        width: min(320px, 92vw) !important;
        height: min(640px, 75vh) !important;
    }

    .device-frame.tablet {
        width: min(540px, 94vw) !important;
        height: min(680px, 75vh) !important;
    }

    .device-frame.laptop,
    .device-frame.desktop {
        width: min(700px, 96vw) !important;
        height: auto !important;
    }
}

/* ==================== RESPONSIVE DESIGN FOR PHONES (<= 768px) ==================== */
@media (max-width: 768px) {
    .top-toolbar {
        height: auto;
        min-height: 56px;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .toolbar-left {
        order: 1;
        flex: 1 1 auto;
        justify-content: flex-start;
        gap: 8px;
    }

    .toolbar-left .logo h1 {
        font-size: 16px;
    }

    .toolbar-left .logo img {
        width: 28px;
        height: 28px;
    }

    .toolbar-right {
        order: 2;
        gap: 6px;
        flex-shrink: 0;
    }

    .toolbar-center {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--border-primary);
    }

    .platform-dropdown-wrapper {
        flex: 1;
        min-width: 0;
    }

    .platform-dropdown-wrapper select {
        width: 100%;
        min-width: 0;
        padding: 8px 30px 8px 10px;
        font-size: 13px;
        background-position: right 8px center;
    }

    .center-progress {
        width: 100%;
        padding: 0 4px;
        gap: 8px;
    }

    .center-progress-bar {
        flex: 1;
        width: auto;
    }

    .build-button span,
    .toolbar-right .build-button span,
    #build-button span {
        display: none !important;
    }

    .build-button,
    .toolbar-right .build-button,
    #build-button {
        width: 34px;
        height: 34px;
        min-width: 34px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-sm);
        gap: 0 !important;
        flex-shrink: 0;
    }

    .toolbar-btn {
        width: 34px;
        height: 34px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .toolbar-nav-btn {
        width: 34px;
        height: 34px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .toolbar-icon-btn,
    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    /* Configuration Sections on Phone */
    .section {
        padding: 16px 12px;
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        padding: 8px 12px;
    }

    /* Icon Upload */
    .icon-upload-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .icon-preview {
        width: 64px;
        height: 64px;
    }

    .icon-upload-info .file-upload {
        width: 100%;
    }

    .icon-upload-info .file-upload-label {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    /* Color picker and customizer groups */
    .color-picker-group,
    .screen-mode-options,
    .radio-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Build Progress & Complete Panels */
    .build-progress,
    .build-complete {
        padding: 16px 12px;
    }

    .progress-footer {
        flex-direction: row;
        align-items: center !important;
        justify-content: space-between;
        gap: 10px;
    }

    #cancel-build-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
    }

    .download-links {
        flex-direction: column;
        width: 100%;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    /* Settings Dialog on Phone */
    .dialog {
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
        margin: 10px !important;
        max-height: 90vh !important;
        border-radius: var(--radius-lg) !important;
    }

    .dialog-header {
        padding: 14px 16px;
    }

    .dialog-content {
        padding: 16px;
    }

    .dialog-footer {
        padding: 12px 16px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .settings-grid .checkbox-item {
        padding: 10px 12px;
    }
}

/* ==================== EXTRA SMALL PHONES (<= 420px) ==================== */
@media (max-width: 420px) {
    .top-toolbar {
        padding: 8px 10px;
    }

    .toolbar-left .logo h1 {
        font-size: 15px;
    }

    .build-button span {
        display: none;
    }

    .build-button,
    .toolbar-right .build-button,
    #build-button {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        border-radius: var(--radius-sm) !important;
    }

    .device-btn {
        width: 30px;
        height: 30px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .preview-header .device-selector {
        width: 100%;
        justify-content: space-between;
    }

    .view-switch-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
}

/* Modal Components */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn var(--transition-fast) ease;
}

.modal {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-primary, #e2e8f0);
    border-radius: var(--radius-xl, 16px);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp var(--transition-normal, 200ms) ease;
}

.modal.modal-small {
    max-width: 440px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary, #e2e8f0);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    border-radius: var(--radius-md, 8px);
    transition: all var(--transition-fast, 150ms);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover, #eef2f6);
    color: var(--text-primary, #0f172a);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    font-size: 0.95rem;
    color: var(--text-secondary, #475569);
    margin-bottom: 10px;
    line-height: 1.5;
}

.modal-body .warning-text {
    font-size: 0.85rem;
    color: #ef4444;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid var(--border-primary, #e2e8f0);
    background: var(--bg-tertiary, #f1f5f9);
}

.btn-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--radius-md, 8px) !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all var(--transition-fast, 150ms) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    transform: translateY(-1px) !important;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


