/* KrishiStat Global Stylesheet — AGSTAT-style design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body { font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f7f6; margin: 0; padding: 0; display: flex; flex-direction: row; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar { width: 280px; background-color: #2c3e50; color: white; position: fixed; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; box-shadow: 2px 0 5px rgba(0,0,0,0.1); z-index: 100; }
.sidebar-header { padding: 20px; background-color: #1a252f; text-align: center; }
.sidebar-header h2 { margin: 0; font-size: 1.5rem; color: #ecf0f1; border: none; font-weight: 800; letter-spacing: 1px; }
.sidebar-header small { display: block; font-size: 11px; color: #bdc3c7; letter-spacing: 0.5px; margin-top: 4px; }
.sidebar-nav { padding: 20px 0; flex-grow: 1; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { border-bottom: 1px solid #34495e; }
.sidebar-nav a { display: block; cursor: pointer; padding: 15px 25px; color: #bdc3c7; text-decoration: none; transition: all 0.3s; font-weight: 500; font-size: 14px; }
.sidebar-nav a:hover, .sidebar-nav a.active { background-color: #2980b9; color: white; padding-left: 30px; text-decoration: none; }
.sidebar-nav .sub-menu { background-color: #243342; display: none; }
.sidebar-nav li.open .sub-menu { display: block; }
.sidebar-nav .sub-menu a { padding: 10px 25px 10px 40px; font-size: 0.9em; }
.sidebar-user { padding: 15px 20px; background-color: #1a252f; border-top: 1px solid #34495e; font-size: 13px; color: #bdc3c7; display: flex; align-items: center; gap: 10px; }
.sidebar-user .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #3498db; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* ── Main Content ──────────────────────────────────────────────── */
.main-content { margin-left: 280px; flex-grow: 1; display: flex; flex-direction: column; width: calc(100% - 280px); min-height: 100vh; }

/* ── Header (Hub) ──────────────────────────────────────────────── */
.hub-header { background-color: #2c3e50; color: #fff; padding: 30px; text-align: center; border-bottom: 4px solid #e74c3c; }
.hub-header h1 { margin: 0; font-size: 2.5rem; letter-spacing: 1px; color: #fff; border: none; }
.hub-header p { margin: 10px 0 0; font-size: 1.1rem; color: #bdc3c7; }

/* ── Group Titles ──────────────────────────────────────────────── */
.group-title { color: #2c3e50; font-size: 1.8rem; border-bottom: 3px solid #e74c3c; padding-bottom: 10px; margin: 40px 20px 10px; font-weight: 700; }

/* ── Hub Container (card grid) ─────────────────────────────────── */
.hub-container { max-width: 1200px; margin: 20px auto 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding: 0 20px; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card { background: #fff; border-radius: 12px; padding: 25px 20px 20px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 -3px 0 rgba(0,0,0,0.05); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; border: 1px solid #eaeaea; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.15), inset 0 -3px 0 rgba(0,0,0,0.05); }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 12px 12px 0 0; }
.card-icon { font-size: 3rem; margin-bottom: 20px; display: inline-block; transition: transform 0.3s ease; }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }

.card-1::before { background: linear-gradient(90deg, #3498db, #2980b9); }
.card-2::before { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.card-3::before { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.card-4::before { background: linear-gradient(90deg, #f1c40f, #f39c12); }
.card-5::before { background: linear-gradient(90deg, #e67e22, #d35400); }
.card-6::before { background: linear-gradient(90deg, #1abc9c, #16a085); }
.card-7::before { background: linear-gradient(90deg, #e84393, #c0392b); }
.card-8::before { background: linear-gradient(90deg, #34495e, #2c3e50); }

.card h2 { margin-top: 0; color: #2c3e50; font-size: 1.4rem; font-weight: 800; border: none; padding: 0; }
.card p { color: #7f8c8d; font-size: 14px; line-height: 1.6; margin-bottom: 35px; flex-grow: 1; text-align: center; }
.card .btn-launch { display: inline-block; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 30px; font-weight: bold; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2); margin-top: auto; border: none; cursor: pointer; }
.card .btn-launch:active { transform: translateY(2px); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.card-1 .btn-launch { background: linear-gradient(135deg, #3498db, #2980b9); }
.card-1 .btn-launch:hover { background: linear-gradient(135deg, #2980b9, #2471a3); box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); }
.card-2 .btn-launch { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.card-2 .btn-launch:hover { background: linear-gradient(135deg, #27ae60, #219a52); box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4); }
.card-3 .btn-launch { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.card-3 .btn-launch:hover { background: linear-gradient(135deg, #8e44ad, #732d91); box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4); }
.card-4 .btn-launch { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.card-4 .btn-launch:hover { background: linear-gradient(135deg, #f39c12, #d68910); box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4); }
.card-5 .btn-launch { background: linear-gradient(135deg, #e67e22, #d35400); }
.card-5 .btn-launch:hover { background: linear-gradient(135deg, #d35400, #a04000); box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4); }
.card-6 .btn-launch { background: linear-gradient(135deg, #1abc9c, #16a085); }
.card-6 .btn-launch:hover { background: linear-gradient(135deg, #16a085, #117864); box-shadow: 0 6px 20px rgba(26, 188, 156, 0.4); }

/* ── Container / Layout ────────────────────────────────────────── */
.container { display: flex; padding: 20px; flex: 1; box-sizing: border-box; justify-content: center; align-items: flex-start; }

/* ── Split Panels (Data Entry / Results) ───────────────────────── */
.left-panel { flex: 1; max-height: 800px; overflow-y: auto; align-self: flex-start; margin: auto 10px auto 0; padding: 30px; display: flex; flex-direction: column; overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 -3px 0 rgba(0,0,0,0.05); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; border: 1px solid #eaeaea; }
.left-panel:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.12), inset 0 -3px 0 rgba(0,0,0,0.05); }
.left-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 12px 12px 0 0; background: linear-gradient(90deg, #3498db, #2980b9); }

.right-panel { flex: 1.2; max-height: 800px; overflow-y: auto; align-self: flex-start; margin: auto 0 auto 10px; padding: 30px; display: flex; flex-direction: column; overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 -3px 0 rgba(0,0,0,0.05); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; border: 1px solid #eaeaea; }
.right-panel:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,0,0.12), inset 0 -3px 0 rgba(0,0,0,0.05); }
.right-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 12px 12px 0 0; background: linear-gradient(90deg, #2ecc71, #27ae60); }

/* ── Tool Header ───────────────────────────────────────────────── */
.tool-header { max-width: 1160px; margin: 20px auto 10px; padding: 0 10px 15px; text-align: left; border-bottom: 4px solid #e74c3c; display: flex; align-items: center; justify-content: space-between; }
.tool-header h1 { margin: 0; font-size: 2.2rem; color: #2c3e50; letter-spacing: 1px; border: none; padding: 0; flex-grow: 1; }
.tool-header .btn-theory { background-color: #f1c40f; color: #2c3e50; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.2s; border: none; cursor: pointer; font-size: 14px; }
.tool-header .btn-theory:hover { background-color: #f39c12; transform: translateY(-2px); }
.tool-header .badge-cat { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: bold; letter-spacing: 0.5px; text-transform: uppercase; margin-left: 12px; }

/* ── Typography ────────────────────────────────────────────────── */
h2, h3 { color: #2c3e50; border-bottom: 2px solid #2c3e50; padding-bottom: 10px; margin-top: 0; }
h4 { color: #2980b9; margin-top: 20px; }
p, li { line-height: 1.6; color: #555; }

/* ── Publication Table ─────────────────────────────────────────── */
table.pub-table { width: max-content; min-width: 50%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; border: 1px solid #ddd; font-family: 'Courier New', Courier, monospace; }
table.pub-table th, table.pub-table td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
table.pub-table th { background-color: #ecf0f1; font-weight: bold; color: #2c3e50; border-top: 2px solid #000; border-bottom: 1px solid #000; text-align: center; }
table.pub-table th:first-child:not([align="center"]) { text-align: left; }
table.pub-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid #ecf0f1; }
table.pub-table td:first-child:not([align="center"]) { text-align: left; font-weight: bold; color: #555; }
table.pub-table tr:last-child td { border-bottom: 2px solid #000; }
table.pub-table tr:hover { background-color: #f5f5f5; }

/* ── Results Table (engine output) ─────────────────────────────── */
.results-table { width: max-content; min-width: 50%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; border: 1px solid #ddd; font-family: 'Courier New', Courier, monospace; }
.results-table th, .results-table td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
.results-table th { background-color: #ecf0f1; font-weight: bold; color: #2c3e50; border-top: 2px solid #000; border-bottom: 1px solid #000; text-align: center; }
.results-table th:first-child:not([align="center"]) { text-align: left; }
.results-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid #ecf0f1; }
.results-table td:first-child:not([align="center"]) { text-align: left; font-weight: bold; color: #555; }
.results-table tr:last-child td { border-bottom: 2px solid #000; }
.results-table tr:hover { background-color: #f5f5f5; }

/* ── Analysis Output (engine HTML) ─────────────────────────────── */
.analysis-output h3 { text-align: center; color: #2c3e50; font-size: 24px; font-weight: bold; border-bottom: 2px solid #2c3e50; padding-bottom: 10px; margin-bottom: 30px; }
.analysis-output h4 { color: #2c3e50; font-weight: bold; font-size: 18px; margin-top: 30px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.analysis-output h5 { color: #2980b9; font-weight: bold; font-size: 16px; margin-top: 25px; margin-bottom: 10px; text-align: left; border-bottom: 1px solid #eee; padding-bottom: 5px; }
/* .card p (below, for the small dashboard preview cards) sets a 35px bottom
   margin and center-aligns text; both leak into here because the results
   panel is itself wrapped in a .card element, turning every Interpretation
   paragraph into short, wastefully-spaced, centered fragments instead of a
   normal dense paragraph. Override with the standard report convention:
   justified body text (text-align-last: left keeps a short final line from
   stretching into an ugly gap) and compact, left-flowing spacing. */
.analysis-output p, .analysis-output li { text-align: justify; text-align-last: left; margin: 0 0 0.6em; flex-grow: 0; font-size: inherit; color: inherit; }
.analysis-output ul, .analysis-output ol { text-align: left; }

/* ── Forms ──────────────────────────────────────────────────────── */
textarea, input[type="text"], input[type="number"], input[type="email"], input[type="password"], select { width: 100%; border: 1px solid #ccc; border-radius: 4px; padding: 10px; box-sizing: border-box; font-family: inherit; resize: vertical; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s; background: #f9fafb; }
textarea:focus, input:focus, select:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); outline: none; background: #fff; }
textarea { font-family: 'Courier New', Courier, monospace; min-height: 180px; }
label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; color: #374151; }
.form-group { margin-bottom: 18px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-submit, .btn-action { color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; margin-top: 15px; transition: background 0.2s; }
.btn-submit { background-color: #27ae60; }
.btn-submit:hover { background-color: #2ecc71; }
.btn-cancel { background-color: #e74c3c; color: #fff; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; margin-left: 10px; }
.btn-cancel:hover { background-color: #c0392b; }
.btn-copy { background-color: #2980b9; color: #fff; padding: 5px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; float: right; }
.btn-copy:hover { background-color: #3498db; }
.btn-action { background-color: #7f8c8d; font-size: 14px; margin-top: 0; margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); text-decoration: none; }
.btn-primary { background-color: #27ae60; color: #fff; padding: 12px 24px; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background 0.2s; }
.btn-primary:hover { background-color: #2ecc71; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background-color: #7f8c8d; color: #fff; padding: 12px 24px; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background 0.2s; }
.btn-secondary:hover { background-color: #95a5a6; }
.btn-outline { background: transparent; color: #3498db; border: 1px solid #3498db; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.btn-outline:hover { background: #3498db; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-launch { background-color: #3498db; color: white; padding: 8px 15px; border: none; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 14px; display: inline-block; cursor: pointer; }
.btn-launch:hover { background-color: #2980b9; text-decoration: none; }
.btn-disabled { background-color: #bdc3c7; color: white; cursor: not-allowed; }

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert { padding: 12px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; margin-bottom: 20px; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fff8e6; color: #7a5a10; border: 1px solid #f3d9a4; }

/* ── Badge / Status ────────────────────────────────────────────── */
.badge { background-color: #3498db; color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; }
.badge-cat { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-experimental { background: #e8f5e9; color: #2e7d32; }
.badge-genetics { background: #f3e5f5; color: #7b1fa2; }
.badge-economics { background: #e3f2fd; color: #1565c0; }
.badge-multivariate { background: #fff3e0; color: #e65100; }
.badge-nonparametric { background: #e0f2f1; color: #00695c; }
.badge-basic { background: #eceff1; color: #546e7a; }
.status-ready { color: #27ae60; font-weight: 600; font-size: 12px; }
.status-pending { color: #bdc3c7; font-size: 12px; }

/* ── Search bar ────────────────────────────────────────────────── */
.search-bar { max-width: 1160px; margin: 15px auto; padding: 0 20px; display: flex; gap: 10px; align-items: center; }
.search-bar input { flex: 1; padding: 10px 16px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.search-bar input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { padding: 8px 16px; border: 1px solid #ddd; border-radius: 20px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: #555; transition: all 0.2s; }
.filter-btn:hover { border-color: #3498db; color: #3498db; }
.filter-btn.active { background: #3498db; color: #fff; border-color: #3498db; }

/* ── Footer ────────────────────────────────────────────────────── */
.footer { background-color: #2c3e50; color: #ecf0f1; padding: 15px; text-align: center; font-size: 13px; line-height: 1.5; margin-top: auto; }

/* ── Modal ──────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: #fff; border-radius: 12px; max-width: 800px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.modal-lg { max-width: 900px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #eee; }
.modal-header h2 { margin: 0; border: none; padding: 0; font-size: 1.3rem; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #7f8c8d; padding: 4px 8px; border-radius: 4px; }
.modal-close:hover { background: #f0f0f0; color: #2c3e50; }
.modal-body { padding: 24px; }

/* ── Loading / Spinner ─────────────────────────────────────────── */
.loading-spinner { text-align: center; padding: 60px 20px; color: #7f8c8d; }
.spinner { display: inline-block; width: 36px; height: 36px; border: 3px solid #ecf0f1; border-radius: 50%; border-top-color: #3498db; animation: spin 0.8s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile Drawer ─────────────────────────────────────────────── */
.oz-burger { display: none; position: fixed; top: 10px; left: 10px; z-index: 1300; width: 44px; height: 44px; border: 0; border-radius: 10px; cursor: pointer; background: #2c3e50; color: #fff; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 14px rgba(0,0,0,0.28); }
.oz-burger:active { transform: scale(0.94); }
.oz-backdrop { display: none; }

@media (max-width: 992px) {
  body { flex-direction: column; }
  .oz-burger { display: flex; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 280px; max-width: 84vw; transform: translateX(-100%); transition: transform 0.25s ease; z-index: 1400; box-shadow: 2px 0 18px rgba(0,0,0,0.3); }
  body.nav-open .sidebar { transform: none; }
  .oz-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1350; }
  body.nav-open .oz-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .main-content { margin-left: 0; width: 100%; padding-top: 56px; }
  .container { flex-direction: column; padding: 10px; }
  .left-panel, .right-panel { width: 100%; margin: 0 0 20px 0; box-sizing: border-box; max-height: none; }
  .hub-container { grid-template-columns: 1fr !important; }
  .tool-header h1 { font-size: 1.35rem; }
}

@media (max-width: 560px) {
  .container { padding: 8px; }
  .tool-header { padding-left: 14px; padding-right: 14px; }
  .btn-submit, .btn-launch, .btn-primary { width: 100%; text-align: center; }
}

@media print {
  .no-print { display: none !important; }
  body { background-color: #fff; }
  .main-content { margin-left: 0; width: 100%; }
  .sidebar { display: none; }
  .left-panel, .right-panel { box-shadow: none; }
}

/* ── Theme Picker Button ───────────────────────────────────────── */
.oz-theme-btn { position: fixed; right: 16px; bottom: 16px; z-index: 1500; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: #2c3e50; color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.32); transition: transform 0.15s ease, background 0.15s ease; }
.oz-theme-btn:hover { transform: translateY(-2px); }
.oz-theme-btn:active { transform: scale(0.93); }

.oz-theme-menu { position: fixed; right: 16px; bottom: 72px; z-index: 1501; background: #fff; border: 1px solid #e2e8ee; border-radius: 12px; box-shadow: 0 14px 38px rgba(0,0,0,0.24); padding: 8px; min-width: 194px; display: none; }
.oz-theme-menu.on { display: block; animation: ozTmIn 0.16s ease-out; }
@keyframes ozTmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.oz-theme-menu .hd { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: #8a97a4; font-weight: 700; padding: 6px 10px 8px; }
.oz-theme-opt { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: #2c3e50; font-family: inherit; }
.oz-theme-opt:hover { background: #f1f5f8; }
.oz-theme-opt .sw { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 22px; border: 1px solid rgba(0,0,0,0.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.oz-theme-opt .tick { margin-left: auto; font-size: 12px; opacity: 0; color: #27ae60; }
.oz-theme-opt.sel .tick { opacity: 1; }
.oz-theme-opt.sel { font-weight: 700; }

/* ── Posthoc Options ───────────────────────────────────────────── */
.posthoc-container { margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px; }
.posthoc-label { font-weight: bold; color: #2c3e50; display: block; margin-bottom: 12px; font-size: 14px; text-align: center; }
.posthoc-options { display: flex; justify-content: space-around; background: #f9f9f9; padding: 10px; border-radius: 6px; border: 1px solid #f0f0f0; flex-wrap: wrap; gap: 8px; }
.posthoc-options label { cursor: pointer; display: flex; align-items: center; gap: 5px; font-size: 13px; color: #555; }
.posthoc-options input[type="radio"] { cursor: pointer; margin: 0; }

/* ── Verify Card (dashboard alerts) ────────────────────────────── */
.verify-card { display: flex; align-items: center; gap: 18px; text-decoration: none; background: #fff; border: 1px solid #eaeaea; border-left: 5px solid #3498db; border-radius: 12px; padding: 20px 24px; box-shadow: 0 6px 20px rgba(0,0,0,0.08); transition: transform 0.16s ease, box-shadow 0.16s ease; margin: 20px auto; max-width: 1160px; }
.verify-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.13); }

/* ── Results Placeholder ───────────────────────────────────────── */
.results-placeholder { text-align: center; padding: 60px 20px; color: #bdc3c7; }
.results-placeholder p { color: #bdc3c7; }

/* ── Data Card (reference snippets) ────────────────────────────── */
.data-card { background-color: #f8f9fa; border: 1px solid #ddd; padding: 15px; border-radius: 5px; position: relative; margin-top: 10px; }
.data-card pre { font-family: monospace; font-size: 12px; max-height: 250px; overflow-y: auto; margin: 0; }

/* ── SAS-style subtitles ───────────────────────────────────────── */
.sas-subtitle { color: #2980b9; font-weight: bold; font-size: 16px; margin-top: 30px; margin-bottom: 10px; text-align: left; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.sas-title { text-align: center; color: #2c3e50; font-size: 24px; font-weight: bold; border-bottom: 2px solid #2c3e50; padding-bottom: 10px; margin-bottom: 30px; }

/* ═══════════════════════════════════════════════════════════════════
   TABLE STYLE SWITCHER — 4 selectable output styles
   Applied via .table-style-{name} on #resultsArea or .analysis-output
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. SAS Publication Ready (Default) ────────────────────────── */
/* Booktabs: heavy top+bottom rule on thead, heavy bottom on last row,
   clean white background, right-aligned numbers, bold left labels     */
.table-style-sas table,
.table-style-sas table.pub-table,
.table-style-sas table.results-table {
  border-collapse: collapse !important;
  border-top: 2px solid #1e293b !important;
  border-bottom: 2px solid #1e293b !important;
  border-left: none !important;
  border-right: none !important;
  background: #fff !important;
}
.table-style-sas table th,
.table-style-sas table.pub-table th,
.table-style-sas table.results-table th {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  border-top: 2px solid #1e293b !important;
  border-bottom: 2px solid #1e293b !important;
  border-left: none !important;
  border-right: none !important;
}
.table-style-sas table td,
.table-style-sas table.pub-table td,
.table-style-sas table.results-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
}
.table-style-sas table tr:last-child td,
.table-style-sas table.pub-table tr:last-child td,
.table-style-sas table.results-table tr:last-child td {
  border-bottom: 2px solid #1e293b !important;
}
.table-style-sas table tr:hover td { background: #f8fafc !important; }

/* ── 2. Alternating Striped ─────────────────────────────────────── */
.table-style-striped table,
.table-style-striped table.pub-table,
.table-style-striped table.results-table {
  border-collapse: collapse !important;
  border: 1px solid #d1d5db !important;
  background: #fff !important;
}
.table-style-striped table th,
.table-style-striped table.pub-table th,
.table-style-striped table.results-table th {
  background: #2c3e50 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-top: 2px solid #2c3e50 !important;
  border-bottom: 2px solid #2c3e50 !important;
  border-right: 1px solid #4a6075 !important;
}
.table-style-striped table td,
.table-style-striped table.pub-table td,
.table-style-striped table.results-table td {
  border-bottom: 1px solid #e5e7eb !important;
  border-right: 1px solid #e5e7eb !important;
}
.table-style-striped table tbody tr:nth-child(even) td {
  background: #f0f4f8 !important;
}
.table-style-striped table tbody tr:nth-child(odd) td {
  background: #ffffff !important;
}
.table-style-striped table tr:last-child td {
  border-bottom: 2px solid #2c3e50 !important;
}
.table-style-striped table tbody tr:hover td { background: #dbeafe !important; }

/* ── 3. Clean Grid / Bordered ───────────────────────────────────── */
.table-style-bordered table,
.table-style-bordered table.pub-table,
.table-style-bordered table.results-table {
  border-collapse: collapse !important;
  border: 2px solid #94a3b8 !important;
  background: #fff !important;
}
.table-style-bordered table th,
.table-style-bordered table.pub-table th,
.table-style-bordered table.results-table th {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  border: 1px solid #94a3b8 !important;
  border-bottom: 2px solid #475569 !important;
}
.table-style-bordered table td,
.table-style-bordered table.pub-table td,
.table-style-bordered table.results-table td {
  border: 1px solid #cbd5e1 !important;
  background: transparent !important;
}
.table-style-bordered table tr:last-child td {
  border-bottom: 2px solid #94a3b8 !important;
}
.table-style-bordered table tbody tr:hover td { background: #f1f5f9 !important; }

/* ── 4. Classic Minimalist (pure 3-rule booktabs) ───────────────── */
.table-style-classic table,
.table-style-classic table.pub-table,
.table-style-classic table.results-table {
  border-collapse: collapse !important;
  border-top: 2px solid #374151 !important;
  border-bottom: 2px solid #374151 !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
}
.table-style-classic table th,
.table-style-classic table.pub-table th,
.table-style-classic table.results-table th {
  background: transparent !important;
  color: #111827 !important;
  font-weight: 700 !important;
  border-top: none !important;
  border-bottom: 1px solid #374151 !important;
  border-left: none !important;
  border-right: none !important;
}
.table-style-classic table td,
.table-style-classic table.pub-table td,
.table-style-classic table.results-table td {
  border: none !important;
  background: transparent !important;
  color: #374151 !important;
}
.table-style-classic table tr:last-child td {
  border-bottom: 2px solid #374151 !important;
}
.table-style-classic table tbody tr:hover td { background: #f9fafb !important; }


