/* orders.css
   Sayfalama ve tablo-wrapper products.css'ten gelir (orders.html'de yuklenir).
   Sadece siparis sayfasina ozel stiller burada. */

/* Çoklu seçim: checkbox tıklama alanını genişlet (layout'u kaydırmadan) */
.cb-hit { display: inline-flex; align-items: center; justify-content: center; padding: 8px; margin: -8px; cursor: pointer; }

/* ===== FİLTRE BARI ===== */
.filter-bar {
  background: #0d1f2d; border: 1px solid rgba(45,212,191,0.2);
  border-radius: 8px; margin-bottom: 12px; overflow: hidden;
}
.filter-row {
  display: flex; flex-wrap: nowrap; gap: 8px;
  padding: 14px 16px; justify-content: space-between; align-items: center;
}
.filter-row.row-extra {
  padding: 0 16px; max-height: 0; opacity: 0; flex-wrap: wrap;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}
.filter-bar.expanded .filter-row.row-extra {
  max-height: 200px; opacity: 1; padding: 0 16px 14px 16px;
}
/* .filter-bar scope ile (0,2,x) specificity — products.css'teki .filter-bar button (0,1,1) kuralını ezer */
.filter-bar .fpill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex: 1; justify-content: center; min-width: fit-content;
  background: transparent; border: 1px solid transparent; font-family: inherit;
}
.filter-bar .fpill:hover { transform: translateY(-1px); }
.filter-bar .fpill .dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.filter-bar .fpill .count {
  background: rgba(255,255,255,0.08); padding: 1px 7px;
  border-radius: 8px; font-size: 10px; font-weight: 700; margin-left: 2px;
}
.filter-bar .fpill.active {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  animation: fpill-breathe 2.5s ease-in-out infinite;
}
@keyframes fpill-breathe {
  0%, 100% { filter: brightness(1);    box-shadow: 0 0 8px  var(--c-glow, rgba(45,212,191,0.3)); }
  50%       { filter: brightness(1.15); box-shadow: 0 0 14px var(--c-glow, rgba(45,212,191,0.5)); }
}
.expand-toggle {
  display: flex; justify-content: center; align-items: center;
  padding: 6px 0; cursor: pointer; user-select: none;
  border-top: 1px solid rgba(45,212,191,0.1); transition: background 0.2s ease;
}
.expand-toggle:hover { background: rgba(45,212,191,0.05); }
.expand-toggle .arrow {
  font-size: 10px; color: #94a3b8;
  transition: transform 0.3s ease; display: inline-block;
}
.filter-bar.expanded .expand-toggle .arrow { transform: rotate(180deg); }
.expand-toggle .label {
  font-size: 10px; color: #64748b; letter-spacing: 1px;
  margin-right: 6px; text-transform: uppercase;
}

/* Renk varyantları — (0,2,0) specificity ile products.css'i ezer */
.filter-bar .f-pending   { background: rgba(251,191,36,0.12);  border: 1px solid rgba(251,191,36,0.4);  color: #fbbf24; --c-glow: rgba(251,191,36,0.5); }
.filter-bar .f-pending   .dot { background: #fbbf24; }
.filter-bar .f-ordered   { background: rgba(96,165,250,0.12);  border: 1px solid rgba(96,165,250,0.4);  color: #60a5fa; --c-glow: rgba(96,165,250,0.5); }
.filter-bar .f-ordered   .dot { background: #60a5fa; }
.filter-bar .f-shipped   { background: rgba(168,85,247,0.12);  border: 1px solid rgba(168,85,247,0.4);  color: #c084fc; --c-glow: rgba(168,85,247,0.5); }
.filter-bar .f-shipped   .dot { background: #c084fc; }
.filter-bar .f-delivered { background: rgba(134,239,172,0.12); border: 1px solid rgba(134,239,172,0.4); color: #86efac; --c-glow: rgba(134,239,172,0.5); }
.filter-bar .f-delivered .dot { background: #86efac; }
.filter-bar .f-payment   { background: rgba(34,211,238,0.12);  border: 1px solid rgba(34,211,238,0.4);  color: #22d3ee; --c-glow: rgba(34,211,238,0.5); }
.filter-bar .f-payment   .dot { background: #22d3ee; }
.filter-bar .f-problem   { background: rgba(239,68,68,0.12);   border: 1px solid rgba(239,68,68,0.4);   color: #f87171; --c-glow: rgba(239,68,68,0.5); }
.filter-bar .f-problem   .dot { background: #ef4444; }
.filter-bar .f-refunded  { background: rgba(251,146,60,0.12);  border: 1px solid rgba(251,146,60,0.4);  color: #fb923c; --c-glow: rgba(251,146,60,0.5); }
.filter-bar .f-refunded  .dot { background: #fb923c; }
.filter-bar .f-return    { background: rgba(244,114,182,0.12); border: 1px solid rgba(244,114,182,0.4); color: #f472b6; --c-glow: rgba(244,114,182,0.5); }
.filter-bar .f-return    .dot { background: #f472b6; }
.filter-bar .f-cancelled { background: rgba(100,116,139,0.12); border: 1px solid rgba(100,116,139,0.4); color: #94a3b8; --c-glow: rgba(100,116,139,0.5); }
.filter-bar .f-cancelled .dot { background: #64748b; }

/* ===== SAYFA BASLIGI ===== */
.orders-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.orders-page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.orders-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.last-sync-text {
    font-size: 12px;
    color: #6b7280;
}

.btn-sync {
    background: #2dd4bf;
    color: #0f172a;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.btn-sync:hover:not(:disabled) { background: #14b8a6; }
.btn-sync:disabled { opacity: 0.6; cursor: default; }

.btn-backfill {
    background: transparent;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.btn-backfill:hover:not(:disabled) { border-color: #9ca3af; color: #374151; }
.btn-backfill:disabled { opacity: 0.5; cursor: default; }
body.dark .btn-backfill { color: #475569; border-color: #334155; }
body.dark .btn-backfill:hover:not(:disabled) { color: #94a3b8; border-color: #475569; }

.btn-check-new {
    background: transparent;
    color: #2dd4bf;
    border: 1px solid #2dd4bf;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.btn-check-new:hover:not(:disabled) { background: rgba(45,212,191,0.08); }
.btn-check-new:disabled { opacity: 0.6; cursor: default; }
body.dark .btn-check-new { border-color: #2dd4bf; color: #2dd4bf; }

.btn-refresh-active {
    background: transparent;
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.4);
    padding: 7px 14px; border-radius: 6px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.btn-refresh-active:hover:not(:disabled) { background: rgba(167,139,250,0.08); border-color: #a78bfa; }
.btn-refresh-active:disabled { opacity: 0.6; cursor: default; }

/* ===== MODAL ===== */
.ord-modal-backdrop {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
}
.ord-modal {
    background: #0f172a; border: 1px solid rgba(45,212,191,0.3);
    border-radius: 12px; padding: 28px 32px; min-width: 280px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.ord-modal-title {
    font-size: 15px; font-weight: 600; color: #e2e8f0; margin-bottom: 18px;
}
.ord-modal-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.ord-modal-radio {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: #94a3b8; cursor: pointer;
}
.ord-modal-radio input[type="radio"] { accent-color: #2dd4bf; cursor: pointer; }
.ord-modal-footer { display: flex; justify-content: flex-end; gap: 10px; }
.ord-modal-btn-cancel {
    background: transparent; border: 1px solid #334155; color: #64748b;
    padding: 7px 16px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.ord-modal-btn-cancel:hover { border-color: #475569; color: #94a3b8; }
.ord-modal-btn-ok {
    background: #2dd4bf; color: #0a1822; font-weight: 600;
    border: none; padding: 7px 18px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.ord-modal-btn-ok:hover { background: #14b8a6; }

/* ===== CHART KARTI ===== */
.chart-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 14px;
}

#ordersChart { display: block; width: 100% !important; height: 100% !important; }

.filter-wrap {
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
    padding: 3px;
    background: rgba(45,212,191,0.06);
    border: 1px solid rgba(45,212,191,0.25);
    border-radius: 6px;
}
.fbtn {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: max-width 0.35s ease, padding 0.35s ease, opacity 0.25s ease, background 0.2s ease;
}
.fbtn-active { background: #2dd4bf; color: #0a1822; font-weight: 600; }
.fbtn-hidden { max-width: 0; padding: 4px 0; opacity: 0; overflow: hidden; }
.filter-wrap:hover .fbtn-hidden { max-width: 80px; padding: 4px 10px; opacity: 1; }
.fbtn-hidden:hover { background: rgba(45,212,191,0.15); color: #2dd4bf; }

.chart-card-body {
    height: 180px;
    position: relative;
}

/* ===== BOS DURUM ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    gap: 6px;
    color: #9ca3af;
    text-align: center;
}

.empty-state span { font-size: 1.8rem; line-height: 1; }
.empty-state p    { font-size: 14px; font-weight: 500; margin: 0; }
.empty-state small { font-size: 12px; }

.empty-row {
    text-align: center !important;
    color: #9ca3af;
    padding: 32px 16px !important;
    font-size: 13px;
}

/* ===== KPI GRID ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.kpi-sparkline {
    margin-top: 8px;
    min-height: 28px;
    display: flex;
    align-items: flex-end;
}

/* ===== SIPARIS TABLOSU ===== */
#orders-table {
    width: 100%;
    border-collapse: collapse;
}

#orders-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 10px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

#orders-table td {
    padding: 11px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

#orders-table tbody tr:last-child td { border-bottom: none; }

#orders-table tbody tr:hover td { background: #f9fafb; }

#orders-table th.text-right,
#orders-table td.text-right { text-align: right; }

.order-id {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px !important;
    color: #2dd4bf;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.order-total {
    font-weight: 600;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.order-date {
    color: #6b7280;
    white-space: nowrap;
    font-size: 12px !important;
}

/* ===== DARK MODE ===== */
body.dark .orders-page-header h1 { color: #e2e8f0; }
body.dark .last-sync-text         { color: #64748b; }

body.dark .chart-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}

body.dark .chart-card-header { color: #64748b; }
body.dark .chart-card-body svg text { fill: #94a3b8; }

body.dark .empty-state { color: #475569; }
body.dark .empty-row   { color: #475569; }

body.dark .kpi-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}

body.dark .kpi-label { color: #64748b; }
body.dark .kpi-value { color: #f1f5f9; }

body.dark #orders-table th {
    background: #0f172a;
    border-color: #334155;
    color: #64748b;
}

body.dark #orders-table td {
    border-color: #1e293b;
    color: #cbd5e1;
}

body.dark #orders-table tbody tr:hover td { background: #1e293b; }
body.dark .order-total { color: #e2e8f0; }
body.dark .order-date  { color: #64748b; }

/* ===== ORDER ROWS ===== */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rot  { to { --ang: 360deg; } }

#orders-list { display: flex; flex-direction: column; gap: 8px; }

.ord-empty { text-align: center; color: #9ca3af; padding: 32px 16px; font-size: 13px; }

/* ===== ROW CARD ===== */
.ord-row {
    position: relative;
    overflow: visible;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    transition: border-color 0.3s ease;
}
.ord-row:not(.open):hover { border-color: var(--status-color, #5eead4); }
.ord-row.open             { border-color: var(--status-color, #2dd4bf); }

.ord-row.open::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 11px;
    padding: 1px;
    background: conic-gradient(from var(--ang,0deg),
        transparent 0deg, transparent 340deg,
        var(--status-color, #5eead4) 355deg, #ffffff 360deg, var(--status-color, #5eead4) 365deg,
        transparent 380deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rot 2.8s linear infinite;
    pointer-events: none;
    filter: blur(0.3px);
}

/* ===== SUMMARY ===== */
.ord-summary {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    gap: 10px;
    user-select: none;
    min-height: 52px;
}

.ord-id {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    font-weight: 500;
    color: var(--status-color, #2dd4bf);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}
.ord-id a              { color: inherit; text-decoration: none; }
.ord-id a:hover        { text-decoration: underline; }

.ord-id-copy {
    display: inline-flex; align-items: center; cursor: pointer;
    color: #9ca3af; opacity: 0; transition: opacity 0.15s, color 0.15s;
    margin-left: 5px; vertical-align: middle;
}
.ord-id:hover .ord-id-copy, .ord-id-copy:hover { opacity: 1; color: var(--status-color, #2dd4bf); }
.ord-product-meta span:hover .ord-id-copy { opacity: 1; color: var(--status-color, #2dd4bf); }

.ord-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--status-color, #2dd4bf);
    color: #0a1822;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    min-width: 22px;
    border-radius: 11px;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.ord-spacer { flex: 1; }

.ord-earnings-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    cursor: default;
    flex-shrink: 0;
}
.ord-earnings-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    line-height: 1;
    margin-bottom: 2px;
}
.ord-earnings-val { font-size: 15px; font-weight: 600; color: #059669; font-variant-numeric: tabular-nums; }

/* İki kart yan yana (ORDER EARNINGS + NET PROFIT) */
.ord-summary-cards {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-shrink: 0;
}

.ord-profit-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    cursor: default;
    flex-shrink: 0;
}

.ord-profit-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    line-height: 1;
    margin-bottom: 2px;
}

.ord-profit-val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: #6b7280; }
.ord-profit-val.positive { color: #059669; }
.ord-profit-val.negative { color: #dc2626; }

.ord-profit-wrap:hover .ord-tt { display: block; }
.ord-tt-profit .ord-tt-val.positive { color: #34d399; font-weight: 700; }
.ord-tt-profit .ord-tt-val.negative { color: #f87171; font-weight: 700; }

/* Tooltip */
.ord-tt {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: #0f172a;
    border: 1px solid #2dd4bf;
    border-radius: 8px;
    padding: 12px 14px;
    z-index: 100;
    color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    pointer-events: none;
}
.ord-earnings-wrap:hover .ord-tt { display: block; }
.ord-tt-section {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: #64748b; margin: 8px 0 4px;
}
.ord-tt-section:first-child { margin-top: 0; }
.ord-tt-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2px 0; gap: 8px; border-top: 1px solid #1e293b;
}
.ord-tt-row:first-of-type { border-top: none; }
.ord-tt-key  { font-size: 11px; color: #94a3b8; }
.ord-tt-val  { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ord-tt-val.total    { color: #e2e8f0; font-weight: 600; }
.ord-tt-val.earnings { color: #34d399; font-weight: 700; }
.ord-tt-hr   { border: none; border-top: 1px solid #1e293b; margin: 6px 0; }

.ord-date    { font-size: 12px; color: #6b7280; white-space: nowrap; flex-shrink: 0; }
.ord-chevron { font-size: 11px; color: #9ca3af; transition: transform 0.25s; flex-shrink: 0; }
.ord-row.open .ord-chevron { transform: rotate(180deg); }

/* ===== DETAIL PANEL ===== */
.ord-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}
.ord-row.open .ord-detail { max-height: 1400px; opacity: 1; }

.ord-detail-inner {
    border-top: 1px solid #e5e7eb;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== FRAME LAYOUT ===== */
@property --ang2 { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rot2  { to { --ang2: 360deg; } }

@keyframes chipFlash {
    0%,100% { background: transparent; }
    50%     { background: rgba(45,212,191,0.22); color: #2dd4bf; }
}
.ord-chip-flash { animation: chipFlash 0.3s ease; }

.ord-frame {
    background: #0d1f2d;
    border: 1px solid var(--status-color, #2dd4bf);
    border-radius: 8px;
    padding: 14px;
    position: relative;
    overflow: visible;
    transition: border-color 0.3s ease;
}

/* Running-light animation on frames — only when parent card is open */
.ord-row.open .ord-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 9px;
    padding: 1px;
    background: conic-gradient(from var(--ang2, 0deg),
        transparent 0deg, transparent 340deg,
        var(--status-color, #5eead4) 355deg, #ffffff 360deg, var(--status-color, #5eead4) 365deg,
        transparent 380deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rot2 3.2s linear infinite;
    pointer-events: none;
    filter: blur(0.3px);
}

/* Staggered delays so frames don't spin in sync */
.ord-row.open .ord-detail-inner > .ord-frame:nth-child(1)::before { animation-delay: 0s; }
.ord-row.open .ord-lower-grid   > .ord-frame:nth-child(1)::before { animation-delay: -0.8s; }
.ord-row.open .ord-lower-grid   > .ord-frame:nth-child(2)::before { animation-delay: -1.6s; }
.ord-row.open .ord-detail-inner > .ord-frame:nth-child(3)::before { animation-delay: -2.4s; }

.ord-frame-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.ord-frame-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3d5a6a;
    margin-bottom: 6px;
}

.ord-addr-frame { padding-bottom: 8px; display: flex; flex-direction: column; justify-content: flex-start; }

.ord-addr-copy-hint {
    display: none;
}

.ord-lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

/* Always-dark overrides inside frames */
.ord-frame .ord-side-tag.ebay   { background: #1e3a5f; color: #60a5fa; }
.ord-frame .ord-side-tag.amazon { background: #2a1f0a; color: #fbbf24; }
.ord-frame .ord-thumb, .ord-frame .ord-thumb-ph { border-color: #334155; background: #0f172a; color: #475569; }
.ord-frame .ord-divider-line    { background: linear-gradient(to bottom, transparent, rgba(45,212,191,0.2), transparent); }
.ord-frame .ord-product-title   { color: #e2e8f0; }
.ord-frame .ord-product-title a { color: #e2e8f0; }
.ord-frame .ord-product-title a:hover { color: #2dd4bf; }
.ord-frame .ord-product-meta span { color: #64748b; }
.ord-frame .ord-addr-row        { border-bottom-color: #1e293b; }
.ord-frame .ord-addr-row:last-child { border-bottom: none; }
.ord-frame .ord-addr-row:hover  { background: #1a2f3f; }
.ord-frame .ord-addr-part:hover { background: #1a2f3f !important; color: #2dd4bf !important; }
.ord-frame .ord-addr-text       { color: #cbd5e1; }
.ord-frame .ord-addr-text.muted { color: #475569; }
.ord-frame .ord-addr-part       { color: #cbd5e1; }
.ord-frame .ord-addr-sep        { color: #475569; }
.ord-frame .ord-itemno-link     { color: #cbd5e1; }
.ord-frame .ord-itemno-link:hover { color: #2dd4bf; background: rgba(45,212,191,0.08); }
.ord-frame .ord-asin-link       { color: #cbd5e1; }
.ord-frame .ord-asin-link:hover { color: #fbbf24; background: rgba(251,191,36,0.08); }
.ord-frame .ord-acct-row        { border-top-color: #1e293b; }
.ord-frame .ord-acct-row.gross  { border-top-color: #334155 !important; }
.ord-frame .ord-acct-key        { color: #64748b; }
.ord-frame .ord-acct-val        { color: #e2e8f0; }
.ord-frame .ord-acct-val .green { color: #34d399; }
.ord-frame .ord-acct-val .red   { color: #f87171; }
.ord-frame .ord-inline-input    { background: #0f172a; color: #e2e8f0; border-color: #2dd4bf; }
.ord-frame .ord-strip           { border-top: none; padding-top: 0; }
.ord-frame .ord-strip-label     { color: #3d5a6a; }
.ord-frame .ord-strip-val       { color: #cbd5e1; }

/* ===== MIRROR ===== */
.ord-mirror {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 20px;
}
.ord-divider-line {
    background: linear-gradient(to bottom, transparent, rgba(45,212,191,0.35), transparent);
    align-self: stretch;
}
.ord-side { display: flex; flex-direction: column; gap: 10px; }
.ord-side-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
}
.ord-side-tag.ebay    { background: #eff6ff; color: #1d4ed8; }
.ord-side-tag.amazon  { background: #fefce8; color: #854d0e; }
.ord-product          { display: flex; gap: 12px; align-items: flex-start; }
.ord-thumb {
    width: 88px; height: 88px; border-radius: 8px;
    object-fit: cover; border: 1px solid #e5e7eb;
    background: #f9fafb; flex-shrink: 0; display: block;
    transition: transform 0.25s ease; cursor: zoom-in;
}
.ord-thumb:hover { transform: scale(1.30); z-index: 10; position: relative; }

.ord-thumb-ph {
    width: 88px; height: 88px; border-radius: 8px;
    border: 1px solid #e5e7eb; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    color: #d1d5db; font-size: 2rem; flex-shrink: 0;
    transition: transform 0.25s ease;
}
.ord-thumb-ph:hover { transform: scale(1.30); z-index: 10; position: relative; cursor: zoom-in; }
.ord-product-info { flex: 1; min-width: 0; }
.ord-product-title {
    font-size: 13px; font-weight: 500; color: #1f2937; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ord-product-title a { color: inherit; text-decoration: none; }
.ord-product-title a:hover { color: #2dd4bf; text-decoration: underline; }
.ord-product-meta { margin-top: 5px; display: flex; flex-direction: column; gap: 2px; }
.ord-product-meta span { font-size: 11px; color: #6b7280; font-family: 'Courier New', monospace; }

/* ===== LOWER 2-COL ===== */
.ord-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.ord-address-col h4,
.ord-acct-col h4 {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: #9ca3af; margin: 0 0 8px;
}

.ord-addr-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 4px; border-radius: 4px; cursor: pointer;
    transition: background 0.12s; gap: 6px;
    border-bottom: 1px solid #f3f4f6;
}
.ord-addr-row:last-child { border-bottom: none; }
.ord-addr-row:hover              { background: #f0fdfc; }
.ord-addr-row:hover .ord-addr-hint { opacity: 1; }
.ord-addr-text  { font-size: 12px; color: #374151; line-height: 1.3; }
.ord-addr-text.muted { color: #9ca3af; }
.ord-addr-hint  { font-size: 10px; color: #9ca3af; opacity: 0; transition: opacity 0.12s; white-space: nowrap; flex-shrink: 0; }

.ord-addr-parts-row { cursor: default; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
.ord-addr-parts-row .ord-addr-part:first-child { padding-left: 0; }
.ord-addr-parts-row:hover { background: transparent; }
.ord-addr-part {
    font-size: 12px; color: #374151; cursor: pointer;
    border-radius: 3px; padding: 1px 3px; transition: background 0.12s;
}
.ord-addr-part:hover { background: #ccfbf1; color: #0f766e; }
.ord-addr-sep { font-size: 12px; color: #9ca3af; pointer-events: none; }

.ord-meta-link { text-decoration: none; border-radius: 3px; padding: 1px 2px; transition: color 0.12s, background 0.12s; }
.ord-itemno-link { color: #374151; }
.ord-itemno-link:hover { color: #0d9488; background: #f0fdfc; }
.ord-asin-link { color: #374151; }
.ord-asin-link:hover { color: #d97706; background: #fffbeb; }

.ord-acct-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 12px; gap: 8px;
    border-top: 1px solid #f3f4f6;
}
.ord-acct-row:first-of-type { border-top: none; }
.ord-acct-row.gross  { border-top: 1px solid #e5e7eb !important; }
.ord-acct-key        { color: #6b7280; flex: 1; }
.ord-acct-val        { font-variant-numeric: tabular-nums; color: #1f2937; display: flex; align-items: center; gap: 6px; }
.ord-acct-val.green  { color: #059669; font-weight: 600; }
.payment-status-icon { display: inline-flex; align-items: center; margin-left: 6px; font-size: 12px; }
.payment-status-icon.completed { color: #86efac; }
.payment-status-icon.pending-verification { color: #fbbf24; }

.ord-margin-badge {
    font-size: 9px; font-weight: 600; border-radius: 4px;
    padding: 1px 5px; letter-spacing: 0.03em; user-select: none; white-space: nowrap;
}
.ord-margin-badge.custom { color: #2dd4bf; background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.3); }
.ord-margin-badge.tier   { color: #64748b; background: #1e293b; border: 1px solid #334155; }

.ord-manual-badge {
    font-size: 9px; font-weight: 600; color: #64748b; background: #1e293b;
    border: 1px solid #334155; border-radius: 4px; padding: 1px 5px;
    letter-spacing: 0.03em; user-select: none; white-space: nowrap;
}

.ord-pencil          { font-size: 12px; cursor: pointer; opacity: 0.5; transition: opacity 0.15s; user-select: none; }
.ord-pencil:hover    { opacity: 1; }
.ord-inline-input    { width: 80px; padding: 2px 6px; border: 1px solid #2dd4bf; border-radius: 4px; font-size: 12px; font-family: inherit; outline: none; background: white; color: #1f2937; }

/* ===== STATUS STRIP ===== */
.ord-strip {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: 12px 20px;
    align-items: start;
    padding: 12px 0 0;
    border-top: 1px solid #f3f4f6;
}
.ord-strip-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; margin-bottom: 5px; }
.ord-strip-val   { font-size: 12px; color: #374151; font-family: 'Courier New', monospace; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.ord-tracking-link { color: #e6f1f5 !important; text-decoration: none; font-family: 'Courier New', monospace; }
.ord-tracking-link:hover { text-decoration: underline; opacity: 0.85; }

.ord-carrier-badge {
    font-size: 9px; font-weight: 700; color: #64748b; background: #f1f5f9;
    border: 1px solid #cbd5e1; border-radius: 4px; padding: 1px 5px;
    font-family: inherit; text-transform: uppercase; letter-spacing: 0.04em;
}

.ord-copy-chip {
    font-size: 13px; cursor: pointer; color: #94a3b8; line-height: 1;
    padding: 1px 3px; border-radius: 3px; transition: color 0.12s, background 0.12s;
    font-family: inherit;
}
.ord-copy-chip:hover { color: #e6f1f5; background: rgba(255,255,255,0.08); }

body.dark .ord-tracking-link { color: #e6f1f5 !important; }
body.dark .ord-carrier-badge { background: #1e293b; border-color: #334155; color: #64748b; }
body.dark .ord-copy-chip      { color: #475569; }
body.dark .ord-copy-chip:hover { color: #e6f1f5; }
.ord-strip-field { display: flex; flex-direction: column; gap: 2px; }

.ord-status-wrap     { position: relative; display: inline-block; }
.ord-status-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 8px; border: 1px solid #2dd4bf; border-radius: 14px;
    background: transparent; color: #2dd4bf; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.12s; white-space: nowrap;
}
.ord-status-btn:hover { background: rgba(45,212,191,0.08); }
.ord-status-btn.status-pending            { border-color: rgba(251,191,36,0.5);   color: #fbbf24; }
.ord-status-btn.status-pending:hover      { background: rgba(251,191,36,0.1); }
.ord-status-btn.status-ordered            { border-color: rgba(96,165,250,0.5);   color: #60a5fa; }
.ord-status-btn.status-ordered:hover      { background: rgba(96,165,250,0.1); }
.ord-status-btn.status-shipped            { border-color: rgba(168,85,247,0.5);   color: #c084fc; }
.ord-status-btn.status-shipped:hover      { background: rgba(168,85,247,0.1); }
.ord-status-btn.status-delivered          { border-color: rgba(134,239,172,0.5);  color: #86efac; }
.ord-status-btn.status-delivered:hover    { background: rgba(134,239,172,0.1); }
.ord-status-btn.status-payment-completed  { border-color: rgba(34,211,238,0.5);   color: #22d3ee; }
.ord-status-btn.status-payment-completed:hover { background: rgba(34,211,238,0.1); }
.ord-status-btn.status-problem            { border-color: rgba(239,68,68,0.5);    color: #f87171; }
.ord-status-btn.status-problem:hover      { background: rgba(239,68,68,0.1); }
.ord-status-btn.status-refunded           { border-color: rgba(251,146,60,0.5);   color: #fb923c; }
.ord-status-btn.status-refunded:hover     { background: rgba(251,146,60,0.1); }
.ord-status-btn.status-return             { border-color: rgba(244,114,182,0.5);  color: #f472b6; }
.ord-status-btn.status-return:hover       { background: rgba(244,114,182,0.1); }
.ord-status-btn.status-cancelled          { border-color: rgba(100,116,139,0.5);  color: #94a3b8; }
.ord-status-btn.status-cancelled:hover    { background: rgba(100,116,139,0.1); }
.ord-status-dot           { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ord-status-chev          { font-size: 9px; opacity: 0.7; }

.ord-status-drop {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 160px;
    background: #0f172a; border: 1px solid rgba(45,212,191,0.35); border-radius: 8px;
    overflow: hidden; z-index: 200; box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.ord-status-drop.open { display: block; }
.ord-status-opt {
    display: flex; align-items: center; gap: 6px; padding: 8px 12px;
    font-size: 12px; color: #94a3b8; cursor: pointer; transition: background 0.1s;
}
.ord-status-opt .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.ord-status-opt:hover  { background: rgba(45,212,191,0.08); color: #e2e8f0; }
.ord-status-opt.active { color: #2dd4bf; background: rgba(45,212,191,0.1); }

/* Status-colored dropdown options */
.ord-status-opt.status-pending            { color: #fbbf24; background: transparent; border: none; }
.ord-status-opt.status-pending:hover      { background: rgba(251,191,36,0.1);   color: #fbbf24; }
.ord-status-opt.status-pending.active     { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.ord-status-opt.status-ordered            { color: #60a5fa; background: transparent; border: none; }
.ord-status-opt.status-ordered:hover      { background: rgba(96,165,250,0.1);   color: #60a5fa; }
.ord-status-opt.status-ordered.active     { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.ord-status-opt.status-shipped            { color: #c084fc; background: transparent; border: none; }
.ord-status-opt.status-shipped:hover      { background: rgba(168,85,247,0.1);   color: #c084fc; }
.ord-status-opt.status-shipped.active     { background: rgba(168,85,247,0.15);  color: #c084fc; }
.ord-status-opt.status-delivered          { color: #86efac; background: transparent; border: none; }
.ord-status-opt.status-delivered:hover    { background: rgba(134,239,172,0.1);  color: #86efac; }
.ord-status-opt.status-delivered.active   { background: rgba(134,239,172,0.15); color: #86efac; }
.ord-status-opt.status-payment-completed  { color: #22d3ee; background: transparent; border: none; }
.ord-status-opt.status-payment-completed:hover  { background: rgba(34,211,238,0.1);  color: #22d3ee; }
.ord-status-opt.status-payment-completed.active { background: rgba(34,211,238,0.15); color: #22d3ee; }
.ord-status-opt.status-problem            { color: #f87171; background: transparent; border: none; }
.ord-status-opt.status-problem:hover      { background: rgba(239,68,68,0.1);    color: #f87171; }
.ord-status-opt.status-problem.active     { background: rgba(239,68,68,0.15);   color: #f87171; }
.ord-status-opt.status-refunded           { color: #fb923c; background: transparent; border: none; }
.ord-status-opt.status-refunded:hover     { background: rgba(251,146,60,0.1);   color: #fb923c; }
.ord-status-opt.status-refunded.active    { background: rgba(251,146,60,0.15);  color: #fb923c; }
.ord-status-opt.status-return             { color: #f472b6; background: transparent; border: none; }
.ord-status-opt.status-return:hover       { background: rgba(244,114,182,0.1);  color: #f472b6; }
.ord-status-opt.status-return.active      { background: rgba(244,114,182,0.15); color: #f472b6; }
.ord-status-opt.status-cancelled          { color: #94a3b8; background: transparent; border: none; }
.ord-status-opt.status-cancelled:hover    { background: rgba(100,116,139,0.1);  color: #94a3b8; }
.ord-status-opt.status-cancelled.active   { background: rgba(100,116,139,0.15); color: #94a3b8; }
.ord-status-opt-disabled                  { opacity: 0.4; cursor: not-allowed !important; pointer-events: auto; }
.ord-status-opt-disabled:hover            { background: transparent !important; color: inherit !important; }

/* ===== ACTIONS ===== */
.ord-actions { display: flex; justify-content: center; gap: 10px; padding-top: 4px; flex-wrap: wrap; }

.ord-btn-refresh { color: #6b7280; }
.ord-btn-refresh:hover:not(:disabled) { border-color: #2dd4bf; color: #0d9488; }
.ord-btn-refresh.spinning { pointer-events: none; opacity: 0.7; animation: ordSpin 0.7s linear infinite; }

.ord-btn-danger  { color: #f87171; border-color: #f87171; }
.ord-btn-danger:hover:not(:disabled) { background: rgba(248,113,113,0.08); border-color: #ef4444; color: #ef4444; }
.ord-btn-danger.spinning { pointer-events: none; opacity: 0.7; animation: ordSpin 0.7s linear infinite; }
body.dark .ord-btn-danger { color: #f87171; border-color: #f87171; }
body.dark .ord-btn-danger:hover:not(:disabled) { background: rgba(248,113,113,0.1); border-color: #ef4444; }
@keyframes ordSpin { to { transform: rotate(360deg); } }
.ord-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: 1px solid #e5e7eb; background: white; color: #374151;
    transition: background 0.15s, border-color 0.15s;
}
.ord-btn:hover         { background: #f9fafb; border-color: #d1d5db; }
.ord-btn.primary       { background: #2dd4bf; color: #0f172a; border-color: #2dd4bf; }
.ord-btn.primary:hover { background: #14b8a6; border-color: #14b8a6; }

/* ===== TOAST ===== */
.ord-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #0f172a; color: #e2e8f0; padding: 8px 18px;
    border-radius: 8px; font-size: 13px; border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); z-index: 9999;
    opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; white-space: nowrap;
}
.ord-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LIGHTBOX ===== */
.ord-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: lbFadeIn 0.2s ease forwards;
    cursor: zoom-out;
}
@keyframes lbFadeIn { to { opacity: 1; } }
.ord-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ===== NOTE EDITABLE ===== */
.ord-note-editable {
    display: block;
    cursor: text;
    outline: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s;
    max-height: 3.5em;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 1px 0;
    line-height: 1.5;
    min-height: 1.2em;
    font-family: inherit;
}
.ord-note-editable:hover { border-bottom-color: rgba(45,212,191,0.23); }
.ord-note-editable:focus { border-bottom-color: #2dd4bf; }
.ord-note-editable:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
    pointer-events: none;
}
.ord-frame .ord-note-editable:empty::before { color: #3d5a6a; }

/* ===== DARK MODE — NEW CARDS ===== */
body.dark .ord-row             { background: #1e293b; border-color: #334155; }
body.dark .ord-row:not(.open):hover { border-color: var(--status-color, #5eead4); }
body.dark .ord-row.open        { border-color: var(--status-color, #2dd4bf); }
body.dark .ord-badge           { background: var(--status-color, #2dd4bf); color: #0a1822; }
body.dark .ord-earnings-val      { color: #34d399; }
body.dark .ord-profit-val.positive { color: #34d399; }
body.dark .ord-profit-val.negative { color: #f87171; }
body.dark .ord-date            { color: #64748b; }
body.dark .ord-chevron         { color: #475569; }
body.dark .ord-detail-inner    { border-top-color: #334155; }
body.dark .ord-divider-line    { background: linear-gradient(to bottom,transparent,rgba(45,212,191,0.2),transparent); }
body.dark .ord-side-tag.ebay   { background: #1e3a5f; color: #60a5fa; }
body.dark .ord-side-tag.amazon { background: #2a1f0a; color: #fbbf24; }
body.dark .ord-thumb, body.dark .ord-thumb-ph { border-color: #334155; background: #0f172a; color: #475569; }
body.dark .ord-product-title   { color: #e2e8f0; }
body.dark .ord-product-meta span { color: #64748b; }
body.dark .ord-address-col h4, body.dark .ord-acct-col h4 { color: #64748b; }
body.dark .ord-addr-row:hover  { background: rgba(45,212,191,0.06); }
body.dark .ord-addr-text       { color: #cbd5e1; }
body.dark .ord-addr-text.muted { color: #475569; }
body.dark .ord-addr-part       { color: #cbd5e1; }
body.dark .ord-addr-part:hover { background: rgba(45,212,191,0.12); color: #2dd4bf; }
body.dark .ord-addr-sep        { color: #475569; }
body.dark .ord-itemno-link     { color: #cbd5e1; }
body.dark .ord-itemno-link:hover { color: #2dd4bf; background: rgba(45,212,191,0.08); }
body.dark .ord-asin-link       { color: #cbd5e1; }
body.dark .ord-asin-link:hover { color: #fbbf24; background: rgba(251,191,36,0.08); }
body.dark .ord-acct-row        { border-top-color: #1e293b; }
body.dark .ord-acct-row.gross  { border-top-color: #334155 !important; }
body.dark .ord-acct-key        { color: #64748b; }
body.dark .ord-acct-val        { color: #e2e8f0; }
body.dark .ord-acct-val.green  { color: #34d399; }
body.dark .ord-inline-input    { background: #0f172a; color: #e2e8f0; border-color: #2dd4bf; }
body.dark .ord-strip           { border-top-color: #1e293b; }
body.dark .ord-strip-val       { color: #cbd5e1; }
body.dark .ord-btn             { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark .ord-btn:hover       { background: #0f172a; border-color: #475569; }
body.dark .ord-btn.primary     { background: #2dd4bf; color: #0f172a; border-color: #2dd4bf; }
body.dark .ord-btn.primary:hover { background: #14b8a6; border-color: #14b8a6; }
body.dark .ord-empty           { color: #475569; }

body.dark .ord-note-editable:hover { border-bottom-color: rgba(45,212,191,0.15); }
body.dark .ord-note-editable:empty::before { color: #475569; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .kpi-grid        { grid-template-columns: repeat(2, 1fr); }
    .ord-mirror      { grid-template-columns: 1fr; }
    .ord-divider-line { display: none; }
    .ord-lower       { grid-template-columns: 1fr; }
    .ord-lower-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .kpi-grid        { grid-template-columns: 1fr; }
    .orders-page-header { flex-direction: column; align-items: flex-start; }
    .chart-card-body { height: 140px; }
    .ord-strip       { grid-template-columns: 1fr; }
    .ord-summary     { gap: 6px; }
    .ord-date        { display: none; }
    .ord-summary-cards { flex-direction: column; align-items: flex-end; gap: 6px; }
}

/* ===== STATUS CHIP ===== */
.status-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
    white-space: nowrap; flex-shrink: 0;
}
.status-chip .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.status-pending { background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.4); color: #fbbf24; }
.status-pending .dot { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.6); }

.status-ordered { background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.4); color: #60a5fa; }
.status-ordered .dot { background: #60a5fa; }

.status-shipped { background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.4); color: #c084fc; }
.status-shipped .dot { background: #c084fc; }

.status-delivered { background: rgba(134,239,172,0.12); border: 1px solid rgba(134,239,172,0.4); color: #86efac; }
.status-delivered .dot { background: #86efac; }

.status-payment-completed { background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.4); color: #22d3ee; }
.status-payment-completed .dot { background: #22d3ee; box-shadow: 0 0 6px rgba(34,211,238,0.6); }

.status-problem { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #f87171; }
.status-problem .dot { background: #ef4444; }

.status-refunded { background: rgba(251,146,60,0.12); border: 1px solid rgba(251,146,60,0.4); color: #fb923c; }
.status-refunded .dot { background: #fb923c; }

.status-return { background: rgba(244,114,182,0.12); border: 1px solid rgba(244,114,182,0.4); color: #f472b6; }
.status-return .dot { background: #f472b6; }

.status-cancelled { background: rgba(100,116,139,0.12); border: 1px solid rgba(100,116,139,0.4); color: #94a3b8; }
.status-cancelled .dot { background: #64748b; }

/* ===== AKSİYON ALANI ===== */
.ord-action-area { flex-shrink: 0; }

.btn-action {
    background: #2dd4bf; color: #0a1822; font-weight: 600;
    border: none; padding: 6px 14px; border-radius: 5px;
    font-size: 11px; cursor: pointer; white-space: nowrap;
    transition: transform 0.15s, background 0.2s;
}
.btn-action:hover { background: #5eead4; transform: scale(1.03); }


/* Adres satırı hint — tamamen kaldırıldı (JS'te de yok) */
.ord-addr-hint { display: none; }

/* Adres satırları arasi dikey bosluk sifir */
.ord-addr-frame .ord-addr-row { padding-top: 0; padding-bottom: 0; }

/* ── Arama + Aksiyon barı ── */
.ord-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ord-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.ord-search-input {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #111827;
    max-width: 380px;
}

body.dark .ord-search-input {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.ord-search-hint { font-size: 11px; color: #9ca3af; white-space: nowrap; }

.ord-search-counter { font-size: 12px; color: #6b7280; white-space: nowrap; }

.ord-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1e3a5f;
    border: 1px solid #2563eb;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ord-bulk-count { font-size: 13px; font-weight: 600; color: #93c5fd; white-space: nowrap; }

.ord-bulk-status-select {
    padding: 5px 10px;
    border: 1px solid #374151;
    border-radius: 5px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 13px;
    cursor: pointer;
}

.ord-bulk-apply {
    padding: 5px 14px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.ord-bulk-apply:hover { background: #1d4ed8; }

.ord-bulk-clear {
    background: none;
    border: none;
    color: #93c5fd;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.ord-bulk-clear:hover { color: #bfdbfe; }

.ord-cb {
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 4px;
    accent-color: #2563eb;
}

.ord-toast-error   { background: #dc2626 !important; }
.ord-toast-success { background: #16a34a !important; }

/* ── Amazon Order elements ────────────────────────────────────────────────── */

.ord-fail-warn {
    font-size: 13px; cursor: default; flex-shrink: 0;
    animation: warn-pulse 2s ease-in-out infinite;
}
@keyframes warn-pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

.ord-amz-order { font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.ord-amz-link { color: #22d3ee; text-decoration: none; font-family: 'Courier New',monospace; font-size: 11px; }
.ord-amz-link:hover { text-decoration: underline; }
.ord-amz-empty { color: #475569; font-size: 12px; }

.ord-amz-frame { padding: 14px 18px !important; }

.ord-fail-banner {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: #f87171; border-radius: 6px; padding: 8px 12px;
    font-size: 12px; margin-bottom: 12px; line-height: 1.5;
}

.ord-amz-id-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ord-amz-id-code {
    font-family: 'Courier New',monospace; font-size: 13px; color: #22d3ee;
    background: rgba(34,211,238,0.08); padding: 4px 10px; border-radius: 4px;
    border: 1px solid rgba(34,211,238,0.2);
}
.ord-amz-ext-link { font-size: 12px; color: #60a5fa; text-decoration: none; }
.ord-amz-ext-link:hover { text-decoration: underline; }

.ord-amz-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ord-btn-amazon {
    padding: 7px 14px; background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.3);
    color: #22d3ee; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.ord-btn-amazon:hover { background: rgba(34,211,238,0.22); }
.ord-btn-manual {
    padding: 7px 14px; background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.25);
    color: #94a3b8; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.ord-btn-manual:hover { background: rgba(148,163,184,0.18); }

/* ── Manuel Order ID inline ── */
.ord-manual-order-wrap { margin-top: 4px; }
.ord-btn-manual-inline {
    background: none; border: 1px dashed #334155; color: #64748b;
    border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.ord-btn-manual-inline:hover { border-color: #94a3b8; color: #94a3b8; }

.ord-manual-inline-form {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ord-manual-inline-inp {
    padding: 5px 10px; background: #0f172a; border: 1px solid #334155;
    color: #e2e8f0; border-radius: 6px; font-size: 12px; width: 180px;
}
.ord-manual-inline-inp.ord-manual-inp-error { border-color: #ef4444; }
.ord-manual-inline-save {
    padding: 5px 12px; background: #22d3ee; color: #0f172a; font-weight: 700;
    border: none; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.ord-manual-inline-save:hover { background: #06b6d4; }
.ord-manual-inline-cancel {
    padding: 5px 10px; background: none; border: 1px solid #334155;
    color: #64748b; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.ord-manual-inline-cancel:hover { color: #94a3b8; }

/* ── Queue bar (header) ────────────────────────────────────────────────────── */
.ord-queue-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #fbbf24;
}
.ord-queue-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fbbf24; flex-shrink: 0;
    animation: warn-pulse 1.5s ease-in-out infinite;
}
.ord-cancel-all-btn {
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.ord-cancel-all-btn:hover { background: rgba(239,68,68,0.22); }

/* ── Job badge (card summary) ──────────────────────────────────────────────── */
.ord-job-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #fbbf24;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 10px;
    padding: 2px 8px 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ord-job-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #fbbf24; flex-shrink: 0;
    animation: warn-pulse 1.5s ease-in-out infinite;
}
.ord-job-cancel-btn {
    background: none;
    border: none;
    color: #f87171;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ord-job-cancel-btn:hover { color: #ef4444; }
