/* ==========================================
   ANALYZER — CSS Variables + Shell Layout
   ========================================== */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-tertiary: #6b7280;
}

/* Shell layout: sidebar + main */
.obrot-layout {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.analyzer-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 48px;
  background: var(--bg);
}

/* ==========================================
   SIDEBAR — payroll style (icon-only, hover to expand)
   ========================================== */

.dash-sidebar.analyzer-sidebar {
  position: relative;
  width: 64px;
  min-height: calc(100vh - 56px);
  align-self: stretch;
  background: #1e1e1e;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  transition: width 180ms ease;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.dash-sidebar.analyzer-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(59, 130, 246, 0.1),
    rgba(59, 130, 246, 0.3),
    rgba(59, 130, 246, 0.1)
  );
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 180ms ease;
}

.dash-sidebar.analyzer-sidebar:hover::after {
  opacity: 1;
}

.dash-sidebar.analyzer-sidebar:hover {
  width: 220px;
}

.s-section-label {
  padding: 4px 24px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transition: opacity 160ms ease;
}

.dash-sidebar.analyzer-sidebar:hover .s-section-label {
  opacity: 1;
}

.dash-sidebar.analyzer-sidebar .sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 23px;
  color: #e5e7eb;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 140ms ease, background-color 140ms ease;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  width: 100%;
  box-sizing: border-box;
}

.dash-sidebar.analyzer-sidebar .sidebar-item:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.dash-sidebar.analyzer-sidebar .sidebar-item.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.14);
  border-left: 3px solid #3b82f6;
  padding-left: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(59, 130, 246, 0.2),
    0 0 12px rgba(59, 130, 246, 0.1);
}

.dash-sidebar.analyzer-sidebar .s-icon {
  width: 18px;
  height: 18px;
  stroke: #9ca3af;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.dash-sidebar.analyzer-sidebar .sidebar-item.active .s-icon {
  stroke: #3b82f6;
}

.dash-sidebar.analyzer-sidebar .sidebar-item:hover .s-icon {
  stroke: #d1d5db;
}

.dash-sidebar.analyzer-sidebar .s-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
  display: none;
  white-space: nowrap;
}

.dash-sidebar.analyzer-sidebar:hover .s-label {
  display: inline;
}

.dash-sidebar.analyzer-sidebar .sidebar-item.active .s-label {
  font-weight: 600;
  color: #93c5fd;
}

/* ==========================================
   PREMIUM CARD + BUTTONS
   ========================================== */

.premium-card {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  margin-bottom: 20px;
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 150ms, transform 150ms;
}

.btn-premium:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms;
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* ==========================================
   TAB CONTENT
   ========================================== */

.analyzer-tab-content {
  max-width: 960px;
}

/* ==========================================
   PAGE HEADER (InPost)
   ========================================== */

.analyzer-page-header {
  margin-bottom: 28px;
}

.analyzer-page-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.analyzer-page-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 640px;
}

/* ==========================================
   UPLOAD CARD (InPost)
   ========================================== */

.analyzer-upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 28px;
  background: var(--card-bg);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 24px;
  transition: border-color 200ms;
}

.analyzer-upload-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
}

.upload-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.analyzer-upload-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-label {
  display: inline-block;
  padding: 9px 20px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}

.upload-label:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.upload-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================
   SUMMARY CARD (InPost results)
   ========================================== */

.analyzer-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.analyzer-summary-card h2 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.summary-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-item-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-item-value--warning { color: #f59e0b; }
.summary-item-value--danger  { color: #ef4444; }
.summary-item-value--success { color: #22c55e; }

.summary-total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.summary-total-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-total-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #60a5fa;
}

/* ==========================================
   REPORT CARD (InPost detailed report)
   ========================================== */

.analyzer-report-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.analyzer-report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.analyzer-report-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.report-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms;
}

.report-export-btn:hover {
  background: rgba(59, 130, 246, 0.22);
}

.report-section {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.report-section:last-child { border-bottom: none; }

.report-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-section--warning .report-section-title { color: #f59e0b; }
.report-section--danger  .report-section-title { color: #ef4444; }
.report-section--neutral .report-section-title { color: var(--text-muted); }

.report-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.report-item:last-child { margin-bottom: 0; }

.report-item-title {
  font-weight: 600;
  color: var(--text-primary);
}

.report-item-detail {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.report-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.report-id-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-secondary);
}
