/* ============================================
   ZeroLabs Security - Component Styles
   Extends design-system.css
   ============================================ */

/*
   NOTE: Core CSS variables (colors, spacing, typography) are defined in design-system.css
   This file only adds component-specific styles and extends the design system.
*/

/* ===== Additional Component Variables ===== */
:root {
    /* Legacy aliases for backward compatibility */
    --bg-dark: var(--bg-base);
    --bg-primary: var(--bg-surface);
    --bg-secondary: var(--bg-subtle);
    --bg-tertiary: var(--bg-muted);
    --bg-card: var(--bg-surface);
    --bg-hover: var(--interactive-hover);
    --bg-input: var(--bg-subtle);

    /* Accent Colors - Light Mode */
    --accent-primary: var(--color-primary-500);
    --accent-primary-hover: var(--color-primary-600);
    --accent-cyan: var(--color-accent-600);
    --accent-green: var(--color-success-600);
    --accent-orange: var(--color-warning-600);
    --accent-red: var(--color-danger-600);
    --accent-yellow: var(--color-warning-500);
    --accent-purple: var(--color-primary-700);

    /* Border alias */
    --border-color: var(--border-default);
    --border-light: var(--border-strong);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary-500) 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent-600) 0%, var(--color-primary-500) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);

    /* Glow Shadow */
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Code/Terminal - Always dark background */
    --code-bg: #1e293b;
    --code-text: #e2e8f0;

    /* Sidebar */
    --sidebar-bg: var(--bg-surface);
    --sidebar-border: var(--border-default);

    /* Header */
    --header-bg: rgba(255, 255, 255, 0.95);

    /* Login */
    --login-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== Dark Theme Overrides ===== */
[data-theme="dark"] {
    /* Legacy aliases for backward compatibility */
    --bg-dark: var(--bg-base);
    --bg-primary: var(--bg-surface);
    --bg-secondary: var(--bg-subtle);
    --bg-tertiary: var(--bg-muted);
    --bg-card: var(--bg-surface);
    --bg-hover: var(--interactive-hover);
    --bg-input: var(--bg-sunken);

    /* Accent Colors - Dark Mode */
    --accent-primary: var(--color-primary-400);
    --accent-primary-hover: var(--color-primary-300);
    --accent-cyan: var(--color-accent-400);
    --accent-green: var(--color-success-500);
    --accent-orange: var(--color-warning-500);
    --accent-red: var(--color-danger-500);
    --accent-yellow: var(--color-warning-400);
    --accent-purple: var(--color-primary-400);

    /* Border alias */
    --border-color: var(--border-default);
    --border-light: var(--border-strong);

    /* Shadows */
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);

    /* Code/Terminal */
    --code-bg: #0d0d12;
    --code-text: #a5d6ff;

    /* Sidebar Dark */
    --sidebar-bg: var(--bg-surface);
    --sidebar-border: var(--border-default);

    /* Header Dark */
    --header-bg: rgba(24, 24, 27, 0.95);

    /* Login Dark */
    --login-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
.navbar {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 40px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

[data-theme="dark"] .navbar {
    box-shadow: none;
}

.nav-brand a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 12px;
}

.nav-user {
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.nav-logout {
    color: var(--accent-red) !important;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.theme-toggle i {
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle .fa-sun {
    color: var(--accent-orange);
}

.theme-toggle .fa-moon {
    color: var(--accent-purple);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: inline-block;
}

:root .theme-toggle .fa-moon {
    display: none;
}

:root .theme-toggle .fa-sun {
    display: inline-block;
}

/* ===== Container ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 80px 0 50px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Scan Form ===== */
.scan-form-container {
    max-width: 700px;
    margin: 0 auto 80px;
}

.scan-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="url"],
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

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

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-scan {
    width: 100%;
    padding: 18px;
    font-size: 17px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

/* ===== Auth Section ===== */
.auth-section {
    margin-bottom: 24px;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.toggle-label:hover {
    background: var(--bg-hover);
}

.toggle-label input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.toggle-label span {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-options {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 16px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.auth-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

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

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

.auth-options .form-group {
    margin-bottom: 16px;
}

.auth-options input,
.auth-options textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.auth-options input:focus,
.auth-options textarea:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.auth-options textarea {
    font-family: 'SF Mono', 'Consolas', monospace;
    resize: vertical;
    min-height: 100px;
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== Features Grid ===== */
.features {
    margin-top: 80px;
}

.features h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

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

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.feature-card ul {
    list-style: none;
}

.feature-card li {
    padding: 10px 0;
    color: var(--text-secondary);
    padding-left: 24px;
    font-size: 14px;
    position: relative;
}

.feature-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
}

/* ===== NEW: Scan Dashboard Layout ===== */
.scan-dashboard {
    display: flex;
    gap: 24px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 120px);
}

.scan-main-viewer {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scan-sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Viewer Header */
.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.viewer-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.viewer-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
}

.viewer-title h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.viewer-title h1.completed {
    color: var(--accent-green);
}

.scan-badge {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 20px;
    background: var(--accent-primary);
    color: white;
}

.scan-badge.web { background: var(--accent-primary); }
.scan-badge.server { background: var(--accent-cyan); }
.scan-badge.mobile { background: var(--accent-green); }
.scan-badge.binary { background: var(--accent-orange); }

.viewer-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.control-btn.control-primary.pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
}

/* Browser View */
.main-browser-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 500px;
}

.browser-chrome {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.browser-dots, .terminal-dots {
    display: flex;
    gap: 8px;
}

.browser-dots .dot, .terminal-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.browser-address-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-secondary);
    overflow: hidden;
}

.browser-address-bar i {
    color: var(--accent-green);
    font-size: 12px;
}

.browser-address-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-actions-bar {
    margin-left: auto;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-primary);
}

.action-badge.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.browser-viewport {
    flex: 1;
    position: relative;
    background: var(--code-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.browser-placeholder {
    text-align: center;
    padding: 60px;
}

.placeholder-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--code-text);
    margin-bottom: 10px;
}

.placeholder-content p {
    color: var(--text-muted);
    font-size: 14px;
}

.scan-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.scan-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: scanPulse 2s ease-out infinite;
}

.scan-circle.delay-1 { animation-delay: 0.5s; }
.scan-circle.delay-2 { animation-delay: 1s; }

@keyframes scanPulse {
    0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

.live-screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Terminal View - Always uses dark theme colors for terminal appearance */
.main-terminal-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 500px;
}

.terminal-chrome {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-title {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    color: var(--code-text);
    opacity: 0.7;
}

.terminal-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
}

.terminal-welcome {
    text-align: center;
    padding: 40px;
    color: var(--code-text);
    opacity: 0.7;
}

.ascii-art {
    font-size: 10px;
    color: var(--color-info-400);
    margin-bottom: 20px;
    display: block;
}

.term-line {
    padding: 3px 0;
    color: var(--code-text);
}

.term-line.system { color: var(--code-text); opacity: 0.7; }
.term-line.success { color: var(--color-success-400); }
.term-line.error { color: var(--color-danger-400); }
.term-line.warning { color: var(--color-warning-400); }

.term-time {
    color: var(--code-text);
    opacity: 0.5;
    margin-right: 12px;
}

/* Analyzed Pages Bar */
.analyzed-pages-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.pages-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.pages-header i {
    color: var(--accent-primary);
}

.pages-count {
    background: var(--accent-green);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.pages-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 80px;
    overflow-y: auto;
}

.page-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-secondary);
}

.page-tag i {
    color: var(--accent-green);
    font-size: 10px;
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.sidebar-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.sidebar-card h3 i {
    color: var(--accent-primary);
}

/* Progress Card */
.progress-card {
    text-align: center;
    padding: 32px 24px;
}

.progress-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-unit {
    font-size: 16px;
    color: var(--text-muted);
    margin-left: 2px;
}

.progress-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.status-dot.running {
    background: var(--accent-primary);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.status-dot.completed { background: var(--accent-green); }
.status-dot.error { background: var(--accent-red); }

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Info Card */
.info-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.target-url {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 11px;
}

.info-value.timer {
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--accent-cyan);
}

code.info-value {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'SF Mono', Consolas, monospace;
}

.stat-item .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Log Card */
.log-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.log-card .log-container {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.log-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

.log-card .log-entry {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
}

.log-card .log-entry:last-child {
    border-bottom: none;
}

.log-card .log-time {
    color: var(--accent-cyan);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 11px;
    flex-shrink: 0;
}

.log-card .log-msg {
    color: var(--text-secondary);
    word-break: break-word;
}

/* OTP Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 24px;
}

.modal-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.otp-input-group {
    margin-bottom: 28px;
}

.modal-card .otp-input {
    width: 100%;
    padding: 18px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    font-family: 'SF Mono', Consolas, monospace;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition);
}

.modal-card .otp-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

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

.modal-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-btn.secondary:hover {
    background: var(--bg-hover);
}

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

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

/* Responsive */
@media (max-width: 1200px) {
    .scan-dashboard {
        flex-direction: column;
    }
    .scan-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-card {
        flex: 1;
        min-width: 280px;
    }
    .log-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .scan-dashboard {
        padding: 16px;
    }
    .viewer-header {
        flex-direction: column;
        gap: 16px;
    }
    .viewer-title {
        flex-direction: column;
        text-align: center;
    }
    .browser-chrome {
        flex-wrap: wrap;
    }
    .browser-address-bar {
        order: 1;
        width: 100%;
    }
    .browser-actions-bar {
        order: 2;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* OLD: Scan Page (keeping for backward compatibility) */
.scan-page-layout {
    display: flex;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.scan-left-panel {
    flex: 1;
    min-width: 0;
}

.scan-right-panel {
    width: 500px;
    flex-shrink: 0;
}

.scan-header {
    text-align: center;
    margin-bottom: 40px;
}

.scan-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.scan-header h1.completed {
    color: var(--accent-green);
}

.scan-id code {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
}

/* ===== Progress Bar ===== */
.progress-section {
    margin-bottom: 32px;
}

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

.progress-bar {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-bar.completed {
    background: linear-gradient(90deg, var(--accent-green), #34d399);
}

.progress-bar.error {
    background: linear-gradient(90deg, var(--accent-red), #f87171);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

#progressPercent {
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
    }
}

/* ===== Info Cards ===== */
.scan-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.info-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.info-card h3 {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.info-card p {
    font-size: 14px;
    word-break: break-all;
    font-weight: 500;
}

/* ===== Log Section ===== */
.log-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.log-section h2 {
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-container {
    height: 300px;
    overflow-y: auto;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    line-height: 1.8;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: transparent;
}

.log-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.log-entry {
    padding: 6px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.log-time {
    color: var(--accent-cyan);
    margin-right: 12px;
    font-weight: 500;
}

/* ===== Pages Section ===== */
.pages-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.pages-section h2 {
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pages-section #pageCount {
    color: var(--accent-green);
    font-weight: 600;
}

.pages-container {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.page-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    border-left: 3px solid var(--accent-green);
}

.page-entry:last-child {
    margin-bottom: 0;
}

.page-icon {
    color: var(--accent-green);
    font-weight: bold;
}

.page-url {
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Browser View ===== */
.browser-view-header {
    margin-bottom: 16px;
}

.browser-view-header h2 {
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.browser-url-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
}

.url-icon {
    font-size: 14px;
    color: var(--accent-green);
}

.url-text {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-view-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    height: 400px;
    overflow: hidden;
}

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

.browser-icon {
    position: relative;
    margin-bottom: 24px;
    color: var(--accent-primary);
    opacity: 0.9;
}

.browser-icon i {
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

.browser-placeholder p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.browser-placeholder p small {
    color: var(--text-muted);
    font-size: 12px;
}

/* 스캐닝 애니메이션 */
.scanning-animation {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
}

.scanning-animation span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.scanning-animation span:nth-child(1) {
    animation-delay: -0.32s;
}

.scanning-animation span:nth-child(2) {
    animation-delay: -0.16s;
}

.scanning-animation span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.browser-screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-input);
}

.browser-actions {
    margin-top: 16px;
}

.action-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
}

.action-icon {
    font-size: 18px;
    color: var(--accent-primary);
}

.action-icon i {
    vertical-align: middle;
}

.action-text {
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ===== Report Page ===== */
.report-container {
    max-width: 1000px;
    margin: 0 auto;
}

.report-header {
    text-align: center;
    margin-bottom: 24px;
}

.report-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.report-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.loading {
    text-align: center;
    padding: 80px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* ===== Report Summary ===== */
.report-summary {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.grade-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.summary-info h2 {
    font-size: 20px;
    margin-bottom: 12px;
    word-break: break-all;
    font-weight: 600;
}

.summary-info p {
    color: var(--text-secondary);
    margin: 6px 0;
    font-size: 14px;
}

/* ===== Severity Cards ===== */
.severity-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.severity-card {
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.severity-card .count {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
}

.severity-card .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-secondary);
}

.severity-card.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}
.severity-card.critical .count { color: var(--accent-red); }

.severity-card.high {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.severity-card.high .count { color: var(--accent-orange); }

.severity-card.medium {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
}
.severity-card.medium .count { color: var(--accent-yellow); }

.severity-card.low {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}
.severity-card.low .count { color: var(--accent-green); }

/* ===== Sections ===== */
.section {
    margin-bottom: 40px;
}

.section h3 {
    font-size: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.severity-title {
    margin: 28px 0 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.severity-title.critical {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}
.severity-title.high {
    color: var(--accent-orange);
    background: rgba(245, 158, 11, 0.1);
}
.severity-title.medium {
    color: var(--accent-yellow);
    background: rgba(234, 179, 8, 0.1);
}
.severity-title.low {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

/* ===== Vulnerability Cards ===== */
.vuln-card {
    background: var(--bg-secondary);
    border-left: 4px solid var(--text-muted);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.vuln-card:hover {
    background: var(--bg-hover);
}

.vuln-card.critical { border-left-color: var(--accent-red); }
.vuln-card.high { border-left-color: var(--accent-orange); }
.vuln-card.medium { border-left-color: var(--accent-yellow); }
.vuln-card.low { border-left-color: var(--accent-green); }

.vuln-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}

.badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge.critical { background: var(--accent-red); color: white; }
.badge.high { background: var(--accent-orange); color: white; }
.badge.medium { background: var(--accent-yellow); color: var(--bg-base); }
.badge.low { background: var(--accent-green); color: white; }

.vuln-desc {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 14px;
}

.vuln-location {
    font-size: 12px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.vuln-rec {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-success-400);
}

.vuln-payload {
    font-size: 13px;
    color: var(--accent-orange);
    margin-bottom: 12px;
}

.vuln-payload code {
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
}

/* ===== PoC Section ===== */
.poc-section {
    margin-top: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.poc-header {
    background: var(--bg-tertiary);
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.poc-header:hover {
    background: var(--bg-hover);
}

.poc-toggle {
    font-size: 12px;
    color: var(--accent-primary);
}

.poc-content {
    padding: 20px;
    background: var(--bg-input);
}

.poc-item {
    margin-bottom: 20px;
}

.poc-item:last-child {
    margin-bottom: 0;
}

.poc-item h5 {
    color: var(--accent-cyan);
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}

.poc-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.poc-steps {
    padding-left: 20px;
    color: var(--text-secondary);
}

.poc-steps li {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14px;
}

.poc-code {
    background: var(--code-bg);
    padding: 18px;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    color: var(--code-text);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

.curl-command {
    color: var(--accent-green);
}

.copy-btn {
    margin-top: 12px;
    padding: 10px 18px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition);
}

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

.payload-list {
    list-style: none;
    padding: 0;
}

.payload-list li {
    margin-bottom: 8px;
}

.payload-list code {
    background: rgba(245, 158, 11, 0.15);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-orange);
    font-family: 'SF Mono', Consolas, monospace;
}

.remediation-list {
    padding-left: 20px;
    color: var(--color-success-400);
}

.remediation-list li {
    margin-bottom: 10px;
    font-size: 14px;
}

.recommendations {
    padding-left: 20px;
}

.recommendations li {
    margin-bottom: 16px;
    font-size: 14px;
}

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

.pages-list {
    max-height: 200px;
    overflow-y: auto;
}

.page-item {
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    color: var(--text-secondary);
}

.more {
    color: var(--text-muted);
    padding: 10px;
    font-size: 13px;
}

/* ===== Reports List ===== */
.reports-list-container h1 {
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 700;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

.report-icon {
    font-size: 36px;
}

.report-info {
    flex: 1;
}

.report-info h3 {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 600;
}

.report-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.3;
}

.empty-state h2 {
    margin-bottom: 12px;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    background: var(--bg-primary);
}

/* ===== Error Message ===== */
.error-message {
    text-align: center;
    padding: 48px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
}

.error-message h3 {
    color: var(--accent-red);
    margin-bottom: 12px;
}

/* ===== Options Section ===== */
.options-section {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.options-section h3 {
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.option-group {
    margin-bottom: 16px;
}

.option-row {
    display: flex;
    gap: 16px;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    background: var(--bg-input);
}

.checkbox-label:hover {
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: var(--accent-primary);
}

.option-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.option-group select:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.scan-status-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Report Tabs ===== */
.report-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-secondary);
}

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

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.category-icon {
    font-size: 28px;
}

.category-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px;
}

.category-count {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.category-severity-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    min-width: 24px;
}

.bar-segment.critical { background: var(--accent-red); }
.bar-segment.high { background: var(--accent-orange); }
.bar-segment.medium { background: var(--accent-yellow); }
.bar-segment.low { background: var(--accent-green); }

.category-vulns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-vuln {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.mini-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mini-badge.critical { background: var(--accent-red); }
.mini-badge.high { background: var(--accent-orange); }
.mini-badge.medium { background: var(--accent-yellow); }
.mini-badge.low { background: var(--accent-green); }

/* ===== Page Cards ===== */
.page-card {
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.page-card.critical { border-left: 4px solid var(--accent-red); }
.page-card.high { border-left: 4px solid var(--accent-orange); }
.page-card.medium { border-left: 4px solid var(--accent-yellow); }
.page-card.low { border-left: 4px solid var(--accent-green); }

.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.page-header:hover {
    background: var(--bg-tertiary);
}

.page-path {
    flex: 1;
    font-family: 'SF Mono', monospace;
    font-size: 13px;
}

.page-badges {
    display: flex;
    gap: 6px;
}

.mini-count {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.mini-count.critical { background: var(--accent-red); }
.mini-count.high { background: var(--accent-orange); }
.mini-count.medium { background: var(--accent-yellow); color: var(--bg-base); }
.mini-count.low { background: var(--accent-green); }

.page-toggle {
    color: var(--text-muted);
    font-size: 12px;
}

.page-vulns {
    padding: 20px 24px;
    background: var(--bg-input);
}

.page-vuln-item {
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.page-vuln-item:last-child {
    margin-bottom: 0;
}

.vuln-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 10px;
}

/* ===== PoC Card ===== */
.poc-intro {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.poc-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-warning-400);
    padding: 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
}

.no-poc {
    color: var(--text-secondary);
    text-align: center;
    padding: 48px;
}

.poc-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.poc-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px;
    background: var(--bg-tertiary);
}

.poc-header-main h3 {
    margin: 0;
    font-size: 16px;
}

.poc-info-table {
    width: 100%;
    border-collapse: collapse;
}

.poc-info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.poc-info-table td:first-child {
    width: 150px;
    color: var(--text-secondary);
    font-size: 13px;
}

.impact-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger-400);
    padding: 18px;
    border-radius: var(--radius-sm);
}

.reproduction-steps {
    margin: 0;
    padding-left: 24px;
}

.reproduction-steps li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.payload-box,
.curl-box {
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.payload-box pre,
.curl-box pre {
    padding: 18px;
    margin: 0;
    overflow-x: auto;
}

.payload-box code,
.curl-box code {
    color: var(--code-text);
    font-family: 'SF Mono', monospace;
    font-size: 13px;
}

.payloads-grid {
    display: grid;
    gap: 10px;
}

.payload-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.payload-item code {
    flex: 1;
    color: var(--code-text);
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    word-break: break-all;
}

.copy-mini {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

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

/* ===== Priority List ===== */
.priority-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.priority-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    border-left: 4px solid;
}

.priority-1 { border-left-color: var(--accent-red); }
.priority-2 { border-left-color: var(--accent-orange); }
.priority-3 { border-left-color: var(--accent-yellow); }
.priority-4 { border-left-color: var(--accent-green); }
.priority-5 { border-left-color: var(--accent-primary); }

.priority-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.priority-content {
    flex: 1;
}

.priority-content strong {
    display: block;
    margin-bottom: 6px;
}

.priority-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Severity Groups ===== */
.severity-group {
    margin-bottom: 28px;
}

.severity-group.critical .severity-title {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger-400);
}
.severity-group.high .severity-title {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning-400);
}
.severity-group.medium .severity-title {
    background: rgba(234, 179, 8, 0.15);
    color: var(--color-warning-300);
}
.severity-group.low .severity-title {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success-400);
}

/* ===== Admin Dashboard ===== */
.admin-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px;
}

.admin-header {
    text-align: center;
    margin-bottom: 48px;
}

.admin-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

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

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

.stat-value {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.stat-critical .stat-value { color: var(--accent-red); }
.stat-high .stat-value { color: var(--accent-orange); }
.stat-medium .stat-value { color: var(--accent-yellow); }

/* Admin Table */
.admin-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table thead {
    background: var(--bg-tertiary);
}

.admin-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition);
}

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

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

.scan-url {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.status-completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.status-stopped {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
}

/* Severity Badges */
.severity-dist {
    white-space: nowrap;
}

.sev-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 6px;
}

.sev-critical { background: rgba(239, 68, 68, 0.2); color: var(--accent-red); }
.sev-high { background: rgba(245, 158, 11, 0.2); color: var(--accent-orange); }
.sev-medium { background: rgba(234, 179, 8, 0.2); color: var(--accent-yellow); }
.sev-low { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.sev-info { background: rgba(99, 102, 241, 0.2); color: var(--accent-primary); }

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

/* Action Buttons */
.actions {
    white-space: nowrap;
    min-width: 140px;
    text-align: right;
}

.btn-action {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    margin-right: 8px;
    transition: var(--transition);
}

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

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

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

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

/* Empty State */
.no-data {
    padding: 80px 20px !important;
}

.row-error {
    background: rgba(239, 68, 68, 0.05);
}

/* ===== Login Page ===== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
    font-size: 14px;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 28px;
}

.modal-body p {
    color: var(--text-secondary);
    margin: 0 0 20px;
    font-size: 14px;
}

.otp-input-container {
    margin: 28px 0;
}

.otp-input {
    width: 100%;
    padding: 18px;
    font-size: 28px;
    text-align: center;
    letter-spacing: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'SF Mono', monospace;
    transition: var(--transition);
}

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

.otp-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.modal-footer {
    padding: 20px 28px 28px;
    display: flex;
    gap: 14px;
    justify-content: flex-end;
}

.otp-toggle {
    margin-top: 20px;
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.otp-toggle .hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .scan-page-layout {
        flex-direction: column;
    }
    .scan-right-panel {
        width: 100%;
    }
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    .hero h1 {
        font-size: 36px;
    }
    .scan-form {
        padding: 28px;
    }
    .scan-info {
        grid-template-columns: 1fr;
    }
    .severity-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .report-summary {
        flex-direction: column;
        text-align: center;
    }
    .option-row,
    .form-row {
        flex-direction: column;
    }
    .auth-tabs {
        flex-direction: column;
    }
    .report-content {
        padding: 28px;
    }
}

/* ===== Animation Classes ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.4s ease;
}

/* ===== Terminal View Styles ===== */
.terminal-view-header {
    margin-bottom: 16px;
}

.terminal-view-header h2 {
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.terminal-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
}

.terminal-target {
    color: var(--accent-cyan);
    font-weight: 500;
}

.terminal-status {
    padding: 4px 12px;
    background: var(--accent-primary);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.terminal-container {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    height: 380px;
    overflow: hidden;
    position: relative;
}

.terminal-output {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.7;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.terminal-welcome {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.terminal-ascii {
    display: block;
    white-space: pre;
    font-size: 10px;
    color: var(--color-info-400);
    margin-bottom: 20px;
    line-height: 1.2;
}

.terminal-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0;
    color: var(--code-text);
}

.terminal-time {
    color: var(--text-muted);
    font-size: 11px;
    min-width: 70px;
    flex-shrink: 0;
}

.terminal-prompt {
    color: var(--color-info-400);
    font-weight: bold;
    min-width: 16px;
}

.terminal-prefix {
    min-width: 16px;
    font-weight: bold;
}

.terminal-text {
    flex: 1;
    word-break: break-word;
}

/* Terminal line types */
.terminal-line.terminal-system {
    color: var(--text-muted);
}

.terminal-line.terminal-system .terminal-prompt {
    color: var(--text-muted);
}

.terminal-line.terminal-info .terminal-prefix {
    color: var(--color-info-400);
}

.terminal-line.terminal-success .terminal-prefix,
.terminal-line.terminal-success .terminal-text {
    color: var(--color-success-500);
}

.terminal-line.terminal-error .terminal-prefix,
.terminal-line.terminal-error .terminal-text {
    color: var(--color-danger-400);
}

.terminal-line.terminal-warning .terminal-prefix,
.terminal-line.terminal-warning .terminal-text {
    color: var(--color-warning-500);
}

/* Terminal Progress */
.terminal-progress {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.terminal-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.terminal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-info-400), var(--color-success-500));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.terminal-progress-fill.completed {
    background: linear-gradient(90deg, var(--color-success-500), var(--color-success-400));
}

.terminal-progress-fill.error {
    background: linear-gradient(90deg, var(--color-danger-400), var(--color-danger-600));
}

.terminal-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

#terminalProgressPercent {
    font-weight: 600;
    color: var(--accent-cyan);
}

#terminalCurrentTask {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* Terminal Stats */
.terminal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.terminal-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.terminal-stat .stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.terminal-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'SF Mono', Consolas, monospace;
}

#vulnCount {
    color: var(--accent-orange);
}

#scanItemCount {
    color: var(--accent-green);
}

#elapsedTime {
    color: var(--accent-purple);
}

/* Animation for new terminal lines */
@keyframes terminalLineIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.terminal-line {
    animation: terminalLineIn 0.2s ease-out;
}

/* ============================================
   SAST (Static Application Security Testing)
   ============================================ */

.sast-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.sast-header {
    text-align: center;
    padding: 40px 0 30px;
}

.sast-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.sast-header h1 i {
    color: var(--accent-primary);
}

.sast-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.sast-section {
    margin-bottom: 30px;
}

.sast-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

/* Source Tabs */
.source-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.source-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.source-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.source-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.source-tab i {
    font-size: 18px;
}

.source-tab-content {
    display: none;
}

.source-tab-content.active {
    display: block;
}

/* Scan Options */
.scan-options {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.scan-options h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.scan-options h3 i {
    color: var(--accent-primary);
}

.option-group {
    margin-bottom: 24px;
}

.option-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.checkbox-grid.scanners {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-item input:checked + .checkbox-custom {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-item input:checked + .checkbox-custom::after {
    content: '\2713';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-item.scanner {
    padding: 14px 18px;
}

.scanner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scanner-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.scanner-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Exclude Paths */
.exclude-paths {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.path-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-secondary);
}

.path-tag button {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: var(--transition);
}

.path-tag button:hover {
    opacity: 1;
}

.path-input-wrapper {
    display: flex;
    gap: 10px;
}

.path-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--text-primary);
}

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

.btn-add-path {
    padding: 12px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Severity Selector */
.severity-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.severity-option {
    cursor: pointer;
}

.severity-option input {
    display: none;
}

.severity-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    transition: var(--transition);
}

.severity-badge.critical {
    background: rgba(220, 38, 38, 0.15);
    color: var(--color-danger-600);
    border-color: rgba(220, 38, 38, 0.3);
}

.severity-badge.high {
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-warning-500);
    border-color: rgba(249, 115, 22, 0.3);
}

.severity-badge.medium {
    background: rgba(234, 179, 8, 0.15);
    color: var(--accent-yellow);
    border-color: rgba(234, 179, 8, 0.3);
}

.severity-badge.low {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info-500);
    border-color: rgba(59, 130, 246, 0.3);
}

.severity-badge.info {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
    border-color: rgba(107, 114, 128, 0.3);
}

.severity-option input:checked + .severity-badge {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Progress Section */
.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
}

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

.progress-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
}

.progress-header h2 i {
    color: var(--accent-primary);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-red);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--color-danger-700);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 50px;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.progress-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.progress-stat i {
    font-size: 20px;
    color: var(--accent-primary);
}

.progress-stat span {
    color: var(--text-secondary);
    font-size: 14px;
}

.progress-stat strong {
    margin-left: auto;
    font-size: 16px;
    color: var(--text-primary);
}

.progress-stat .vuln-count {
    color: var(--accent-orange);
}

.progress-log {
    background: var(--code-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 13px;
    font-weight: 600;
    color: var(--code-text);
}

.log-content {
    height: 200px;
    overflow-y: auto;
    padding: 16px 20px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
}

.log-content .log-entry {
    padding: 2px 0;
    color: var(--code-text);
}

.log-content .log-entry.error {
    color: var(--color-danger-400);
}

.log-content .log-entry.success {
    color: var(--color-success-500);
}

.log-content .log-entry.warning {
    color: var(--color-warning-500);
}

.log-content .log-time {
    color: var(--text-muted);
    margin-right: 12px;
}

/* Result Section */
.result-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 24px;
}

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

.summary-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.summary-header h2 i {
    color: var(--accent-primary);
}

.summary-actions {
    display: flex;
    gap: 10px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid transparent;
}

.summary-card.total {
    border-left-color: var(--accent-primary);
}

.summary-card.critical {
    border-left-color: var(--color-danger-600);
}

.summary-card.high {
    border-left-color: var(--color-warning-500);
}

.summary-card.medium {
    border-left-color: var(--accent-yellow);
}

.summary-card.low {
    border-left-color: var(--color-info-500);
}

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 20px;
}

.summary-card.total .card-icon { color: var(--accent-primary); }
.summary-card.critical .card-icon { color: var(--color-danger-600); }
.summary-card.high .card-icon { color: var(--color-warning-500); }
.summary-card.medium .card-icon { color: var(--accent-yellow); }
.summary-card.low .card-icon { color: var(--color-info-500); }

.summary-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-card .card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-card .card-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.chart-container h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.chart-container canvas {
    max-height: 200px;
}

/* Result Filters */
.result-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-buttons {
    display: flex;
    gap: 6px;
}

.filter-btn {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

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

.filter-btn.critical.active { background: var(--color-danger-600); border-color: var(--color-danger-600); }
.filter-btn.high.active { background: var(--color-warning-500); border-color: var(--color-warning-500); }
.filter-btn.medium.active { background: var(--accent-yellow); border-color: var(--accent-yellow); }
.filter-btn.low.active { background: var(--color-info-500); border-color: var(--color-info-500); }

.filter-select {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-group.search {
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
}

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

/* Result Table */
.result-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.result-table th {
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.result-table th.sortable:hover {
    color: var(--text-primary);
}

.result-table th.sortable i {
    margin-left: 6px;
    font-size: 10px;
    opacity: 0.5;
}

.result-table th.sort-asc i::before { content: '\f077'; }
.result-table th.sort-desc i::before { content: '\f078'; }
.result-table th.sort-asc i,
.result-table th.sort-desc i {
    opacity: 1;
    color: var(--accent-primary);
}

.result-table tbody tr {
    transition: var(--transition);
}

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

.result-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.result-table .file-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
}

.result-table code {
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'SF Mono', Consolas, monospace;
}

.cwe-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.cwe-link:hover {
    text-decoration: underline;
}

.scanner-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.btn-detail {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.btn-detail:hover {
    background: var(--accent-primary-hover);
    transform: scale(1.1);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}

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

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

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

.page-numbers {
    display: flex;
    gap: 6px;
}

.page-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.page-num:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.page-num.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-muted);
}

.page-size-select {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    margin-left: 20px;
}

/* Detail Modal */
.detail-modal {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-title h2 {
    font-size: 18px;
    font-weight: 700;
    font-family: 'SF Mono', Consolas, monospace;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-red);
    color: white;
}

.modal-body {
    padding: 24px;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.detail-section h4 i {
    color: var(--accent-primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
}

.detail-value code {
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    word-break: break-all;
}

.detail-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

.code-snippet {
    background: var(--code-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-snippet pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.remediation {
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
}

.reference-links {
    list-style: none;
    padding: 0;
}

.reference-links li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.reference-links li:last-child {
    border-bottom: none;
}

.reference-links a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 14px;
    word-break: break-all;
}

.reference-links a:hover {
    text-decoration: underline;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

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

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

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

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

/* Responsive */
@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .summary-charts {
        grid-template-columns: 1fr;
    }

    .progress-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sast-form {
        padding: 24px;
    }

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

    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .pagination {
        flex-wrap: wrap;
    }
}

/* ============================================
   NEW: Modern Sidebar Layout System
   ============================================ */

/* App Layout Container */
.app-layout {
    min-height: 100vh;
    background: var(--bg-dark);
}

/* ===== Mobile Header ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.mobile-brand i {
    color: var(--accent-primary);
    font-size: 20px;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ===== Sidebar Navigation ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1003;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: 72px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
}

.brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
}

.brand-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

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

.sidebar-collapse-btn i {
    transition: transform 0.3s ease;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    min-width: 24px;
    text-align: center;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.nav-link.active i {
    color: var(--accent-primary);
}

.nav-text {
    transition: opacity 0.2s ease, width 0.2s ease;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

.user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.user-actions {
    flex-shrink: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    background: transparent;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-actions {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 16px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.collapsed .sidebar-collapse-btn {
    position: absolute;
    right: -14px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .user-menu {
    justify-content: center;
    padding: 12px;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== Main Wrapper ===== */
/* Note: Main .main-wrapper styles defined in layout.css */

/* ===== Top Header ===== */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    flex: 1;
}

.header-center {
    flex: 2;
    justify-content: center;
}

.header-right {
    flex: 1;
    justify-content: flex-end;
    gap: 12px;
}

/* Breadcrumb */
.breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
}

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

.search-shortcut {
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-muted);
}

/* Icon Buttons */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

/* Notification Badge */
.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Theme Toggle */
.theme-toggle-btn .theme-icon-dark,
.theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .theme-icon-light,
[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .theme-icon-dark,
[data-theme="dark"] .theme-icon-dark {
    display: block;
}

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

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-btn:hover {
    border-color: var(--border-light);
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 12px;
}

.user-name-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-menu-btn i.fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

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

.dropdown-item.text-danger {
    color: var(--accent-red);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
}

/* ===== Auth Wrapper (Login page) ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   NEW: Modern Login Page Styles
   ============================================ */

.login-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--login-bg);
    overflow: hidden;
}

/* Background Pattern */
.login-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 48px;
    animation: float 20s ease-in-out infinite;
}

.float-icon.icon-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.float-icon.icon-2 {
    top: 20%;
    right: 15%;
    animation-delay: -4s;
    font-size: 36px;
}

.float-icon.icon-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: -8s;
    font-size: 42px;
}

.float-icon.icon-4 {
    bottom: 15%;
    right: 25%;
    animation-delay: -12s;
    font-size: 32px;
}

.float-icon.icon-5 {
    top: 50%;
    left: 5%;
    animation-delay: -16s;
    font-size: 28px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* Login Card */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: cardFadeIn 0.6s ease-out;
    border: 1px solid var(--border-color);
}

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

/* Shake Animation for Error */
.login-card.shake {
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Logo */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 32px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Login Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-red);
    font-size: 14px;
    margin-bottom: 24px;
    animation: errorSlideIn 0.3s ease-out;
}

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

.login-error i {
    font-size: 18px;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form label i {
    font-size: 14px;
    color: var(--accent-primary);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

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

.input-wrapper input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.input-wrapper.focused input {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

/* Focus Border Animation */
.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.input-wrapper.focused .input-focus-border {
    width: calc(100% - 4px);
}

/* Password Toggle */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.password-input input {
    padding-right: 48px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    display: none;
}

.remember-me .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remember-me input:checked + .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.remember-me input:checked + .checkmark::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.remember-me .label-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 14px;
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-loader {
    display: none;
}

.btn-login .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-arrow {
    display: none;
}

.btn-login.loading .btn-loader {
    display: inline-flex;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* SSO Options */
.sso-options {
    display: flex;
    gap: 12px;
}

.sso-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Theme Toggle on Login Page */
.login-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
}

.login-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

[data-theme="dark"] .login-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Version Info */
.login-version {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .login-version {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Responsive Styles for New Layout
   ============================================ */

/* Tablet: Collapsed sidebar by default */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar .brand-text,
    .sidebar .nav-text,
    .sidebar .user-info,
    .sidebar .user-actions {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }

    .sidebar .sidebar-header {
        padding: 20px 16px;
        justify-content: center;
    }

    .sidebar .sidebar-collapse-btn {
        display: none;
    }

    .sidebar .nav-link {
        justify-content: center;
        padding: 12px;
    }

    .sidebar .user-menu {
        justify-content: center;
        padding: 12px;
    }

    .main-wrapper {
        margin-left: var(--sidebar-collapsed-width);
    }

    .search-box {
        max-width: 280px;
    }

    .search-shortcut {
        display: none;
    }
}

/* Mobile: Hidden sidebar, show mobile header */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar .brand-text,
    .sidebar .nav-text,
    .sidebar .user-info,
    .sidebar .user-actions {
        opacity: 1;
        width: auto;
    }

    .sidebar .sidebar-header {
        padding: 20px;
        justify-content: space-between;
    }

    .sidebar .sidebar-collapse-btn {
        display: none;
    }

    .sidebar .nav-link {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .sidebar .user-menu {
        justify-content: flex-start;
        padding: 12px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
        padding-top: 56px;
    }

    .top-header {
        display: none;
    }

    .main-content {
        padding: 16px;
    }

    /* Login Mobile */
    .login-card {
        padding: 32px 24px;
        margin: 16px;
        max-width: none;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .login-theme-toggle {
        top: 16px;
        right: 16px;
    }

    .floating-icons {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .login-card {
        padding: 24px 20px;
    }

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

/* ===== Mobile Responsive Fixes for Scan Page ===== */
@media (max-width: 768px) {
    /* 페이지 제목 줄바꿈 방지 */
    .page-title {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    /* 정밀 분석 카드 모바일 레이아웃 */
    .scan-type-info-box {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }

    .scan-type-details {
        width: 100%;
    }

    .scan-type-name,
    .scan-type-desc {
        white-space: normal !important;
        word-break: keep-all !important;
    }

    .scan-type-badge-fixed {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    /* 페이지 제목 - 아이콘과 텍스트 세로 배치 */
    .page-title {
        flex-direction: column;
        gap: 8px;
        white-space: normal;
        word-break: keep-all;
    }

    .page-title i {
        font-size: 28px;
    }

    /* 정밀 분석 카드 초소형 화면 */
    .scan-type-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ===== Unified Page Header Styles ===== */
.page-header-section {
    max-width: 1000px;
    margin: 0 auto 32px auto;
    padding: 0 20px;
}

    margin-bottom: 32px;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-500) 100%);
    border-radius: 16px;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.page-header-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header-text p {
    color: var(--text-secondary);
    font-size: 15px;
}

@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header-text h1 {
        font-size: 24px;
    }
}

/* ===== Unified Page Content Width ===== */
.page-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.scan-card-wrapper {
    max-width: 1000px !important;
}

.sast-page {
    max-width: 1000px !important;
    margin: 0 auto !important;
}

.page-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
}

/* ===== URL Input Fix - High Specificity Override ===== */
.url-input-container input.url-input,
.url-input-container input[type="url"],
input#targetUrl {
    padding-left: 58px !important;
}

