/* Workspace Kits Custom Design Stylesheet */
/* Implements premium glassmorphism theme matching the reference design */

:root {
    /* Color Palette */
    --bg-gradient: linear-gradient(135deg, #E0F2F1 0%, #E8EAF6 50%, #F3E5F5 100%);
    --accent-color: #8C52FF;
    --accent-hover: #7A3BFF;
    --success-color: #2e7d32;
    --danger-color: #c62828;
    
    /* Text Colors */
    --text-color: #2D3142;
    --text-muted: #6C7A89;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.04), 0 8px 16px -8px rgba(0, 0, 0, 0.03);
    
    /* Font stacks */
    --font-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-title: 'Outfit', var(--font-primary);
}

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

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background: var(--bg-gradient);
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Glowing Mesh Orbs */
.mesh-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    mix-blend-mode: multiply;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #E1BEE7; /* soft violet */
    top: -100px;
    left: -100px;
    animation: float-1 25s infinite alternate ease-in-out;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: #B3E5FC; /* soft blue */
    bottom: -150px;
    right: 100px;
    animation: float-2 30s infinite alternate ease-in-out;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #C8E6C9; /* soft mint */
    top: 30%;
    right: -100px;
    animation: float-1 20s infinite alternate ease-in-out;
}

@keyframes float-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

@keyframes float-2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-80px, -30px) scale(0.9); }
}

/* Main Application Container Frame */
.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.logo {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(140, 82, 255, 0.1);
}

.title-group h1 {
    font-family: var(--font-title);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-color);
}

.title-group span {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.menu-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 16px 12px 6px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
}

.nav-item.active {
    background: #ffffff;
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Glassmorphic Icon Containers */
.glass-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.9);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    transition: all 0.2s ease;
}

.nav-item:hover .glass-icon-wrapper {
    transform: scale(1.08);
}

.nav-item.active .glass-icon-wrapper {
    background-color: rgba(140, 82, 255, 0.06);
    border-color: rgba(140, 82, 255, 0.15);
}

.glass-icon-wrapper.large {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-size: 26px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

/* Base64/Data URI SVGs for Icons */
.qr-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238C52FF" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="3" height="3" rx="0.5"/><rect x="18" y="18" width="3" height="3" rx="0.5"/><rect x="14" y="18" width="3" height="3" rx="0.5"/><rect x="18" y="14" width="3" height="3" rx="0.5"/></svg>');
}
.compress-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238E24AA" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 8v8M9 11l3-3 3 3M9 13l3 3 3-3"/></svg>');
}
.crop-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E65100" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 1v17h17M1 6h17v17"/></svg>');
}
.convert-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%232E7D32" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2M7 21a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2M2 12h20M19 9l3 3-3 3M5 15l-3-3 3-3"/></svg>');
}
.merge-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230277BD" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v13M8 12l4 4 4-4M3 17a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3"/></svg>');
}
.ocr-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23C62828" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"/></svg>');
}
.home-icon {
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Viewport Area */
.viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: 65px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.15);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

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

.crumb-separator {
    color: rgba(0, 0, 0, 0.2);
}

.active-crumb {
    font-weight: 600;
    color: var(--text-color);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-size: 12px;
    font-weight: 600;
}

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

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* View Views Swap */
.content-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.content-view.active {
    display: flex;
    animation: fadeIn 0.35s ease;
}

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

/* Welcome Header */
.welcome-header {
    margin-bottom: 28px;
}

.welcome-header h2 {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.welcome-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Landing Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: hsl(var(--accent-hue), 80%, 45%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.03);
    border-color: rgba(255, 255, 255, 0.7);
}

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

.card-icon-container {
    margin-bottom: 20px;
}

.dashboard-card h3 {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.dashboard-card p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Tool Page Specific Headings */
.tool-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tool-header .header-icon-container {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-header h2 {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
}

.tool-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Inject Tool Icons via JS / CSS attribute */
.tool-header[data-icon="qr"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238C52FF" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="3" height="3" rx="0.5"/><rect x="18" y="18" width="3" height="3" rx="0.5"/><rect x="14" y="18" width="3" height="3" rx="0.5"/><rect x="18" y="14" width="3" height="3" rx="0.5"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}
.tool-header[data-icon="compress"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238E24AA" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 8v8M9 11l3-3 3 3M9 13l3 3 3-3"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}
.tool-header[data-icon="crop"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23E65100" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 1v17h17M1 6h17v17"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}
.tool-header[data-icon="convert"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%232E7D32" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2M7 21a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2M2 12h20M19 9l3 3-3 3M5 15l-3-3 3-3"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}
.tool-header[data-icon="merge"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230277BD" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v13M8 12l4 4 4-4M3 17a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}
.tool-header[data-icon="ocr"] .header-icon-container {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23C62828" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px;
}

/* Tool Layout: Panels grid */
.tool-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.controls-panel {
    flex: 2;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-panel {
    flex: 3;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: stretch;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }
.w-full { width: 100%; }
.min-h-200 { min-height: 200px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

.controls-panel h3, .preview-panel h3 {
    font-family: var(--font-title);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Form Controls */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-field {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(140, 82, 255, 0.15);
}

textarea.input-field {
    min-height: 80px;
    resize: vertical;
}

/* File Upload Button Wrappers */
.file-upload-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-upload-btn-wrapper input[type="file"] {
    display: none;
}

.filename-text {
    font-size: 11.5px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary {
    background: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(140, 82, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(140, 82, 255, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
}

.button-grid {
    display: flex;
    gap: 10px;
}

/* Color Picker Wrap */
.color-picker-wrapper {
    display: flex;
    gap: 8px;
}

.color-picker-wrapper input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.hex-text {
    width: 80px;
    text-transform: uppercase;
    text-align: center;
}

/* Preview Boxes */
.preview-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.preview-box img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Sliders */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-header span {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent-color);
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.06);
    outline: none;
    margin: 8px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(140, 82, 255, 0.3);
    transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.est-size-badge {
    background: rgba(140, 82, 255, 0.08);
    color: var(--accent-color);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
}

/* Tabs */
.tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 20px;
}

.tab-headers {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 6px;
}

.tab-header {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-header:hover {
    color: var(--text-color);
}

.tab-header.active {
    color: var(--accent-color);
    font-weight: 600;
}

.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

.tab-pane {
    display: none;
    flex-direction: column;
}

.tab-pane.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

/* Status Logs */
.log-box {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px;
    background: rgba(0, 0, 0, 0.9);
    border: none;
}

.status-log {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #A7F3D0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

.status-log .placeholder-msg {
    color: #6B7280;
    font-family: var(--font-primary);
}

/* Image container */
.image-container-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Crop canvas interactive styles */
.interactive-canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interactive-canvas-container canvas {
    max-width: 95%;
    max-height: 95%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 4px;
    background: #eaeaea;
}

/* Dynamic converter subgroups */
.conv-subgroup {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.conv-subgroup.active {
    display: flex;
}

/* Lists */
.list-container {
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px;
    overflow-y: auto;
    max-height: 200px;
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-list li {
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.file-list li:active {
    cursor: grabbing;
}

.file-list li .remove-item-btn {
    background: transparent;
    border: none;
    color: var(--danger-color);
    font-weight: 700;
    cursor: pointer;
    padding: 0 4px;
}

.list-placeholder {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 24px 0;
    cursor: default !important;
    background: transparent !important;
    border: none !important;
}

/* Checkboxes */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    color: var(--text-color);
}

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

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.2);
}

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

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

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

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

/* Split specifics */
.split-info-badge {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
}

.input-tip {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* PDF OCR/Editor elements */
.editor-box {
    background: #525659;
}

.page-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-color);
}

.ocr-text-result {
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #1a1a1a;
    padding: 12px;
    font-family: var(--font-primary);
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    text-align: left;
    white-space: pre-wrap;
    border-radius: 8px;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

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

/* Before/After Swipe Slider styling */
.swipe-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
    cursor: col-resize;
}

.swipe-after, .swipe-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swipe-after {
    z-index: 1;
}

.swipe-before {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.swipe-after img, .swipe-before img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    display: block;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.swipe-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #ffffff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.swipe-handle-line {
    flex: 1;
    width: 2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.swipe-handle-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

.swipe-badge {
    position: absolute;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 12;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-before {
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-after {
    right: 12px;
    background: rgba(140, 82, 255, 0.85); /* Lavender theme! */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* Interactive Before/After Comparison Slider */
.comp-slider {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comp-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.comp-img-before {
    z-index: 1;
}

.comp-img-after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid var(--accent-color);
}

.comp-img-after {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.comp-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.comp-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 2px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    font-size: 16px;
    font-weight: bold;
}

