/* --- CSS Custom Design Variables --- */
:root {
    --bg-dark: #070913;
    --card-glass: rgba(13, 17, 34, 0.6);
    --border-glass: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --teal-glow: #10b981;
    --indigo-glow: #6366f1;
    --amber-warning: #f59e0b;
    --red-alert: #ef4444;
    --emerald-success: #10b981;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- Base Body & Layout --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- Animated Gradient Mesh Background --- */
.mesh-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.1) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(7, 9, 19, 1) 0%, rgba(7, 9, 19, 1) 100%);
    pointer-events: none;
}

/* --- Global Utilities --- */
.hidden {
    display: none !important;
}

.margin-top {
    margin-top: 1.5rem;
}

/* --- Header / Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    border-bottom: 1px solid var(--border-glass);
    background-color: rgba(7, 9, 19, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-logo-frame {
    background-color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 1px rgba(255, 255, 255, 0.4);
    border: 1.5px solid #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-logo-frame:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 4px rgba(99, 102, 241, 0.4);
}

.company-logo {
    height: 100%;
    max-height: 28px;
    object-fit: contain;
}

.logo-divider {
    width: 1px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 0 0.75rem;
}

.logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.08rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Button Styling --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--indigo-glow) 0%, #4f46e5 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-glowing {
    position: relative;
    overflow: hidden;
}

.btn-glowing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.75s;
}

.btn-glowing:hover::after {
    left: 125%;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Container Section System --- */
.container {
    flex: 1;
    width: 90%;
    max-width: 1100px;
    margin: 2.5rem auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease-out forwards;
}

/* --- Glassmorphic Card --- */
.glass-card {
    background: var(--card-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease;
}

/* --- STEP 1: Hero Banner & Drag-and-Drop Area --- */
.hero-title-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--indigo-glow) 0%, var(--teal-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.6;
}

.drop-zone {
    position: relative;
    overflow: hidden;
    background: rgba(13, 17, 34, 0.4);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

/* Session Lock Overlay */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 10, 24, 0.92);
    backdrop-filter: blur(18px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.lock-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.lock-overlay-content {
    max-width: 420px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.lock-overlay-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lock-overlay-content p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.lock-icon {
    font-size: 3.5rem;
    animation: pulse-glow 2.5s ease-in-out infinite;
    color: var(--amber-glow);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    }
}

.drop-zone.dragover {
    border-color: var(--teal-glow);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.01);
}

.drop-zone-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.drop-zone h3 {
    font-size: 1.35rem;
    font-weight: 600;
}

.drop-zone p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- STEP 2: Live Progressive Loader State --- */
.processing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 3rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--indigo-glow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--indigo-glow), var(--teal-glow));
    border-radius: 50px;
    transition: width 0.4s ease;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 450px;
    margin-top: 0.5rem;
}

.step-dot {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 0.5rem;
}

.step-dot.active {
    color: var(--teal-glow);
}

/* --- STEP 3: Dependency Resolution Block Panel --- */
.dependency-warning-card {
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.1);
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

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

.warning-header h3 {
    color: var(--amber-warning);
    font-weight: 700;
}

.warning-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.dependency-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.dependency-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--amber-warning);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}

.dependency-badge {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--amber-warning);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Custom Checkbox Design */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.2rem;
    width: 1.2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--amber-warning);
    border-color: var(--amber-warning);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Tabular Report Tables --- */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
}

.report-badge {
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--indigo-glow);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.grid-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* --- Report Split Screen / Sidebar Layout --- */
.report-split-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

.report-left-panel {
    display: flex;
    flex-direction: column;
}

.report-right-panel {
    position: sticky;
    top: 5.5rem; /* Keeps sidebar sticky under navbar during scroll */
}

.summary-sidebar-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 8rem);
}

.summary-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex-grow: 1;
}

/* Custom scrollbar for sidebar text */
.summary-content::-webkit-scrollbar {
    width: 6px;
}
.summary-content::-webkit-scrollbar-track {
    background: transparent;
}
.summary-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.summary-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-action-divider {
    height: 1px;
    background-color: var(--border-glass);
    margin: 1.25rem 0;
}

.sidebar-action-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

@media (max-width: 950px) {
    .report-split-layout {
        grid-template-columns: 1fr;
    }
    .report-right-panel {
        position: static;
    }
    .summary-sidebar-card {
        max-height: none;
    }
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-glass);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.badge-risk {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-low { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-medium { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-high { background-color: rgba(239, 68, 68, 0.15); color: #f87171; }

/* --- Security Grid --- */
.security-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.security-severity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.security-severity-dot.HIGH { background-color: var(--red-alert); box-shadow: 0 0 8px var(--red-alert); }
.security-severity-dot.MEDIUM { background-color: var(--amber-warning); box-shadow: 0 0 8px var(--amber-warning); }
.security-severity-dot.LOW { background-color: var(--teal-glow); }

.security-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.security-details h4 span {
    font-family: var(--font-mono);
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.security-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Conversion Action Bar --- */
.conversion-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(13, 17, 34, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
}

.action-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* --- STEP 4: Success Result screen --- */
.success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 3.5rem 2rem;
}

.success-icon-badge {
    width: 70px;
    height: 70px;
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--emerald-success);
    font-size: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--emerald-success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.result-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

.result-card-link {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    text-align: left;
    transition: all 0.3s ease;
}

.result-card-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--indigo-glow);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 2rem;
}

.link-details h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.link-details p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* --- Footer --- */
.footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background-color: rgba(7, 9, 19, 0.5);
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* --- User Profile Badge in Navbar --- */
.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.5rem 0.25rem 0.35rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0.25rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .grid-two-cols, .result-links {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.25rem;
    }
    .conversion-action-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Step Navigation Bar Styles --- */
.step-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: not-allowed;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.step-nav-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-nav-label {
    transition: color 0.3s ease;
}

/* Step State: Available (unlocked, can click to visit) */
.step-nav-item.available {
    cursor: pointer;
    color: var(--text-primary);
}

.step-nav-item.available:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.step-nav-item.available .step-nav-num {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--indigo-glow);
}

/* Step State: Active (currently selected view) */
.step-nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
}

.step-nav-item.active .step-nav-num {
    background: var(--indigo-glow);
    border-color: var(--indigo-glow);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

/* Step Connector Lines */
.step-nav-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 1rem;
    transition: background 0.5s ease;
}

.step-nav-connector.active {
    background: linear-gradient(90deg, var(--indigo-glow) 0%, rgba(16, 185, 129, 0.5) 100%);
}

/* Responsive navigation tweaks */
@media (max-width: 900px) {
    .step-nav-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    .step-nav-connector {
        display: none;
    }
    .step-nav-item {
        justify-content: flex-start;
        padding: 0.5rem 1rem;
    }
}

/* --- Workspace History Dashboard Styles --- */
.workspace-table th, .workspace-table td {
    padding: 1.1rem 1.5rem;
    font-size: 0.95rem;
}

.workspace-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
}

.workspace-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.status-badge.pending, .status-badge.analyzing {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.status-badge.analyzed {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.status-badge.translating, .status-badge.converting {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: floatAnimation 3s infinite ease-in-out;
}

@keyframes floatAnimation {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* --- Security Modal Overlay & Content --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.modal-content {
    background: rgba(18, 18, 30, 0.75) !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalScaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.security-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.security-tag .remove-tag {
    cursor: pointer;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.15s;
}

.security-tag .remove-tag:hover {
    color: #f87171;
}

.modal-close-btn:hover {
    color: #ffffff !important;
}

/* --- Login Screen & Tab Navigation Additions --- */
.login-screen-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.15) !important;
    animation: modalScaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-tab {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    position: relative;
    user-select: none;
}

.nav-tab:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.nav-tab.active {
    color: #ffffff;
    border-bottom: 2px solid var(--indigo-glow);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.tags-wrapper {
    min-height: 40px;
}


