/* Orders Page Styles — mia order.html에서 추출 */
/* CSS 클래스 변경 금지 */

.orders-layout {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
  height: 100%;
}

/* Status filter toggles */
.ord-status-toggle {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--tint);
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tertiary);
  cursor: pointer;
  transition: all 0.2s;
}
.ord-status-toggle.active { background: var(--brand); color: white; border-color: var(--brand); }
.ord-status-toggle:hover { border-color: var(--brand); }

/* Date chips */
.ord-date-chip {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--tint);
  background: white;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tertiary);
  cursor: pointer;
  transition: all 0.2s;
}
.ord-date-chip.active { background: var(--brand); color: white; border-color: var(--brand); }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.status-confirmed { background: rgba(59,130,246,0.1); color: #1E40AF; }
.status-in-progress { background: rgba(249,158,11,0.1); color: #B45309; }
.status-ship-ready { background: rgba(139,92,246,0.1); color: #5B21B6; }
.status-shipped { background: rgba(34,197,94,0.1); color: #15803D; }
.status-cancelled { background: rgba(239,68,68,0.1); color: #DC2626; }

/* Row highlights */
.row-overdue { background: rgba(239,68,68,0.06); }
.row-due-soon { background: rgba(249,115,22,0.05); }
.badge-overdue {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 0.625rem; font-weight: 700; background: rgba(239,68,68,0.12);
  color: #DC2626; margin-left: 4px;
}

/* Filter panel */
.ord-filter-panel {
  width: 240px; min-width: 240px; background: #fff;
  border-right: 1px solid var(--tint); display: flex; flex-direction: column;
}
.ord-filter-header {
  padding: 16px; border-bottom: 1px solid var(--tint);
  font-size: 0.875rem; font-weight: 700; color: var(--brand);
}
.ord-filter-section {
  padding: 12px 16px; border-bottom: 1px solid var(--tint);
}
.ord-filter-label {
  font-size: 0.6875rem; font-weight: 700; color: var(--tertiary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.ord-filter-summary {
  padding: 16px; border-top: 1px solid var(--tint); margin-top: auto;
}
.ord-filter-count {
  font-size: 1.5rem; font-weight: 800; color: var(--brand);
}
.ord-filter-amount {
  font-size: 0.8125rem; font-weight: 600; color: var(--tertiary);
  font-family: 'JetBrains Mono', monospace;
}
.ord-filter-reset {
  width: 100%; padding: 8px; margin-top: 12px; background: var(--background);
  border: 1px solid var(--tint); border-radius: 6px; font-size: 0.75rem;
  font-weight: 600; color: var(--tertiary); cursor: pointer; transition: all 0.2s;
}
.ord-filter-reset:hover { border-color: var(--brand); color: var(--brand); }

/* Partner filter badges */
.ord-partner-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: 4px; background: rgba(59,130,246,0.1); color: #2563EB;
  font-size: 0.6875rem; font-weight: 600;
}
.ord-partner-badge button {
  background: none; border: none; cursor: pointer; color: #2563EB;
  font-size: 0.625rem; padding: 0;
}

/* Content area */
.ord-content {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.ord-toolbar {
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--tint);
  display: flex; align-items: center; gap: 12px;
}
.ord-toolbar-title {
  font-size: 0.875rem; font-weight: 700; color: var(--brand);
}
.ord-toolbar-search {
  flex: 1; max-width: 280px; padding: 6px 12px; border: 1px solid var(--tint);
  border-radius: 6px; font-size: 0.8125rem; color: var(--brand); outline: none;
}
.ord-toolbar-search:focus { border-color: #3B82F6; }
.ord-toolbar-btn {
  padding: 6px 12px; border: 1px solid var(--tint); border-radius: 6px;
  background: white; font-size: 0.75rem; font-weight: 600; color: var(--tertiary);
  cursor: pointer; transition: all 0.2s;
}
.ord-toolbar-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Order table */
.ord-table-wrap { flex: 1; overflow: auto; padding: 0 20px 20px; }
.ord-table {
  width: 100%; border-collapse: collapse; background: white;
  border: 1px solid var(--tint); border-radius: 8px; overflow: hidden;
}
.ord-table thead th {
  padding: 10px 12px; text-align: left; font-size: 0.6875rem; font-weight: 700;
  color: var(--tertiary); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg-light); border-bottom: 1px solid var(--tint);
}
.ord-table tbody td {
  padding: 10px 12px; font-size: 0.8125rem; color: var(--brand);
  border-bottom: 1px solid var(--tint);
}
.ord-table tbody tr:hover { background: var(--bg-light); cursor: pointer; }

/* Detail slide panel */
.order-detail-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 420px;
  background: white; box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  transform: translateX(100%); transition: transform 0.3s ease;
  display: flex; flex-direction: column; z-index: 10;
}
.order-detail-panel.open { transform: translateX(0); }

.odp-header {
  padding: 16px 20px; border-bottom: 1px solid var(--tint);
  display: flex; align-items: flex-start; gap: 12px;
}
.odp-header-info { flex: 1; }
.odp-order-no { font-size: 1rem; font-weight: 700; color: var(--secondary); }
.odp-partner { font-size: 0.75rem; color: var(--tertiary); margin-top: 4px; }
.odp-close-btn {
  background: none; border: none; cursor: pointer; color: var(--light); font-size: 1.25rem;
  padding: 4px; transition: color 0.2s;
}
.odp-close-btn:hover { color: var(--brand); }

.odp-body { flex: 1; overflow-y: auto; padding: 20px; }
.odp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.odp-field { margin-bottom: 0; }
.odp-label {
  font-size: 0.6875rem; font-weight: 600; color: var(--light); margin-bottom: 4px;
}
.odp-value {
  font-size: 0.8125rem; font-weight: 500; color: var(--brand);
}
.odp-amount { font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* Status change section */
.odp-status-change {
  padding: 12px; background: var(--bg-light); border-radius: 8px; margin-bottom: 20px;
}
.odp-status-row { display: flex; gap: 8px; margin-top: 6px; }
.odp-status-btn {
  padding: 6px 14px; background: #3B82F6; color: white; border: none; border-radius: 6px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.odp-status-btn:hover { opacity: 0.85; }

/* Memo */
.odp-memo { margin-top: 20px; }
.odp-empty { text-align: center; color: var(--light); padding: 16px; }

/* Action buttons */
.odp-actions {
  display: flex; flex-direction: column; gap: 6px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--tint);
}
.odp-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 6px; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none; border: none;
}
.odp-action-primary { background: #3B82F6; color: white; }
.odp-action-primary:hover { opacity: 0.85; }
.odp-action-secondary {
  background: white; color: var(--secondary); border: 1px solid var(--tint);
}
.odp-action-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }

/* Line items table */
.line-items-table {
  width: 100%; border-collapse: collapse; margin-top: 16px;
}
.line-items-table th {
  padding: 8px; font-size: 0.6875rem; font-weight: 700; color: var(--tertiary);
  text-transform: uppercase; background: var(--bg-light); border-bottom: 1px solid var(--tint);
}
.line-items-table td {
  padding: 8px; font-size: 0.8125rem; color: var(--brand);
  border-bottom: 1px solid var(--tint);
}

/* Bulk actions bar */
.ord-bulk-bar {
  padding: 10px 20px; background: var(--brand); color: white;
  display: flex; align-items: center; gap: 12px;
}
.ord-bulk-btn {
  padding: 6px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
}
.ord-bulk-btn-primary { background: #3B82F6; color: white; }
.ord-bulk-btn-secondary { background: rgba(255,255,255,0.15); color: white; }
.ord-bulk-btn:hover { opacity: 0.85; }

/* Status select */
.status-select {
  padding: 6px 10px; border: 1px solid var(--tint); border-radius: 6px;
  font-size: 0.8125rem; color: var(--brand); outline: none; cursor: pointer;
}

/* Edit lock banner */
.edit-lock-banner {
  padding: 8px 20px; background: #FFFBEB; border-bottom: 1px solid #FDE68A;
  display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: #92400E;
}
