/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f7f8fa;
  --bg-white: #ffffff;
  --border: #e2e5ea;
  --border-light: #eef0f3;
  --text: #1a1d26;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --accent: #1a9a86;
  --accent-hover: #158a78;
  --accent-light: rgba(26, 154, 134, 0.08);
  --accent-bg: rgba(26, 154, 134, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --sidebar-w: 220px;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --purple: #8b5cf6;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  line-height: 1.6;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.sidebar-top {
  padding: 1.25rem 1rem 1rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.logo-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.author-signature {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 0.2rem;
}

/* Sidebar Nav */
.nav-group {
  margin-bottom: 1.25rem;
}

.nav-group-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-light);
  text-transform: uppercase;
  padding: 0 0.5rem;
  margin-bottom: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--accent-light);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

.nav-icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.nav-item.active .nav-dot {
  background: var(--accent);
}

/* Sidebar Bottom */
.sidebar-bottom {
  padding: 1rem;
}

.lang-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.lang-btn {
  padding: 0.3rem 0.65rem;
  border: none;
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* === Main Content === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 2rem 2.5rem 3rem;
  min-width: 0;
  max-width: 1100px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* === Card === */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.badge {
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* === Screen-reader only === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Drop Zone === */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
  background: var(--accent-light);
  border-color: var(--accent);
}

.drop-zone.has-file {
  border-color: var(--accent);
  border-style: solid;
}

.drop-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}

.drop-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.drop-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.drop-filename {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  word-break: break-all;
}

.drop-zone-sm {
  padding: 1.5rem 1rem;
}

.drop-text-sm {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* === Paste Section === */
.paste-section {
  margin-top: 1.25rem;
}

.paste-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.paste-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.paste-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* === Button === */
.btn-primary {
  margin-top: 1.25rem;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === Error Section === */
.error-section {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

.error-section p {
  color: #dc2626;
  font-size: 0.85rem;
}

/* === Compare === */
.compare-uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.compare-slot {
  min-width: 0;
  overflow: hidden;
}

.compare-slot h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

/* === Tables === */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 0.65rem 0.85rem;
  text-align: right;
  font-size: 0.85rem;
  vertical-align: middle;
}

td:not(:first-child) {
  white-space: nowrap;
}

th:not(:first-child) {
  white-space: normal;
  word-wrap: break-word;
  max-width: 250px;
  line-height: 1.3;
}

th:first-child,
td:first-child {
  text-align: left;
  white-space: normal;
  word-break: break-word;
  min-width: 220px;
}

thead th {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}

tbody tr:hover {
  background: var(--accent-light);
}

tbody td {
  font-variant-numeric: tabular-nums;
}

.row-header {
  font-weight: 500;
}

.row-ratio .row-header {
  color: var(--accent);
}

.separator-row td {
  padding: 0.2rem;
  border-bottom: 2px solid var(--accent);
}

.row-main>.row-header {
  font-weight: 600;
  color: var(--text);
}

tr.row-main {
  background: var(--accent-light);
}

/* === Wskaźniki Cards === */
.ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.ratio-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ratio-card:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.ratio-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ratio-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ratio-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.ratio-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
}

.ratio-icon.amber {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.ratio-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
}

.ratio-icon.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.ratio-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ratio-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

.ratio-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-top: 0.1rem;
}

.ratio-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.ratio-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.ratio-bar.green {
  background: var(--green);
}

.ratio-bar.blue {
  background: var(--blue);
}

.ratio-bar.amber {
  background: var(--amber);
}

.ratio-bar.purple {
  background: var(--purple);
}

.ratio-bar.red {
  background: var(--red);
}

.ratio-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.3rem;
}

/* Company summary card at top of wskazniki */
.company-summary {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  row-gap: 1rem;
  column-gap: 2rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.summary-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

/* === Page visibility === */
.hidden {
  display: none !important;
}

/* === Responsive === */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-top {
    padding: 0.75rem;
  }

  .sidebar-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .nav-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0;
  }

  .nav-group-label {
    display: none;
  }

  .sidebar-bottom {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .sidebar-bottom .user-info {
    display: none;
  }

  body {
    flex-direction: column;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .compare-uploads {
    grid-template-columns: 1fr;
  }

  .ratio-grid {
    grid-template-columns: 1fr;
  }

  th:first-child,
  td:first-child {
    min-width: 140px;
  }
}

/* === Login Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.modal-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.logo-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.modal-title span {
  color: var(--accent);
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: #dc2626;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.btn-full {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

/* === User Info (sidebar bottom) === */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.btn-logout:hover {
  color: var(--red);
}

/* === History === */
.history-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.12s, box-shadow 0.12s;
  cursor: pointer;
}

.history-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-company {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.history-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  color: var(--text-muted);
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

/* === Chart Cards === */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.chart-card h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card canvas {
  max-height: 280px;
  width: 100% !important;
}

@media (max-width: 768px) {
  .chart-row {
    grid-template-columns: 1fr;
  }

  .chart-card-wide {
    grid-column: auto;
  }
}

/* === Table Search === */
.table-search {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.table-search:focus {
  outline: none;
  border-color: var(--accent);
}

/* === Change % column === */
.change-positive {
  color: var(--green);
  font-weight: 500;
}

.change-negative {
  color: var(--red);
  font-weight: 500;
}

.change-zero {
  color: var(--text-muted);
}

/* === Company Grid (History) === */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.company-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.company-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
  transform: translateY(-2px);
}

.company-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.company-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.company-card-date {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.btn-back {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.15s, color 0.15s;
}

.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.history-detail-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

/* === History Picker (Compare / Trends) === */
.history-picker {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

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

.history-select {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  max-width: 100%;
}

.history-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* === Trend History Checklist === */
.history-checklist {
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 0.25rem;
}

.history-checklist label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text);
  transition: background 0.15s;
  word-break: break-word;
}

.history-checklist label:hover {
  background: rgba(0, 0, 0, 0.04);
}

.history-checklist input[type="checkbox"] {
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* === AI Summary === */
#ai-summary-container {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.btn-ai {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

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

.btn-ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ai-box {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

.ai-box-header {
  font-weight: 600;
  color: #a855f7;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-box-content {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ai-box-content p {
  margin-bottom: 0.5rem;
}

.ai-box-content p:last-child {
  margin-bottom: 0;
}

/* === Sidebar company indicator === */
#nav-upload-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  display: inline-block;
  vertical-align: middle;
}