/* ======================================================
   CSV MASTER STUDIO - PREMIUM DESIGN SYSTEM
   Dark Glassmorphism, Micro-Animations, and High Usability
   ====================================================== */

:root {
    --bg-base: #080C14;
    --bg-surface: #0E1525;
    --bg-card: rgba(17, 26, 44, 0.7);
    --bg-card-hover: rgba(23, 35, 58, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);

    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --cyan: #06B6D4;
    --cyan-glow: rgba(6, 182, 212, 0.2);
    --emerald: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.2);
    --amber: #F59E0B;
    --rose: #F43F5E;

    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.06) 0%, transparent 45%);
}

/* --- Layout --- */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 24px 40px;
    gap: 20px;
    max-width: 1680px;
    margin: 0 auto;
}

/* --- Top Navigation --- */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-title span {
    background: linear-gradient(90deg, var(--cyan), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Stats Ribbon */
.stats-ribbon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.stat-pill i {
    font-size: 18px;
    color: var(--text-muted);
}

.stat-pill.accent-emerald i { color: var(--emerald); }
.stat-pill.accent-cyan i { color: var(--cyan); }
.stat-pill.accent-violet i { color: var(--primary); }

.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn.primary-lg {
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px var(--cyan-glow);
}

.btn.primary-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--cyan-glow);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn.accent-btn {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.btn.accent-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.btn.danger-outline {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.3);
}

.btn.danger-outline:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: var(--rose);
    color: #fff;
    box-shadow: 0 0 15px var(--rose-glow);
}

.btn.text-danger-btn {
    background: transparent;
    color: #fb7185;
    border: 1px dashed rgba(244, 63, 94, 0.3);
    font-size: 12px;
    padding: 7px 12px;
    justify-content: center;
}

.btn.text-danger-btn:hover {
    background: rgba(244, 63, 94, 0.12);
    border-color: var(--rose);
    color: #fff;
}

.btn.text-btn {
    background: transparent;
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 12px;
}

.btn.text-btn:hover {
    color: var(--text-main);
}

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

/* --- Studio Grid --- */
.studio-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    min-height: 580px;
}

.panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    font-size: 20px;
    color: var(--primary);
}

.panel-title h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.badge.count-badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
    width: 130px;
}

.search-input:focus {
    border-color: var(--primary);
}

/* --- Files Hub List --- */
.files-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
}

.file-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.file-item-card.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.file-icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--cyan);
}

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

.file-item-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-submeta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.status-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.status-tag.scanned {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald);
}

.status-tag.unscanned {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
}

.panel-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

/* --- Workbench Panel --- */
.workbench-panel {
    display: flex;
    flex-direction: column;
}

.workbench-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.workbench-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 6px;
}

.workbench-empty-state p {
    color: var(--text-muted);
    max-width: 420px;
    font-size: 13px;
}

.workbench-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.active-file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.file-meta-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.file-ext-tag {
    background: linear-gradient(135deg, var(--cyan), var(--primary));
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
}

.active-file-header h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
}

.file-submeta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Switch Toggle Box */
.view-toggle-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(90deg, var(--cyan), var(--primary));
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Preview Section */
.preview-section {
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.preview-section.collapsed {
    max-height: 0;
    border-bottom: none;
    opacity: 0;
}

.preview-section:not(.collapsed) {
    max-height: 380px;
    opacity: 1;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-note {
    font-size: 11px;
    color: var(--text-dim);
}

.table-scroll-wrap {
    overflow: auto;
    max-height: 320px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.preview-table th {
    background: #0B111E;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
    color: var(--text-main);
}

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

/* Dynamic Columns Config Section */
.columns-config-section {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
}

.section-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-top-bar h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-top-bar p {
    font-size: 12px;
    color: var(--text-muted);
}

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

/* Columns Grid */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.column-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.column-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.column-card.active-col {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
}

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

.col-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-type-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
}

.col-type-tag.type-email { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.col-type-tag.type-phone { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.col-type-tag.type-country { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.col-type-tag.type-name { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.col-type-tag.type-text { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }

.col-rename-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    width: 100%;
}

.col-rename-input:focus {
    border-color: var(--primary);
}

/* Action Footer */
.workbench-action-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.export-options {
    display: flex;
    align-items: center;
    gap: 16px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.custom-select {
    background: #0D1424;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.custom-select:focus {
    border-color: var(--primary);
}

/* --- Downloads Vault Section --- */
.downloads-vault-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
}

.vault-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.vault-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vault-title i {
    font-size: 26px;
    color: var(--emerald);
}

.vault-title h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.vault-title p {
    font-size: 12px;
    color: var(--text-muted);
}

.vault-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.date-group-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.date-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.date-badge {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
}

.files-grid-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.download-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s ease;
}

.download-card:hover {
    border-color: var(--emerald);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.flag-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.download-card.type-phone .flag-icon { color: var(--emerald); }
.download-card.type-email .flag-icon { color: var(--cyan); }

.download-text h5 {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-text span {
    font-size: 11px;
    color: var(--text-dim);
}

.download-btn {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: var(--emerald);
    color: #fff;
    box-shadow: 0 0 15px var(--emerald-glow);
}

.download-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-delete-output {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fb7185;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-delete-output:hover {
    background: var(--rose);
    color: #fff;
    box-shadow: 0 0 12px var(--rose-glow);
    border-color: var(--rose);
}

.date-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.date-group-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cleanup-date {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fb7185;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cleanup-date:hover {
    background: var(--rose);
    color: #fff;
    box-shadow: 0 0 12px var(--rose-glow);
    border-color: var(--rose);
}

.file-item-card {
    position: relative;
}

.btn-delete-input {
    background: transparent;
    border: none;
    color: var(--text-dim);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.35;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.file-item-card:hover .btn-delete-input {
    opacity: 0.85;
}

.btn-delete-input:hover {
    opacity: 1 !important;
    background: rgba(244, 63, 94, 0.2);
    color: var(--rose);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: #0E1726;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    min-width: 280px;
    animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left: 4px solid var(--emerald); }
.toast.error { border-left: 4px solid var(--rose); }
.toast.info { border-left: 4px solid var(--cyan); }

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

.loading-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Live Processing Waiting Time Strip --- */
.processing-status-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin: 16px 24px 0 24px;
    animation: fadeIn 0.3s ease;
}

.strip-pulse {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.strip-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 12px;
    flex-wrap: wrap;
}

.strip-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.strip-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(6, 182, 212, 0.25);
    letter-spacing: 0.5px;
}

/* --- Upload Progress Overlay Modal --- */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.upload-progress-card {
    background: #0F172A;
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

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

.upload-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.upload-icon-pulse {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.25));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
    50% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}

.upload-icon-pulse.download-mode {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--emerald);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.upload-icon-pulse.server-mode {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(99, 102, 241, 0.25));
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--amber);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.transfer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 3px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.25s ease;
}

.transfer-status-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: badgeDotPulse 1.2s infinite ease-in-out;
}

.transfer-status-badge.badge-download {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald);
    border-color: rgba(16, 185, 129, 0.3);
}

.transfer-status-badge.badge-server {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
    border-color: rgba(245, 158, 11, 0.3);
}

.transfer-status-badge.badge-success {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan);
    border-color: rgba(6, 182, 212, 0.3);
}

@keyframes badgeDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.upload-title-wrap h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-title-wrap span {
    font-size: 12px;
    color: var(--text-dim);
}

.btn-cancel-upload {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-cancel-upload:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: var(--rose);
    color: #fff;
}

/* Progress Track & Bar */
.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cyan), var(--emerald));
    border-radius: var(--radius-full);
    transition: width 0.15s ease-out;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

/* Animated Shimmer Stripes for Active Transfers & Server Processing */
.progress-bar-fill.animated-shimmer {
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.22) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.22) 75%,
        transparent 75%,
        transparent
    ), linear-gradient(90deg, var(--primary), var(--cyan), var(--emerald));
    background-size: 28px 28px, 100% 100%;
    animation: transferStripe 0.8s linear infinite;
}

@keyframes transferStripe {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 28px 0, 0 0; }
}

/* Upload & Transfer Metrics Row */
.upload-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-val {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-lbl {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.metric-item.highlight .metric-val {
    color: var(--cyan);
}

.metric-item.highlight .metric-val.waiting-ticking {
    color: var(--amber);
    animation: gentlePulse 1.5s infinite;
}

@keyframes gentlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.hidden {
    display: none !important;
}

/* --- Structured Colon Dataset Preset Banner --- */
.structured-preset-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    animation: fadeInSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.structured-preset-banner:hover {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.2);
}

.preset-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.preset-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}

.preset-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preset-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.18);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.preset-text h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.preset-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.preset-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.preset-actions-group .btn {
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

@media (max-width: 768px) {
    .structured-preset-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .preset-actions-group {
        width: 100%;
    }
    .preset-actions-group .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .studio-grid {
        grid-template-columns: 1fr;
    }
    .top-nav {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
    .stats-ribbon {
        flex-wrap: wrap;
    }
}
