/* ==========================================================================
   ROOMAN ANALYTICS - STUDIO MODULES (REPORTS, DASHBOARDS, CODE STUDIO)
   Ultra-Modern, Professional, Clean-White Canvas, Black Text, Red Accents
   ========================================================================== */

/* --------------------------------------------------------------------------
   Root Variables & Resets for Studio Modules
   -------------------------------------------------------------------------- */
:root {
  --studio-bg: #FFFFFF;
  --studio-surface: #F8FAFC;
  --studio-surface-alt: #F1F5F9;
  --studio-border: #E2E8F0;
  --studio-border-strong: #CBD5E1;
  --studio-text-main: #0F172A;
  --studio-text-muted: #64748B;
  --studio-text-sub: #94A3B8;
  --studio-red: #DC2626;
  --studio-red-dark: #B91C1C;
  --studio-red-light: #FEF2F2;
  --studio-red-border: #FECACA;
  --studio-blue: #2563EB;
  --studio-blue-light: #EFF6FF;
  --studio-green: #16A34A;
  --studio-green-light: #F0FDF4;
  --studio-purple: #7C3AED;
  --studio-purple-light: #F5F3FF;
  --studio-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --studio-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --studio-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --studio-radius-sm: 4px;
  --studio-radius-md: 6px;
  --studio-radius-lg: 8px;
  --studio-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --studio-font-mono: 'JetBrains Mono', Consolas, "Liberation Mono", Menlo, monospace;
}

/* Reset buttons and inputs in studio containers */
.reports-container button,
.dashboards-root button,
.cs-workspace button,
.builder-shell button {
  font-family: var(--studio-font-sans);
  outline: none;
  box-sizing: border-box;
}

/* ==========================================================================
   1. SHARED STUDIO ATOMS: Buttons, Badges, Inputs, Modals
   ========================================================================== */
.studio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--studio-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.studio-btn-primary {
  background: var(--studio-red);
  color: #FFFFFF !important;
  border-color: var(--studio-red);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}
.studio-btn-primary:hover {
  background: var(--studio-red-dark);
  border-color: var(--studio-red-dark);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.studio-btn-secondary {
  background: #FFFFFF;
  color: var(--studio-text-main) !important;
  border-color: var(--studio-border);
  box-shadow: var(--studio-shadow-sm);
}
.studio-btn-secondary:hover {
  background: var(--studio-surface);
  border-color: var(--studio-border-strong);
  color: var(--studio-text-main);
}

.studio-btn-danger-outline {
  background: #FFFFFF;
  color: var(--studio-red) !important;
  border-color: var(--studio-red-border);
}
.studio-btn-danger-outline:hover {
  background: var(--studio-red-light);
  border-color: var(--studio-red);
}

.studio-btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--studio-radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--studio-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.studio-btn-icon:hover {
  background: var(--studio-surface-alt);
  color: var(--studio-text-main);
}
.studio-btn-icon.danger:hover {
  background: var(--studio-red-light);
  color: var(--studio-red);
}

/* Studio Form Controls */
.studio-select,
.studio-input {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--studio-text-main);
  font-family: var(--studio-font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  box-sizing: border-box;
}
.studio-select:focus,
.studio-input:focus {
  border-color: var(--studio-red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

/* Badges */
.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: var(--studio-radius-sm);
  line-height: 1.4;
}
.studio-badge-chart { background: var(--studio-red-light); color: var(--studio-red); border: 1px solid var(--studio-red-border); }
.studio-badge-pivot { background: var(--studio-blue-light); color: var(--studio-blue); border: 1px solid #BFDBFE; }
.studio-badge-summary { background: var(--studio-green-light); color: var(--studio-green); border: 1px solid #BBF7D0; }
.studio-badge-tabular { background: var(--studio-purple-light); color: var(--studio-purple); border: 1px solid #DDD6FE; }
.studio-badge-gray { background: var(--studio-surface-alt); color: var(--studio-text-muted); border: 1px solid var(--studio-border); }

/* ==========================================================================
   2. REPORTS STUDIO MODULE
   ========================================================================== */
.reports-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

/* Header with Four Simple Options */
.reports-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 20px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
}

.reports-header-title h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--studio-text-main);
  letter-spacing: -0.2px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-header-title p {
  font-size: 12px;
  color: var(--studio-text-muted);
  margin: 3px 0 0 0;
}

.reports-dataset-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  background: var(--studio-surface-alt);
  border: 1px solid var(--studio-border);
  border-radius: 3px;
  font-family: var(--studio-font-mono);
  font-size: 11.5px;
  color: var(--studio-text-main);
  font-weight: 600;
}

/* Segmented Control Bar: The 4 Simple Options (No Large Cards) */
.reports-options-bar {
  display: inline-flex;
  align-items: center;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  padding: 3px;
  gap: 3px;
}

.report-opt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--studio-radius-sm);
  color: var(--studio-text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.report-opt-btn:hover {
  background: #FFFFFF;
  color: var(--studio-red);
  box-shadow: var(--studio-shadow-sm);
}

.report-opt-btn.active {
  background: #FFFFFF;
  color: var(--studio-red);
  border-color: var(--studio-border);
  box-shadow: var(--studio-shadow-sm);
}

.report-opt-btn .opt-icon {
  display: flex;
  align-items: center;
  color: currentColor;
}

/* Saved Reports Section */
.saved-reports-section {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  padding: 18px 20px;
  box-shadow: var(--studio-shadow-sm);
}

.saved-reports-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--studio-border);
}

.saved-reports-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--studio-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  background: var(--studio-surface-alt);
  color: var(--studio-text-muted);
  border: 1px solid var(--studio-border);
  border-radius: 10px;
}

/* Reports Table */
.reports-table-wrap {
  overflow-x: auto;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.reports-table th {
  text-align: left;
  padding: 9px 14px;
  background: var(--studio-surface);
  color: var(--studio-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--studio-border);
}

.reports-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--studio-border);
  color: var(--studio-text-main);
  vertical-align: middle;
}

.reports-table tr:last-child td {
  border-bottom: none;
}

.reports-table tr:hover td {
  background: var(--studio-surface);
}

/* ==========================================================================
   BUILDER SHELL (CHART, PIVOT, SUMMARY, TABULAR)
   ========================================================================== */
.builder-shell {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-md);
  min-height: 720px;
}

.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--studio-border);
  background: #FFFFFF;
  border-top-left-radius: var(--studio-radius-md);
  border-top-right-radius: var(--studio-radius-md);
}

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

.builder-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  flex: 1;
  min-height: 660px;
}

/* Builder Sidebar Form Controls */
.builder-sidebar {
  background: var(--studio-surface);
  border-right: 1px solid var(--studio-border);
  padding: 18px 20px;
  overflow-y: auto;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.builder-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--studio-text-muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.builder-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.builder-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--studio-text-main);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.builder-select,
.builder-input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--studio-text-main);
  font-family: var(--studio-font-sans);
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.builder-select:focus,
.builder-input:focus {
  border-color: var(--studio-red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

/* Builder Preview Canvas */
.builder-preview {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  padding: 18px 22px;
  overflow: auto;
}

.builder-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--studio-border);
}

.builder-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--studio-text-main);
}

.builder-preview-canvas {
  width: 100%;
  height: 520px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  background: #FFFFFF;
  position: relative;
}

/* Pivot Grid Table */
.pivot-table,
.summary-table,
.tabular-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pivot-table th,
.summary-table th,
.tabular-table th {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  padding: 8px 12px;
  font-weight: 700;
  color: var(--studio-text-main);
  text-align: left;
}

.pivot-table td,
.summary-table td,
.tabular-table td {
  border: 1px solid var(--studio-border);
  padding: 8px 12px;
  color: var(--studio-text-main);
}

.pivot-table tr:hover td,
.summary-table tr:hover td,
.tabular-table tr:hover td {
  background: var(--studio-surface);
}

.pivot-subtotal-row {
  background: var(--studio-surface-alt);
  font-weight: 700;
}

/* Column Multi-Pill Picker */
.col-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 140px;
  overflow-y: auto;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
}

.col-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--studio-surface-alt);
  border: 1px solid var(--studio-border);
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.col-pill-item:hover {
  background: #FFFFFF;
  border-color: var(--studio-border-strong);
}

.col-pill-item.active {
  background: var(--studio-red-light);
  border-color: var(--studio-red-border);
  color: var(--studio-red);
  font-weight: 700;
}

/* ==========================================================================
   3. DASHBOARDS MODULE — MODERN COLORFUL GLASSMORPHISM REDESIGN
   ========================================================================== */
#view-dashboards {
  background: 
    radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.55) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(252, 231, 243, 0.55) 0px, transparent 50%),
    radial-gradient(at 50% 45%, rgba(243, 232, 255, 0.5) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(220, 252, 231, 0.55) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(254, 243, 199, 0.55) 0px, transparent 50%),
    linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  background-attachment: fixed;
  min-height: calc(100vh - 60px);
  padding-bottom: 60px;
}

.dashboards-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* Glass Top Action Bar */
.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.04), 0 2px 8px -2px rgba(15, 23, 42, 0.02);
}

.dash-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-mode-badge.designer {
  background: rgba(244, 63, 94, 0.12);
  color: #E11D48;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.dash-mode-badge.view {
  background: rgba(59, 130, 246, 0.12);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Glass Tabs Bar */
.dash-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 5px;
  overflow-x: auto;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.03);
}

.dash-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dash-tab-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.6);
}

.dash-tab-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.dash-tab-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  color: #64748B;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dash-tab-add:hover {
  border-color: #6366F1;
  color: #4F46E5;
  background: #FFFFFF;
}

/* Glass Interactive Filter Strip */
.dash-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.03);
}

.dash-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.dash-filter-label {
  font-weight: 700;
  color: #475569;
  font-size: 11.5px;
  letter-spacing: 0.2px;
}

.dash-filter-control {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0F172A;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.dash-filter-control:focus {
  border-color: #6366F1;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* 12-Column Responsive Dashboard Grid */
.dash-canvas-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: 100%;
}

.dash-canvas-grid.compact {
  gap: 12px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .span-3, .span-4 { grid-column: span 6; }
  .span-8 { grid-column: span 12; }
}
@media (max-width: 768px) {
  .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
}

/* Glass Widget Cards */
.dash-widget-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.04), 0 2px 8px -2px rgba(15, 23, 42, 0.02);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  overflow: hidden;
  position: relative;
}

.dash-widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  border-color: rgba(255, 255, 255, 0.95);
}

.dash-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  background: rgba(255, 255, 255, 0.4);
}

.dash-widget-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-widget-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-ctrl-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-ctrl-btn:hover {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.dash-ctrl-btn.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.dash-widget-body {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 120px;
}

/* ==========================================================================
   DISTINCT PASTEL KPI CARDS WITH COLORFUL MATCHING ICONS & PROGRESS ACCENTS
   ========================================================================== */
.dash-widget-card.kpi-card-theme-0 {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9) 0%, rgba(255, 255, 255, 0.82) 100%);
  border: 1px solid rgba(199, 210, 254, 0.8);
}
.dash-widget-card.kpi-card-theme-1 {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9) 0%, rgba(255, 255, 255, 0.82) 100%);
  border: 1px solid rgba(167, 243, 208, 0.8);
}
.dash-widget-card.kpi-card-theme-2 {
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.9) 0%, rgba(255, 255, 255, 0.82) 100%);
  border: 1px solid rgba(254, 205, 211, 0.8);
}
.dash-widget-card.kpi-card-theme-3 {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(255, 255, 255, 0.82) 100%);
  border: 1px solid rgba(253, 230, 138, 0.8);
}

.kpi-glass-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 4px 2px;
}

.kpi-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.kpi-label-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.2px;
}

.kpi-icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.kpi-value-row {
  margin: 12px 0 10px 0;
}

.kpi-value-text {
  font-size: 34px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.8px;
  line-height: 1.1;
  font-family: 'Inter', -apple-system, sans-serif;
}

.kpi-card-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.kpi-meta-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-subtext {
  font-size: 11.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.kpi-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(226, 232, 240, 0.7);
  border-radius: 4px;
  overflow: hidden;
}

.kpi-progress-bar {
  height: 100%;
  border-radius: 4px;
}

/* Legacy compatibility classes */
.widget-kpi-display {
  height: 100%;
}
.widget-kpi-val {
  font-size: 34px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.8px;
}
.widget-kpi-sub {
  font-size: 11.5px;
  color: #64748B;
}

/* Text Widget */
.widget-text-display {
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
  white-space: pre-wrap;
}

/* ==========================================================================
   4. CODE STUDIO MODULE (PYSTUDIO IDE)
   ========================================================================== */
.cs-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 20px 40px;
}

/* Header */
.cs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
}

.cs-kernel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--studio-surface-alt);
  border: 1px solid var(--studio-border);
  border-radius: 4px;
  font-family: var(--studio-font-mono);
  font-size: 11.5px;
  color: var(--studio-text-main);
  font-weight: 600;
}

.cs-kernel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--studio-green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Mode Switcher Tabs */
.cs-mode-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  padding: 2px;
  gap: 2px;
}

.cs-mode-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--studio-text-muted);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-mode-tab:hover {
  color: var(--studio-text-main);
}

.cs-mode-tab.active {
  background: #FFFFFF;
  color: var(--studio-red);
  font-weight: 700;
  box-shadow: var(--studio-shadow-sm);
}

/* Action Toolbar */
.cs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
}

/* Layout: Sidebar (280px) + Main Editor Pane */
.cs-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 14px;
  min-height: 680px;
}

/* Left Sidebar */
.cs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  padding: 14px;
  box-shadow: var(--studio-shadow-sm);
  max-height: 720px;
  overflow-y: auto;
}

.cs-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--studio-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--studio-border);
}

/* File Tree */
.cs-file-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-file-folder {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--studio-text-muted);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 20px;
  border-radius: var(--studio-radius-sm);
  font-size: 12px;
  font-family: var(--studio-font-mono);
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-file-item:hover {
  background: var(--studio-surface-alt);
}

.cs-file-item.active {
  background: var(--studio-red-light);
  color: var(--studio-red);
  font-weight: 700;
}

/* Columns Selector List */
.cs-columns-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.cs-col-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  font-size: 11.5px;
  font-family: var(--studio-font-mono);
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-col-item:hover {
  border-color: var(--studio-red);
  background: #FFFFFF;
  color: var(--studio-red);
}

.cs-type-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  text-transform: uppercase;
}
.cs-type-pill.num { background: #DCFCE7; color: #166534; }
.cs-type-pill.cat { background: #DBEAFE; color: #1E40AF; }
.cs-type-pill.date { background: #FEF3C7; color: #92400E; }

/* Snippets List */
.cs-snippets-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-snippet-item {
  padding: 6px 8px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  font-size: 11.5px;
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cs-snippet-item:hover {
  background: #FFFFFF;
  border-color: var(--studio-red);
  color: var(--studio-red);
}

/* Main Editor & Console Pane */
.cs-main-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Editor Container */
.cs-editor-container {
  display: flex;
  flex-direction: column;
  background: #18181B; /* Dark modern IDE editor */
  border: 1px solid #27272A;
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-md);
  overflow: hidden;
}

.cs-editor-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #09090B;
  border-bottom: 1px solid #27272A;
  color: #A1A1AA;
  font-size: 11.5px;
  font-family: var(--studio-font-mono);
}

.cs-editor-textarea {
  width: 100%;
  height: 360px;
  background: #18181B;
  color: #F4F4F5;
  font-family: var(--studio-font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 14px 16px;
  border: none;
  outline: none;
  resize: vertical;
  tab-size: 4;
  box-sizing: border-box;
}

/* Output / Results Panel */
.cs-output-panel {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
  overflow: hidden;
  min-height: 240px;
}

.cs-output-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
}

.cs-output-tab {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--studio-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.cs-output-tab:hover {
  color: var(--studio-text-main);
}

.cs-output-tab.active {
  color: var(--studio-red);
  border-bottom-color: var(--studio-red);
  font-weight: 700;
  background: #FFFFFF;
}

.cs-console-output {
  padding: 12px 16px;
  background: #09090B;
  color: #22C55E; /* Terminal green */
  font-family: var(--studio-font-mono);
  font-size: 12px;
  line-height: 1.6;
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.cs-console-output.error {
  color: #EF4444;
}

/* ML Scorecards */
.ml-scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ml-card {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-top: 3px solid var(--studio-red);
  border-radius: var(--studio-radius-sm);
  padding: 10px 14px;
  box-shadow: var(--studio-shadow-sm);
}

.ml-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-text-muted);
  text-transform: uppercase;
}

.ml-card-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--studio-text-main);
  font-family: var(--studio-font-mono);
  margin-top: 4px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex !important;
}

.modal-content {
  background: #FFFFFF;
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-lg);
  padding: 20px 24px;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--studio-border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--studio-text-main);
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   CodeStudio Alias Classes matching codestudio.js DOM elements
   -------------------------------------------------------------------------- */
.codestudio-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

.studio-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 20px;
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
}

.studio-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--studio-text-main);
  letter-spacing: -0.2px;
}

.studio-kernel-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--studio-surface-alt);
  color: #16A34A;
  border: 1px solid #BBF7D0;
  border-radius: 4px;
  font-family: var(--studio-font-mono);
  font-weight: 600;
}

.studio-mode-pills {
  display: inline-flex;
  align-items: center;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  padding: 2px;
  gap: 2px;
}

.studio-mode-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--studio-text-muted);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-mode-pill:hover {
  color: var(--studio-text-main);
}

.studio-mode-pill.active {
  background: #FFFFFF;
  color: var(--studio-red);
  font-weight: 700;
  box-shadow: var(--studio-shadow-sm);
}

.studio-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.studio-grid-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-panel-card {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
  overflow: hidden;
}

.studio-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--studio-text-muted);
}

.studio-panel-body {
  padding: 12px 14px;
  overflow-y: auto;
}

.studio-file-tree {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tree-folder-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-text-muted);
  padding: 2px 4px;
}

.tree-file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 16px;
  border-radius: var(--studio-radius-sm);
  font-size: 12px;
  font-family: var(--studio-font-mono);
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tree-file-item:hover {
  background: var(--studio-surface-alt);
}

.tree-file-item.active {
  background: var(--studio-red-light);
  color: var(--studio-red);
  font-weight: 700;
}

.studio-col-chip-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 160px;
  overflow-y: auto;
}

.studio-col-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-sm);
  font-size: 11.5px;
  font-family: var(--studio-font-mono);
  color: var(--studio-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-col-item:hover {
  border-color: var(--studio-red);
  background: #FFFFFF;
  color: var(--studio-red);
}

.col-type-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
}

.studio-main-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-editor-container {
  background: #18181B;
  border: 1px solid #27272A;
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-md);
  overflow: hidden;
}

.studio-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #09090B;
  border-bottom: 1px solid #27272A;
  color: #A1A1AA;
}

.editor-file-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--studio-font-mono);
  color: #FFFFFF;
}

.studio-editor-box {
  display: flex;
  height: 360px;
  background: #18181B;
}

.studio-line-numbers {
  width: 44px;
  padding: 12px 6px;
  background: #121215;
  color: #52525B;
  font-family: var(--studio-font-mono);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
  user-select: none;
  border-right: 1px solid #27272A;
  white-space: pre;
  overflow: hidden;
}

.studio-code-area {
  flex: 1;
  padding: 12px 14px;
  background: transparent;
  color: #F4F4F5;
  font-family: var(--studio-font-mono);
  font-size: 13px;
  line-height: 1.6;
  border: none;
  outline: none;
  resize: none;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}

.studio-console-card,
.studio-output-card {
  background: #FFFFFF;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-md);
  box-shadow: var(--studio-shadow-sm);
  overflow: hidden;
}

.studio-console-header,
.studio-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
}

.studio-console-title,
.studio-output-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--studio-text-main);
}

.studio-console-body {
  padding: 12px 16px;
  background: #09090B;
  color: #22C55E;
  font-family: var(--studio-font-mono);
  font-size: 12px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.studio-console-body.error {
  color: #EF4444;
}

.studio-output-body {
  padding: 14px 16px;
  min-height: 120px;
  max-height: 380px;
  overflow: auto;
}

/* --------------------------------------------------------------------------
   Top Navbar Navigation: Large standalone icons, display name only when clicked
   -------------------------------------------------------------------------- */
.nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
}

.nav-item .nav-icon svg {
  width: 25px !important;
  height: 25px !important;
  stroke-width: 2.1 !important;
}

.nav-item .nav-label {
  display: none !important;
}

.nav-item.active {
  padding: 0 16px !important;
  background-color: rgba(220, 38, 38, 0.12) !important;
  border-bottom: 3px solid var(--studio-red) !important;
}

.nav-item.active .nav-label {
  display: inline-block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.2px !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
  animation: nav-label-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ==========================================================================
   SHARE FEATURE: EXECUTIVE PDF SHARING MODAL & CONTROLS
   ========================================================================== */
.share-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.18s ease-out;
}

.share-modal-dialog {
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #E2E8F0;
  background: rgba(248, 250, 252, 0.85);
}

.share-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.share-pill-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 20px;
}
.share-pill-badge.badge-dashboard {
  background: rgba(99, 102, 241, 0.12);
  color: #4F46E5;
}
.share-pill-badge.badge-report {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.share-modal-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #64748B;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s;
}
.share-modal-close-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.share-modal-body {
  display: flex;
  flex: 1;
  min-height: 520px;
  max-height: calc(92vh - 75px);
  overflow: hidden;
}

/* Left Column: Form Panel */
.share-form-panel {
  width: 400px;
  min-width: 360px;
  padding: 22px 24px;
  border-right: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-sizing: border-box;
  background: #FFFFFF;
}

.share-target-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
}
.share-target-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.share-form-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.share-chips-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  min-height: 42px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.share-chips-box:focus-within {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.share-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #3730A3;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  animation: fadeIn 0.15s ease-out;
}
.chip-remove-btn {
  background: none;
  border: none;
  color: #6366F1;
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: 4px;
}
.chip-remove-btn:hover {
  color: #DC2626;
}

.share-chips-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 140px;
  font-size: 12.5px;
  font-family: inherit;
  color: #0F172A;
  background: transparent;
  padding: 4px 2px;
}

.share-helper-text {
  font-size: 11px;
  color: #64748B;
  line-height: 1.4;
}

.share-validation-error {
  font-size: 11.5px;
  color: #DC2626;
  font-weight: 600;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 6px 10px;
  border-radius: 6px;
  animation: fadeIn 0.15s;
}

.share-textarea {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-family: inherit;
  color: #0F172A;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.share-textarea:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.share-status-banner {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.share-status-banner.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}
.share-status-banner.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.share-actions-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
  flex-wrap: wrap;
}

.share-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.share-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Right Column: Live PDF Preview */
.share-preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #F1F5F9;
  border-left: 1px solid #E2E8F0;
  overflow: hidden;
}

.share-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
}

.share-preview-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #E2E8F0;
  color: #475569;
}
.share-preview-badge.ready {
  background: #DCFCE7;
  color: #166534;
}
.share-preview-badge.error {
  background: #FEE2E2;
  color: #991B1B;
}

.share-preview-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.share-preview-loading {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.share-pdf-iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.share-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366F1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.share-spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Share Button in Top Bars */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  color: #FFFFFF !important;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
  transition: all 0.15s ease;
}
.btn-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}
