/* ============================================================
 * Portfolio Tracker — vlastní styly (doplňují styles.css)
 * ============================================================ */

.portfolio-main {
  max-width: 1280px;
  margin: 0 auto;
  /* 64px = výška fixní dash-navbar + 24px mezera */
  padding: 88px 32px 60px;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .portfolio-main { padding: 76px 12px 40px; }
  .portfolio-title { font-size: 22px; }
  .portfolio-subtitle { font-size: 13px; }
  .portfolio-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .portfolio-header-right {
    flex-wrap: wrap;
    width: 100%;
  }
  .portfolio-header-right .portfolio-btn { flex: 1 1 auto; min-width: 0; }
  .portfolio-header-right .portfolio-btn-icon { flex: 0 0 auto; }
  .portfolio-summary-row { grid-template-columns: 1fr; }
  .portfolio-charts-row { grid-template-columns: 1fr; }
  .portfolio-charts-row > div { min-height: 240px; }
  .portfolio-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .portfolio-tabs::-webkit-scrollbar { display: none; }
  .portfolio-tab { flex-shrink: 0; }
  .portfolio-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .portfolio-table { min-width: 540px; }
  .portfolio-panel-header { padding: 12px 14px; flex-direction: column; align-items: stretch !important; }
  .portfolio-panel-header > div:last-child { display: flex; flex-wrap: wrap; gap: 6px !important; }
  /* Risk dashboard */
  .risk-summary { padding: 12px 14px; grid-template-columns: 1fr 1fr; gap: 8px; }
  .risk-grid { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px; }
  /* Strategie cards */
  .strategy-cards { grid-template-columns: 1fr; padding: 12px 14px; }
  /* Modaly fit width */
  .port-modal-card { max-width: calc(100vw - 24px) !important; width: calc(100vw - 24px); margin: 0 12px; }
  /* Notif popover full width */
  .notif-popover { width: calc(100vw - 24px); right: 12px; left: 12px; }
  /* Tax sub-tabs scrollable */
  .tax-subtabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; white-space: nowrap; }
  .tax-subtab { flex-shrink: 0; }
  /* Pagination wraps better */
  .portfolio-pagination { padding: 10px 14px; }
  .pagination-pages { gap: 2px; margin: 0 4px; }
  .pagination-page { min-width: 24px; padding: 0 6px; }
  /* Strategy modal grid scaled down */
  .strategy-row { grid-template-columns: 28px 1fr 60px 28px; gap: 6px; }
  .strategy-row > :nth-child(4), .strategy-row > :nth-child(3) { display: none; }
  /* Equity chart smaller */
  #strategiesEquityChart { height: 240px !important; }
  .strategy-equity-wrap { margin: 4px 14px 0; }
}

@media (max-width: 480px) {
  .portfolio-main { padding: 72px 8px 30px; }
  .portfolio-title { font-size: 20px; }
  .risk-summary { grid-template-columns: 1fr; }
  .risk-summary-value { font-size: 17px; }
}

/* Header */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.portfolio-header-left { flex: 1; min-width: 280px; }
.portfolio-header-right { display: flex; gap: 10px; flex-wrap: wrap; }

.portfolio-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
  letter-spacing: -0.01em;
}
.portfolio-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Buttons */
.portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.portfolio-btn:active { transform: translateY(1px); }
.portfolio-btn-primary {
  background: #F5C518;
  color: #0a1220;
}
.portfolio-btn-primary:hover { background: #e6b80f; }
.portfolio-btn-primary:disabled {
  background: rgba(245, 197, 24, 0.3);
  color: rgba(10, 18, 32, 0.6);
  cursor: not-allowed;
}
.portfolio-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
.portfolio-btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.portfolio-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.portfolio-btn-danger:hover { background: rgba(239, 68, 68, 0.18); }

/* Premium+ gate */
.premium-gate-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.08), rgba(245, 197, 24, 0.02));
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: 14px;
  margin-bottom: 32px;
  align-items: center;
}
.premium-gate-icon { color: #F5C518; flex-shrink: 0; }
.premium-gate-content h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #fff;
}
.premium-gate-content p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Summary cards */
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.portfolio-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 22px;
}
.portfolio-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.portfolio-summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.portfolio-summary-value--small { font-size: 16px; }
.portfolio-summary-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hero card with sparkline */
.portfolio-summary-card--hero { position: relative; padding-bottom: 26px; overflow: hidden; }
.portfolio-sparkline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  pointer-events: none;
  opacity: 0.85;
}
.portfolio-change {
  margin-left: 10px;
  padding: 1px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.portfolio-change--up   { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.portfolio-change--down { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.portfolio-change--flat { background: rgba(255, 255, 255, 0.06); color: #aaa; }

/* Charts row */
.portfolio-charts {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  margin-bottom: 28px;
}
.portfolio-chart-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}
.portfolio-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 600; font-size: 14px; color: #fff;
}
.portfolio-chart-meta { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.portfolio-chart {
  width: 100%;
  height: 280px;
}
@media (max-width: 900px) {
  .portfolio-charts { grid-template-columns: 1fr; }
}

/* Tabs */
.portfolio-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}
.portfolio-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.portfolio-tab:hover { color: #fff; }
.portfolio-tab.active {
  color: #F5C518;
  border-bottom-color: #F5C518;
}

/* Panel */
.portfolio-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}
.portfolio-panel-header {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Table */
.portfolio-table-wrap { overflow-x: auto; }
.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.portfolio-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}
.portfolio-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ddd;
  vertical-align: middle;
}
.portfolio-table tbody tr:last-child td { border-bottom: none; }
.portfolio-table tbody tr:hover td { background: rgba(245, 197, 24, 0.03); }
.portfolio-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.portfolio-table .empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 16px;
  font-style: italic;
}
.portfolio-table .asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #fff;
}
.portfolio-table .asset-symbol-badge {
  background: rgba(245, 197, 24, 0.15);
  color: #F5C518;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Badges */
.port-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.port-badge--ok       { background: rgba(34, 197, 94, 0.13); color: #22c55e; }
.port-badge--syncing  { background: rgba(59, 130, 246, 0.13); color: #3b82f6; }
.port-badge--pending  { background: rgba(168, 85, 247, 0.13); color: #a855f7; }
.port-badge--error    { background: rgba(239, 68, 68, 0.13); color: #ef4444; }
.port-badge--type     { background: rgba(255, 255, 255, 0.06); color: #ddd; }
.port-badge--side-buy  { background: rgba(34, 197, 94, 0.13); color: #22c55e; }
.port-badge--side-sell { background: rgba(239, 68, 68, 0.13); color: #ef4444; }

/* Tax tab */
.tax-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tax-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}
.tax-summary-card--pnl { border-color: rgba(245, 197, 24, 0.25); background: rgba(245, 197, 24, 0.04); }
.tax-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tax-summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.tax-summary-value--up   { color: #22c55e; }
.tax-summary-value--down { color: #ef4444; }
.tax-summary-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.tax-disclaimer {
  margin: 14px 20px 0;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
}
.tax-disclaimer strong { color: #f59e0b; margin-right: 4px; }
.tax-summary-card--taxable { border-color: rgba(34, 197, 94, 0.22); background: rgba(34, 197, 94, 0.04); }

/* Tax sub-tabs */
.tax-subtabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.tax-subtab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.tax-subtab:hover { color: #fff; }
.tax-subtab.active {
  color: #f5c518;
  border-bottom-color: #f5c518;
}
.tax-subtab-pane {
  padding: 0 20px 16px;
}
.tax-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.tax-toolbar-info { margin-left: auto; font-size: 12px; }

/* Sortable headers */
.portfolio-table.sortable th[data-sort] { cursor: pointer; user-select: none; }
.portfolio-table.sortable th[data-sort]:hover { color: #f5c518; }
.portfolio-table.sortable th[data-sort].sorted-asc::after  { content: ' ▲'; font-size: 10px; opacity: 0.7; }
.portfolio-table.sortable th[data-sort].sorted-desc::after { content: ' ▼'; font-size: 10px; opacity: 0.7; }

/* P/L coloring v table cells */
.portfolio-table .pnl-pos { color: #22c55e; font-weight: 600; }
.portfolio-table .pnl-neg { color: #ef4444; font-weight: 600; }
.portfolio-table .pnl-zero { color: var(--text-muted); }
.portfolio-table .badge-exempt {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.13);
  color: #22c55e;
}

/* ============= Alerts + notifications ============= */
.portfolio-btn-icon {
  padding: 8px 10px;
  min-width: 36px;
}
.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  border-radius: 9px;
  text-align: center;
  border: 2px solid var(--bg, #0b0d12);
  box-sizing: content-box;
}
.notif-popover {
  position: fixed;
  top: 110px;
  right: 24px;
  width: 380px;
  max-height: 460px;
  background: var(--card-bg, #11141b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}
.notif-mark-all {
  background: transparent;
  border: none;
  color: var(--text-muted, #9ca3af);
  font-size: 12px;
  cursor: pointer;
}
.notif-mark-all:hover { color: #f5c518; }
.notif-popover-list {
  overflow-y: auto;
  padding: 4px 0;
}
.notif-empty {
  padding: 28px 16px;
  color: var(--text-muted, #9ca3af);
  font-size: 13px;
  text-align: center;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 100ms;
}
.notif-item:hover { background: rgba(255, 255, 255, 0.03); }
.notif-item-unread { border-left: 3px solid #f5c518; padding-left: 13px; }
.notif-item-title { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.notif-item-body { font-size: 12px; color: #cbd5e1; line-height: 1.4; }
.notif-item-time { font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 6px; }

/* Alert table */
#alertsTable td .alert-actions { display: inline-flex; gap: 6px; }
#alertsTable .alert-toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: #6b7280; cursor: pointer; position: relative;
  transition: background 150ms;
}
#alertsTable .alert-toggle.on { background: #22c55e; }
#alertsTable .alert-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left 150ms;
}
#alertsTable .alert-toggle.on::after { left: 18px; }
#alertsTable .alert-icon-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted, #9ca3af);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
#alertsTable .alert-icon-btn:hover { color: #fff; border-color: #f5c518; }
#alertsTable .alert-icon-btn.danger:hover { color: #ef4444; border-color: #ef4444; }
.port-badge-channel {
  display: inline-block; padding: 2px 6px; font-size: 11px;
  border-radius: 4px; background: rgba(245, 197, 24, 0.12); color: #f5c518;
  margin-right: 4px;
}

/* ============= Pagination ============= */
.portfolio-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  font-size: 13px;
}
.pagination-info { color: var(--text-muted, #9ca3af); }
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pagination-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 120ms;
}
.pagination-btn:hover:not(:disabled) {
  border-color: #f5c518;
  color: #f5c518;
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 8px;
}
.pagination-page {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 120ms;
}
.pagination-page:hover { color: #f5c518; border-color: #f5c518; }
.pagination-page.active {
  background: #f5c518;
  color: #0b0d12;
  border-color: #f5c518;
  font-weight: 600;
}
.pagination-ellipsis { color: var(--text-muted, #9ca3af); padding: 0 4px; }

/* ============= Strategy cards ============= */
.strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.strategy-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--strat-color, #FFCB05);
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  transition: transform 100ms, border-color 100ms;
}
.strategy-card:hover { border-color: var(--strat-color, #FFCB05); transform: translateY(-1px); }
.strategy-card-title {
  font-size: 14px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.strategy-card-trades { font-size: 11px; color: var(--text-muted, #9ca3af); }
.strategy-card-pnl {
  font-size: 22px; font-weight: 700; margin: 8px 0 4px;
}
.strategy-card-pnl.up { color: #22c55e; }
.strategy-card-pnl.down { color: #ef4444; }
.strategy-card-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  font-size: 11px; color: var(--text-muted, #9ca3af);
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.strategy-card-meta strong { color: #cbd5e1; font-weight: 600; }
.strategy-card-meta .pnl-pos { color: #22c55e; font-weight: 600; }
.strategy-card-meta .pnl-neg { color: #ef4444; font-weight: 600; }

/* Strategy assign chip in Accounts table */
.strategy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 120ms;
}
.strategy-chip:hover { border-color: #f5c518; }
.strategy-chip-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--strat-color, #6b7280);
  display: inline-block;
}
.strategy-chip-empty { color: var(--text-muted, #9ca3af); font-style: italic; }

/* Strategy edit row in modal */
.strategy-row {
  display: grid;
  grid-template-columns: 30px 1fr 90px 70px 90px 30px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.strategy-row input[type=color] { width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; cursor: pointer; }

/* Equity curve */
.strategy-equity-wrap {
  margin: 4px 20px 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 8px;
}
.strategy-equity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 8px;
}
.strategy-equity-header h3 {
  font-size: 12px;
  margin: 0;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.strategy-equity-legend {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: #cbd5e1;
}
.strategy-equity-legend .legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.strategy-equity-legend .legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--strat-color, #FFCB05);
}

/* ============= AI Insights ============= */
.insights-list { padding: 4px 20px 20px; }
.insight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #6b7280;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 12px 0;
  position: relative;
}
.insight-card.severity-info { border-left-color: #3b82f6; }
.insight-card.severity-warning { border-left-color: #f59e0b; }
.insight-card.severity-critical { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.04); }
.insight-card.severity-positive { border-left-color: #22c55e; background: rgba(34, 197, 94, 0.04); }
.insight-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.insight-severity-icon {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}
.severity-info .insight-severity-icon { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.severity-warning .insight-severity-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.severity-critical .insight-severity-icon { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.severity-positive .insight-severity-icon { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.insight-title { font-size: 15px; font-weight: 600; color: #fff; flex: 1; }
.insight-strategy-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.insight-body { color: #cbd5e1; font-size: 14px; line-height: 1.55; margin: 8px 0; }
.insight-body strong { color: #fff; }
.insight-suggestion {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.16);
  border-radius: 8px;
  font-size: 13px;
  color: #fde68a;
}
.insight-suggestion::before { content: '→'; color: #FFCB05; flex-shrink: 0; font-weight: 700; }
.insight-actions {
  display: flex; gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.insight-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #9ca3af);
  padding: 4px 10px; border-radius: 6px;
  cursor: pointer;
  transition: all 120ms;
  font-size: 12px;
}
.insight-action-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.insight-meta { font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 4px; }
.insight-llm-badge {
  display: inline-block; padding: 1px 6px;
  background: rgba(168, 85, 247, 0.18); color: #c084fc;
  border-radius: 3px; font-size: 10px;
  margin-left: 6px; font-weight: 600;
}

/* ============= Risk Dashboard ============= */
.risk-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}
.risk-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}
.risk-summary-card.warning { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.04); }
.risk-summary-card.critical { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.06); }
.risk-summary-card.positive { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.04); }
.risk-summary-label {
  font-size: 11px; color: var(--text-muted, #9ca3af);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.risk-summary-value {
  font-size: 20px; font-weight: 700; color: #fff;
}
.risk-summary-value.up { color: #22c55e; }
.risk-summary-value.down { color: #ef4444; }
.risk-summary-meta {
  font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 4px;
}

.risk-banner {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 4px solid;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.risk-banner.critical { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.risk-banner.warning { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.06); }
.risk-banner-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}
.risk-banner.critical .risk-banner-icon { background: rgba(239,68,68,0.2); color: #f87171; }
.risk-banner.warning .risk-banner-icon { background: rgba(245,158,11,0.2); color: #fbbf24; }
.risk-banner-title { font-weight: 600; color: #fff; margin-bottom: 4px; }
.risk-banner-body { color: #cbd5e1; font-size: 13px; line-height: 1.4; }

.risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 16px 20px;
}
@media (max-width: 1100px) { .risk-grid { grid-template-columns: 1fr; } }
.risk-grid-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
}
.risk-grid-card h3 {
  font-size: 12px; color: var(--text-muted, #9ca3af);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600; margin: 0 0 10px;
}
.risk-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: 8px; align-items: center;
  margin: 6px 0;
  font-size: 13px;
}
.risk-bar-row .label { color: #cbd5e1; font-weight: 500; }
.risk-bar-row .value { color: var(--text-muted, #9ca3af); text-align: right; font-size: 12px; }
.risk-bar-track {
  height: 8px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; overflow: hidden;
}
.risk-bar-fill {
  height: 100%; background: var(--bar-color, #f5c518);
  border-radius: 4px;
  transition: width 200ms;
}

.sizing-result {
  margin-top: 16px; padding: 14px;
  background: rgba(245, 197, 24, 0.06);
  border: 1px solid rgba(245, 197, 24, 0.2);
  border-radius: 8px;
}
.sizing-result-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sizing-result-row:last-child { border-bottom: none; }
.sizing-result-row strong { color: #FFCB05; font-weight: 700; }
.sizing-result-row .label { color: #cbd5e1; }
.sizing-result-row.highlight { padding: 8px 0; }
.sizing-result-row.highlight strong { font-size: 16px; }

/* ============= Onboarding ============= */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.onboarding-card {
  background: var(--card-bg, #11141b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}
.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.onboarding-step {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #9ca3af);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all 200ms;
}
.onboarding-step.active {
  background: #FFCB05;
  border-color: #FFCB05;
  color: #0b0d12;
}
.onboarding-step.done {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.onboarding-step-line {
  width: 40px; height: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.onboarding-card h2 {
  font-size: 22px;
  margin: 0 0 14px;
  color: #fff;
  text-align: center;
}
.onboarding-body {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 20px;
}
.onboarding-body strong { color: #fff; }
.onboarding-body ul { padding-left: 18px; margin: 8px 0; }
.onboarding-body li { margin: 4px 0; }
.onboarding-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
@media (max-width: 480px) { .onboarding-cards-grid { grid-template-columns: 1fr; } }
.onboarding-mini-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 120ms;
}
.onboarding-mini-card:hover {
  border-color: #FFCB05;
  background: rgba(245, 197, 24, 0.04);
}
.onboarding-mini-card-icon { font-size: 22px; margin-bottom: 4px; }
.onboarding-mini-card-title {
  font-weight: 600; color: #fff; font-size: 14px;
}
.onboarding-mini-card-desc {
  font-size: 12px; color: var(--text-muted, #9ca3af);
  margin-top: 4px;
}
.onboarding-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* Type toggle in modal */
.port-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px;
}
.port-type-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.port-type-btn:hover { color: #fff; }
.port-type-btn.active {
  background: rgba(245, 197, 24, 0.12);
  color: #F5C518;
}
.port-form-select,
.port-form-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.port-form-select { padding: 10px 13px; font-size: 14px; }
.port-form-select:focus,
.port-form-input:focus { outline: none; border-color: #F5C518; }
.port-form-input::placeholder { color: rgba(255, 255, 255, 0.35); }
/* Webkit search input — odstraní nějaký extra clear ikonu/styling */
.port-form-input[type="search"] { -webkit-appearance: none; appearance: none; }
.port-form-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  margin-left: 4px;
  background: rgba(255,255,255,0.3);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18 6L6 18M6 6l12 12' stroke='black' stroke-width='2' fill='none'/></svg>") center/contain no-repeat;
  cursor: pointer;
}

/* Plans tab UI */
.portfolio-tab-badge {
  display: inline-block;
  margin-left: 5px;
  background: #F5C518;
  color: #0a1220;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  vertical-align: middle;
}
.portfolio-plans-filter {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.plan-filter-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-muted);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.plan-filter-btn:hover { color: #fff; }
.plan-filter-btn.active {
  background: rgba(245, 197, 24, 0.15);
  color: #F5C518;
  border-color: rgba(245, 197, 24, 0.3);
}
.port-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .port-form-grid-2 { grid-template-columns: 1fr; }
}
.port-form-row select {
  width: 100%;
  padding: 10px 13px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}
.port-form-row select:focus { outline: none; border-color: #F5C518; }

/* Adherence score chip */
.adherence-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.adherence-chip--high { background: rgba(34, 197, 94, 0.18); color: #22c55e; }
.adherence-chip--med  { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.adherence-chip--low  { background: rgba(239, 68, 68, 0.18);  color: #ef4444; }

/* ============================================================
 *  Modal — Přidat burzu
 * ============================================================ */
.port-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 9, 16, 0.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px 16px;
  backdrop-filter: blur(6px);
}
.port-modal {
  background: #0e1622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.port-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.port-modal-header h2 {
  margin: 0; font-size: 18px; color: #fff; font-weight: 600;
}
.port-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--text-muted);
  padding: 0 6px;
}
.port-modal-close:hover { color: #fff; }
.port-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}
.port-modal-section { margin-bottom: 22px; }
.port-modal-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Exchange picker grid */
.port-exchange-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.port-exchange-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.port-exchange-card:hover {
  border-color: rgba(245, 197, 24, 0.3);
  background: rgba(245, 197, 24, 0.05);
}
.port-exchange-card.selected {
  border-color: #F5C518;
  background: rgba(245, 197, 24, 0.1);
}
.port-exchange-name { font-weight: 700; color: #fff; font-size: 15px; }
.port-exchange-meta { font-size: 11px; color: var(--text-muted); }

/* Instructions */
.port-modal-instructions h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.port-modal-instructions ul {
  list-style: none;
  padding: 0; margin: 0 0 14px;
  font-size: 13px;
  color: #ccc;
  line-height: 1.55;
}
.port-modal-instructions ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}
.port-modal-instructions ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #F5C518;
}
.port-modal-instructions ul li strong { color: #ef4444; }

.port-modal-help {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0;
  margin-top: 8px;
}
.port-modal-help summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #F5C518;
}
.port-modal-help summary::marker { content: "▸ "; }
.port-modal-help[open] summary::marker { content: "▾ "; }
.port-modal-help ol {
  margin: 8px 0 14px 28px;
  font-size: 13px;
  color: #ccc;
  line-height: 1.6;
}
.port-modal-help ol li { margin-bottom: 5px; }
.port-modal-help em { color: #ef4444; font-style: normal; }

/* Form */
.port-modal-form { display: flex; flex-direction: column; gap: 14px; }
.port-form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.port-form-row input {
  width: 100%;
  padding: 10px 13px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: monospace;
  transition: border-color 0.15s;
}
.port-form-row input:focus {
  outline: none;
  border-color: #F5C518;
}

.port-form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.port-form-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #22c55e;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.port-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Mobile */
@media (max-width: 640px) {
  .portfolio-main { padding: 16px; }
  .portfolio-title { font-size: 22px; }
  .port-exchange-grid { grid-template-columns: 1fr; }
  .portfolio-table thead th,
  .portfolio-table tbody td { padding: 9px 12px; font-size: 12.5px; }
}

/* Report bug button — sjednoceno s dashboardem */
.dash-bug-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #8a99a8;
  line-height: 1.4;
  transition: all 0.2s;
  margin-right: 4px;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.dash-bug-btn:hover {
  background: rgba(245,197,24,0.1);
  border-color: rgba(245,197,24,0.3);
  color: #F5C518;
}

/* ===========================================================
 * Phase 11 — AI plan extraction from chart screenshot
 * =========================================================== */
.ai-plan-box {
  background: linear-gradient(135deg, rgba(245,197,24,0.06) 0%, rgba(126, 87, 255, 0.04) 100%);
  border: 1px solid rgba(245,197,24,0.18);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
}
.ai-plan-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ai-plan-icon { font-size: 18px; }
.ai-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: #F5C518;
  letter-spacing: 0.02em;
}
.ai-plan-badge {
  background: rgba(126,87,255,0.18);
  color: #b39bff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ai-plan-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 12px;
  line-height: 1.5;
}
.ai-plan-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.ai-plan-input-row .port-form-input {
  flex: 1;
}
.ai-plan-dropzone {
  border: 1.5px dashed rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  background: rgba(0,0,0,0.18);
}
.ai-plan-dropzone:hover,
.ai-plan-dropzone.dragover,
.ai-plan-dropzone:focus-visible {
  border-color: #F5C518;
  background: rgba(245,197,24,0.05);
  outline: none;
}
.ai-plan-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ai-plan-dropzone-icon {
  font-size: 22px;
  opacity: 0.7;
}
.ai-plan-dropzone-text {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.ai-plan-status {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-plan-status.loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(245,197,24,0.25);
  border-top-color: #F5C518;
  border-radius: 50%;
  animation: ai-plan-spin 0.7s linear infinite;
  display: inline-block;
}
.ai-plan-status.error {
  border-color: rgba(239,83,80,0.4);
  color: #ff8a85;
  background: rgba(239,83,80,0.08);
}
@keyframes ai-plan-spin {
  to { transform: rotate(360deg); }
}
.ai-plan-result {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(38,166,154,0.08);
  border: 1px solid rgba(38,166,154,0.3);
  border-radius: 8px;
  font-size: 12.5px;
  color: #b8f0e8;
  line-height: 1.5;
}
.ai-plan-result strong { color: #4ECDC4; }
.ai-plan-thumb {
  margin-top: 10px;
  max-width: 100%;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
}

/* ===========================================================
 * Phase 11 — Position size kalkulačka v plan modalu
 * =========================================================== */
.sizing-box {
  background: linear-gradient(135deg, rgba(78,205,196,0.06) 0%, rgba(245,197,24,0.04) 100%);
  border: 1px solid rgba(78,205,196,0.18);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
}
.sizing-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sizing-icon { font-size: 18px; }
.sizing-title {
  font-size: 14px;
  font-weight: 700;
  color: #4ECDC4;
  letter-spacing: 0.02em;
}
.sizing-hint {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}
.sizing-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.sizing-field { display: flex; flex-direction: column; gap: 4px; }
.sizing-field label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.sizing-output {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.sizing-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sizing-cell-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.sizing-cell-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sizing-cell-val.muted { color: rgba(255,255,255,0.35); }
.sizing-warn {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(245,197,24,0.08);
  border: 1px solid rgba(245,197,24,0.3);
  color: #f5c518;
  font-size: 12px;
  line-height: 1.4;
}
.sizing-warn.error {
  background: rgba(239,83,80,0.08);
  border-color: rgba(239,83,80,0.3);
  color: #ff8a85;
}
@media (max-width: 600px) {
  .sizing-row { grid-template-columns: 1fr 1fr; }
  .sizing-row .sizing-field:first-child { grid-column: 1 / -1; }
  .sizing-output { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================
 * Subaccount selector (po přidání master CEX)
 * =========================================================== */
.sub-selector {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(78,205,196,0.06) 0%, rgba(126,87,255,0.04) 100%);
  border: 1px solid rgba(78,205,196,0.18);
  border-radius: 12px;
}
.sub-selector-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sub-selector-icon { font-size: 18px; }
.sub-selector-title {
  font-size: 14px;
  font-weight: 700;
  color: #4ECDC4;
  letter-spacing: 0.02em;
}
.sub-selector-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0 0 12px;
}
.sub-selector-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 320px;
  overflow-y: auto;
}
.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sub-row:hover { border-color: rgba(78,205,196,0.3); background: rgba(78,205,196,0.05); }
.sub-row.checked { border-color: #4ECDC4; background: rgba(78,205,196,0.08); }
.sub-row input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: #4ECDC4;
  cursor: pointer;
}
.sub-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sub-row-alias {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub-row-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
}
.sub-row-balance {
  font-size: 13px;
  font-weight: 700;
  color: #4ECDC4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sub-row-balance.muted { color: rgba(255,255,255,0.3); font-weight: 400; }
.sub-row-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(38,166,154,0.15);
  color: #4ECDC4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sub-row-status.frozen { background: rgba(239,83,80,0.12); color: #ff8a85; }
.sub-row-status.master { background: rgba(245,197,24,0.15); color: #F5C518; }
.sub-selector-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.sub-selector-empty {
  text-align: center;
  padding: 12px;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  font-style: italic;
}

/* Alias input v subaccount selektoru */
.sub-row-alias-input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  margin: -3px -6px 2px;
}
.sub-row-alias-input:hover { border-color: rgba(255,255,255,0.1); }
.sub-row-alias-input:focus {
  outline: none;
  background: rgba(0,0,0,0.4);
  border-color: rgba(78,205,196,0.4);
}
