/* css/split/split.css */

body {
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Re-use */
.main-header { border-bottom: 1px solid #e2e8f0; background: #ffffff; }
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; max-width: 1200px; margin: 0 auto; }
.logo-img { height: 36px; object-fit: contain; }
.nav-links { display: flex; gap: 20px; font-weight: 600; align-items: center; }
.nav-link { color: #334155; text-decoration: none; transition: color 0.2s; }
.active-link { color: #059669; }

/* Upload View */
.upload-view { padding: 60px 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.main-title { font-size: 2.5rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.main-subtitle { color: #64748b; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.upload-zone { max-width: 800px; margin: 40px auto; border: 3px dashed #cbd5e1; border-radius: 20px; padding: 60px 20px; background: white; transition: all 0.3s ease; cursor: pointer; }
.upload-zone:hover, .upload-zone.dragover { border-color: #059669; background-color: #ecfdf5; }
.icon-pdf { font-size: 60px; color: #059669; margin-bottom: 25px; }
.drop-text { color: #94a3b8; margin-top: 20px; font-size: 0.95rem; }

.btn-upload { background-color: #059669; color: white; padding: 18px 40px; border-radius: 12px; font-size: 1.2rem; font-weight: 700; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: transform 0.2s, background 0.2s; box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.3); }
.btn-upload:hover { background-color: #047857; transform: translateY(-2px); }

/* Workspace View */
.workspace-view { display: none; flex-grow: 1; flex-direction: column; height: calc(100vh - 70px); }
@media(min-width: 768px) { .workspace-view { flex-direction: row; } }

/* Preview Box */
.preview-container { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 30px; background-color: #f1f5f9; overflow-y: auto; }
.preview-box { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); display: flex; flex-direction: column; align-items: center; max-width: 300px; border: 1px solid #e2e8f0; }
.preview-box canvas { max-width: 100%; border: 1px solid #e2e8f0; background: #fff; margin-bottom: 15px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.pdf-info { text-align: center; }
.pdf-info strong { display: block; color: #0f172a; font-size: 1rem; word-break: break-all; margin-bottom: 5px; }
.pdf-info span { color: #64748b; font-size: 0.85rem; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; }

/* Sidebar Options */
.action-sidebar { background: white; width: 100%; border-top: 1px solid #e2e8f0; padding: 25px; display: flex; flex-direction: column; box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.05); overflow-y: auto; }
@media(min-width: 768px) { .action-sidebar { width: 380px; border-top: none; border-left: 1px solid #e2e8f0; box-shadow: -4px 0 6px -1px rgba(0,0,0,0.05); } }
.sidebar-title { margin: 0 0 20px 0; font-size: 1.5rem; color: #0f172a; }

/* Tabs */
.tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
.tab-btn { flex: 1; background: none; border: none; font-size: 1rem; font-weight: 600; color: #64748b; cursor: pointer; padding: 10px; border-radius: 8px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tab-btn:hover { background: #f8fafc; }
.tab-btn.active { background: #ecfdf5; color: #059669; }

.tab-content { display: none; flex-direction: column; flex-grow: 1; }
.tab-content.active { display: flex; }

.section-label { font-weight: 600; color: #334155; margin-bottom: 15px; font-size: 0.95rem; }

/* Range Inputs */
.ranges-container { display: flex; flex-direction: column; gap: 15px; margin-bottom: 15px; }
.range-item { display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; position: relative; }
.range-input { display: flex; align-items: center; gap: 8px; flex-grow: 1; }
.range-input span { color: #64748b; font-size: 0.9rem; }
.range-input input { width: 60px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: center; font-family: 'Inter'; }
.range-input input:focus { outline: none; border-color: #059669; }
.btn-remove-range { background: none; border: none; color: #ef4444; cursor: pointer; padding: 5px; font-size: 1.1rem; transition: color 0.2s; }
.btn-remove-range:hover { color: #b91c1c; }

/* Buttons & Checkboxes */
.btn-secondary { background: white; color: #059669; border: 2px dashed #059669; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; margin-bottom: 15px; }
.btn-secondary:hover { background: #ecfdf5; }

.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-group input { margin-top: 4px; accent-color: #059669; width: 16px; height: 16px; cursor: pointer; }
.checkbox-group label { font-size: 0.9rem; color: #475569; cursor: pointer; line-height: 1.4; }
.mt-15 { margin-top: 15px; }

.radio-group { display: flex; flex-direction: column; gap: 12px; }
.radio-label { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: #334155; cursor: pointer; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; }
.radio-label input { accent-color: #059669; width: 18px; height: 18px; }

.btn-split { background: #059669; color: white; border: none; padding: 18px; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background 0.2s; box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.3); width: 100%; margin-top: 30px; }
.btn-split:hover { background: #047857; }

/* Loading Overlay */
.loading-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(255,255,255,0.95); z-index: 9999; display: none; flex-direction: column; align-items: center; justify-content: center; color: #0f172a; }
.spinner { border: 4px solid #f3f4f6; border-top: 4px solid #059669; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin-bottom: 20px; }
.loading-title { margin-bottom: 10px; font-size: 1.5rem; }
.loading-desc { color: #64748b; font-weight: 500; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }