/*
 * assets/css/frontend.css
 * File Version: 7
 */

.bm-inv-wrap{
  --bm-border: #b4b5b8;
  --bm-card: #ffffff;
  --bm-text: #0f172a;
  --bm-muted: #64748b;
  --bm-good: #5100ff;
  --bm-bad: #ff0000;

  color: var(--bm-text);
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.bm-inv-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin: 0 0 8px;
}

.bm-inv-h-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  color: var(--bm-muted);
  font-size:13px;
  flex: 1 1 auto;
}

.bm-inv-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-left:auto;
  flex: 0 0 auto;
}

.bm-inv-toolbar form{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.bm-inv-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
  color: var(--bm-muted);
}

.bm-inv-select{
  appearance:none;
  -webkit-appearance:none;
  background: var(--bm-card);
  border:1px solid #e5e7eb;
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  color: var(--bm-text);
  line-height: 1.2;
  box-shadow: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--bm-muted) 50%),
    linear-gradient(135deg, var(--bm-muted) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    calc(100% - 2.2em) 0.55em;
  background-size:6px 6px, 6px 6px, 1px 1.8em;
  background-repeat:no-repeat;
}

.bm-inv-select:focus{
  outline: none;
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.bm-inv-badge{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  white-space: nowrap;
}

.bm-inv-badge strong{
  color: var(--bm-text);
}

.bm-inv-top{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
  margin: 0 0 8px;
}

/* ÜST KARTLAR: satır satır görünüm */
.bm-inv-card{
  grid-column: span 3;
  background: #ffffff;
  border:1px solid var(--bm-border);
  padding: 10px;
}

.bm-inv-card h3{
  margin:0 0 8px;
  font-size:14px;
  font-weight:700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.bm-inv-lines{
  display:flex;
  flex-direction:column;
}

.bm-inv-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:14px;
}

.bm-inv-line strong{
  color: var(--bm-text);
  font-weight: 900;
  text-align:right;
}

.bm-inv-profit{ color: var(--bm-good) !important;}
.bm-inv-loss{ color: var(--bm-bad) !important; }
.bm-inv-mm{ color: var(--bm-muted) !important; }

/* Canlı güncelleme highlight */
.bm-inv-flash-up{
  background: rgba(59, 130, 246, 0.14) !important; /* mavi */
  transition: background-color .25s ease;
}
.bm-inv-flash-down{
  background: rgba(239, 68, 68, 0.14) !important; /* kırmızı */
  transition: background-color .25s ease;
}

/* ÖZET KARTLARI (üst kartların hemen altı) */
.bm-inv-bottom{
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.bm-inv-summary{
  grid-column: span 4;
  background: #ffffff;
  border:1px solid var(--bm-border);
  padding: 10px;
}

.bm-inv-title{
  width:100%;
  position:relative;
  padding: 0px 10px;
  background: #000000;
  color: #ffffff;
  letter-spacing: .06em;
}

.bm-inv-table-wrap{
  background: #efefef;
  overflow:auto;
  box-shadow: none;
}

.bm-inv-table{
  width:100%;
  border:1px solid var(--bm-border);
  border-spacing: 0;
  min-width: 940px;
}

.bm-inv-table th,
.bm-inv-table td{
  padding: 2px 10px;
  font-size: 13px;
  text-align: right;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.bm-inv-table th:first-child,
.bm-inv-table td:first-child{
  text-align:left;
}

.bm-inv-table thead th{
  position: sticky;
  top: 0;
  background: #ffffff;
  color: var(--bm-text);
  z-index: 2;
}

.bm-inv-table tbody tr:nth-child(even) td{
  background: rgba(246, 247, 251, 0.55);
}

.bm-inv-table tbody tr:hover td{
  background: rgba(239, 68, 68, 0.06);
}

.bm-inv-table tfoot td{
  background: #ffffff;
  border-bottom: none;
}

.bm-inv-empty{
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  padding: 16px;
  color: var(--bm-muted);
}

.bm-inv-badge-warn{
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
}

@media (max-width: 980px){
  .bm-inv-card{ grid-column: span 4; }
  .bm-inv-summary{ grid-column: span 4; }
}

@media (max-width: 560px){
  .bm-inv-card{ grid-column: span 6; }
  .bm-inv-summary{ grid-column: span 6; }
  .bm-inv-wrap{ padding: 16px; }
}