@import url("https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap");
:root {
  --primary-color: #10b981; /* Green theme for Excel */
  --primary-hover: #059669;
  --header-bg: #1b2537;
  --bg-color: #f4f7f6;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-comic: 'Comic Neue', 'Chalkboard SE', 'Marker Felt', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); }
body { background-color: var(--bg-color); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; }

/* Header & Sidebar */
.govt-header { background: var(--header-bg); color: #ffffff; padding: 12px 30px; border-bottom: 3px solid #2563eb; width: 100%; position: fixed; top: 0; left: 0; z-index: 1000; height: 80px; }
.header-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand-logo { display: flex; align-items: center; gap: 14px; }
.brand-logo i { font-size: 32px; color: #38bdf8; }
.brand-logo h1 { font-size: 20px; font-weight: 700; color: #ffffff; }

.portal-layout { display: flex; width: 100%; margin-top: 80px; min-height: calc(100vh - 80px); }
.app-sidebar { width: 85px; background: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; padding: 15px 0; gap: 12px; position: fixed; height: calc(100vh - 80px); top: 80px; left: 0; z-index: 100; overflow-y: auto; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 12px; text-decoration: none; color: #64748b; font-size: 11px; font-weight: 600; gap: 6px; transition: 0.2s ease; text-align: center; }
.nav-item i { font-size: 20px; }
.nav-item:hover { background: #f8fafc; color: #2563eb; }
.nav-item.active { background: #eff6ff; color: #2563eb; }
.app-main { margin-left: 85px; flex: 1; padding: 35px; width: calc(100% - 85px); }

/* Tool Title */
.dual-icon { position: relative; width: 66px; height: 62px; margin-bottom: 14px; flex-shrink: 0;}
.dual-icon .sq { position: absolute; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.dual-icon .pos-tl { top: 0; left: 0; }
.dual-icon .pos-br { top: 22px; left: 26px; border: 2px solid #fff;}
.dual-icon.green .light { background: #d1fae5; color: #047857; z-index: 1; }
.dual-icon.green .solid { background: #10b981; color: #fff; z-index: 2; }

[hidden] { display: none !important; }
.tool-page { max-width: 1000px; margin: 0 auto; }
.tool-title { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.tool-title h2 { font-size: 24px; font-weight: 700; color: #0f172a; }
.tool-title p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.tool-box { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

/* Modern Cool Dropzone (Centered) */
.drop-zone { background: linear-gradient(145deg, #f8fafc, #ecfdf5); border: 2px dashed #6ee7b7; border-radius: 24px; padding: 80px 20px; text-align: center; cursor: pointer; transition: all 0.3s ease; box-shadow: inset 0 0 20px rgba(255,255,255,0.8); display: flex; flex-direction: column; align-items: center; justify-content: center;}
.drop-zone:hover { border-color: var(--primary-color); background: linear-gradient(145deg, #f0fdf4, #d1fae5); transform: translateY(-2px); }
.upload-icon-wrap { background: #fff; width: 90px; height: 90px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2); }
.upload-icon-wrap i { font-size: 40px; color: var(--primary-color); }
.comic-text { font-family: var(--font-comic); font-size: 26px; margin-bottom: 8px; font-weight: 600; color: #064e3b; }
.drop-zone p { color: var(--text-muted); margin-bottom: 24px; font-size: 15px; }

/* Buttons */
.btn { border: 1px solid var(--border-color); background: #fff; color: var(--text-main); padding: 12px 24px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn:hover { background: #f1f5f9; }
.btn.primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
.round-btn { border-radius: 50px !important; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Settings & Work Area */
.file-info-bar { background: #f0fdf4; color: #166534; padding: 12px 18px; border-radius: 50px; font-size: 14px; font-weight: 600; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #bbf7d0; }
.settings-panel { display: flex; flex-wrap: wrap; gap: 20px; background: #f8fafc; padding: 20px; border-radius: 16px; border: 1px solid #e2e8f0; margin-bottom: 20px; }
.opt-group { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 150px; }
.opt-group label { font-size: 13px; font-weight: 600; color: #475569; }
.pro-select { padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 14px; background: #fff; color: var(--text-main); outline: none; transition: 0.2s; }
.pro-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }

/* Preview Box */
.preview-header { font-size: 15px; font-weight: 700; color: #334155; margin-bottom: 10px; font-family: var(--font-comic); }
.preview-box { max-height: 400px; overflow: auto; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; padding: 15px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
.xl-table { border-collapse: collapse; font-family: Arial, sans-serif; font-size: 13px; color: #000; width: 100%; }
.xl-table td, .xl-table th { border: 1px solid #94a3b8; padding: 6px 10px; white-space: nowrap; text-align: left; }
.xl-table th { background: #f1f5f9; font-weight: bold; }

.action-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; border-top: 1px solid #e2e8f0; padding-top: 20px; }
.status { margin-top: 15px; font-size: 14px; font-weight: 600; text-align: center; }
.status.error { color: #dc2626; }
.status.ok { color: #10b981; }

.render-root { position: absolute; left: -10000px; top: 0; width: max-content; background: #fff; }