/* ============================================================
   VIEUX Sourcing — Main Stylesheet
   Apple-like minimal UI with warm brand accent
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --brand: #86775c;
  --brand-light: #a89a80;
  --brand-lighter: #d4cabb;
  --brand-lightest: #ede8e0;
  --brand-dark: #6b5f48;

  --bg: #fafaf8;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #f5f4f1;
  --bg-overlay: rgba(0, 0, 0, 0.35);

  --text-primary: #1c1c1e;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --text-on-brand: #ffffff;

  --border: #e5e5ea;
  --border-light: #f0efeb;

  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --info: #007aff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --nav-height: 56px;
  --header-height: 52px;
}

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

html {
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
}

/* --- App Shell --- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* --- Page Header --- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding-top: var(--safe-top);
  border-bottom: 0.5px solid var(--border);
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 20px;
}

.page-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.page-title-large {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  padding: 2px 20px 12px;
}

/* --- Page Content Area --- */
.page-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page-view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-view-inner {
  padding: 0 16px 24px;
}

/* --- Bottom Tab Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--border);
  padding-bottom: var(--safe-bottom);
}

.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  height: var(--nav-height);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
  min-height: 44px;
  position: relative;
}

.nav-tab.active {
  color: var(--brand);
}

.nav-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tab-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-tab.active .nav-tab-icon svg {
  stroke-width: 2.2;
}

.nav-tab-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* --- Section Titles --- */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 20px 4px 8px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

.card + .card {
  margin-top: 10px;
}

.card-body {
  padding: 14px 16px;
}

/* --- Seller Card --- */
.seller-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--brand-lightest);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.seller-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.seller-platform {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.seller-stat {
  font-size: 12px;
  color: var(--text-tertiary);
}

.seller-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.seller-chevron svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* --- Purchase Card --- */
.purchase-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}

.purchase-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--brand-lightest);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-light);
}

.purchase-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase-thumb svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.purchase-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.purchase-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-seller {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.purchase-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.purchase-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.purchase-price-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 4px;
}

.purchase-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* --- Platform Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: var(--brand-lightest);
  color: var(--brand);
}

.badge--instagram {
  background: #fce4ec;
  color: #d81b60;
}

.badge--whatsapp {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge--line {
  background: #e8f5e9;
  color: #00b900;
}

.badge--email {
  background: #e3f2fd;
  color: #1565c0;
}

.badge--other {
  background: var(--brand-lightest);
  color: var(--brand);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  transition: all 0.2s ease;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}

.btn:active::after {
  opacity: 0.08;
}

.btn-primary {
  background: var(--brand);
  color: var(--text-on-brand);
}

.btn-primary:active {
  background: var(--brand-dark);
}

.btn-secondary {
  background: var(--brand-lightest);
  color: var(--brand);
}

.btn-danger {
  background: #fff0ef;
  color: var(--danger);
}

.btn-ghost {
  color: var(--brand);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --- FAB (Floating Action Button) --- */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: 0 4px 16px rgba(134, 119, 92, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab:active {
  transform: scale(0.92);
}

.fab svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.fab.hidden {
  transform: scale(0);
  pointer-events: none;
}

/* --- Inputs --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-size: 16px;
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 16px;
  resize: vertical;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aeaeb2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > .form-group {
  flex: 1;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
  padding-left: 2px;
}

/* Datalist input (combobox style) */
input[list] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aeaeb2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* --- Photo Upload --- */
.photo-upload {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-upload-slot {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.photo-upload-slot:active {
  background: var(--bg-input);
}

.photo-upload-slot svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.photo-upload-slot span {
  font-size: 10px;
  font-weight: 500;
}

.photo-upload-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-preview {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-overlay);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  margin: 8px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-secondary);
  stroke-width: 2.5;
  fill: none;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 24px;
}

.modal-footer {
  padding: 12px 20px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}

/* --- Detail Page (pushed view) --- */
.detail-view {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}

.detail-view.open {
  transform: translateX(0);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 12px 4px;
  padding-top: calc(12px + var(--safe-top));
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}

.detail-back {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.detail-back svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.detail-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-action {
  padding: 8px 16px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 500;
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + 24px);
}

/* --- Seller Detail --- */
.seller-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 24px;
}

.seller-detail-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--brand-lightest);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 600;
  overflow: hidden;
  margin-bottom: 14px;
}

.seller-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-detail-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.seller-detail-platform {
  margin-top: 4px;
}

.seller-detail-stats {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 16px 20px;
}

.seller-detail-stat {
  flex: 1;
  background: var(--bg-card);
  padding: 14px 8px;
  text-align: center;
}

.seller-detail-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.3px;
}

.seller-detail-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.filter-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
}

.filter-chip svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.filter-select {
  height: 34px;
  padding: 0 30px 0 12px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aeaeb2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  flex-shrink: 0;
}

/* --- Report Summary Cards --- */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 12px;
  text-align: center;
}

.summary-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.5px;
}

.summary-card-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* --- Report Breakdown --- */
.breakdown-list {
  padding: 0 16px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border-light);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.breakdown-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.breakdown-bar-container {
  width: 80px;
  height: 6px;
  background: var(--brand-lightest);
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* --- Month Selector --- */
.month-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.month-selector-label {
  font-size: 17px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

.month-selector-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.month-selector-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* --- Settings --- */
.settings-group {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border-light);
  min-height: 50px;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
}

.settings-item-icon.icon-brand { background: var(--brand); }
.settings-item-icon.icon-blue { background: var(--info); }
.settings-item-icon.icon-green { background: var(--success); }
.settings-item-icon.icon-orange { background: var(--warning); }
.settings-item-icon.icon-red { background: var(--danger); }

.settings-item-content {
  flex: 1;
  min-width: 0;
}

.settings-item-label {
  font-size: 15px;
  font-weight: 400;
}

.settings-item-value {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-item-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.settings-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s;
  margin-top: 6px;
}

.settings-input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
}

/* --- Toast Notification --- */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-success {
  background: var(--success);
}

.toast.toast-error {
  background: var(--danger);
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--brand-lightest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--brand-light);
  stroke-width: 1.5;
  fill: none;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, #eae8e3 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 10px;
  width: 60%;
}

.skeleton-circle {
  border-radius: var(--radius-full);
}

.skeleton-card {
  height: 80px;
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Swipe Actions --- */
.swipe-container {
  position: relative;
  overflow: hidden;
}

.swipe-actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.swipe-container.swiped .swipe-actions {
  transform: translateX(0);
}

.swipe-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.swipe-action-edit {
  background: var(--info);
}

.swipe-action-delete {
  background: var(--danger);
}

.swipe-action svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --- Confirm Dialog --- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 32px;
}

.confirm-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  text-align: center;
}

.confirm-overlay.open .confirm-dialog {
  transform: scale(1);
}

.confirm-body {
  padding: 24px 20px 20px;
}

.confirm-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  border-top: 0.5px solid var(--border);
}

.confirm-btn {
  flex: 1;
  height: 48px;
  font-size: 16px;
  font-weight: 400;
  color: var(--info);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.confirm-btn:active {
  background: var(--bg-input);
}

.confirm-btn + .confirm-btn {
  border-left: 0.5px solid var(--border);
}

.confirm-btn-danger {
  color: var(--danger);
  font-weight: 600;
}

/* --- Pull to Refresh --- */
.pull-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height 0.2s;
}

.pull-indicator.pulling {
  height: 50px;
}

.pull-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand-light);
  stroke-width: 2;
  fill: none;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Transitions --- */
.fade-enter {
  opacity: 0;
  transform: translateY(8px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- Search Bar --- */
.search-bar {
  padding: 0 16px 8px;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-tertiary);
  stroke-width: 2;
  fill: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  background: var(--bg-input);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
}

.search-input:focus {
  outline: none;
  background: var(--bg-card);
  box-shadow: 0 0 0 1.5px var(--brand);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

/* --- Divider --- */
.divider {
  height: 0.5px;
  background: var(--border-light);
  margin: 0 16px;
}

/* --- Utilities --- */
.text-brand { color: var(--brand); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.hidden { display: none !important; }

/* --- Scrollbar (for non-touch) --- */
.page-view::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.detail-body::-webkit-scrollbar {
  width: 0;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.status-badge--unpaid {
  background: #fff0ef;
  color: #ff3b30;
}

.status-badge--paid {
  background: #e3f2fd;
  color: #007aff;
}

.status-badge--shipped {
  background: #fff3e0;
  color: #ff9500;
}

.status-badge--arrived {
  background: #e8f5e9;
  color: #34c759;
}

/* --- Status Selector (row of 4 buttons) --- */
.status-selector {
  display: flex;
  gap: 6px;
  padding: 16px;
}

.status-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.status-btn:active {
  transform: scale(0.96);
}

.status-btn.active-unpaid {
  background: #fff0ef;
  color: #ff3b30;
  border-color: #ff3b30;
}

.status-btn.active-paid {
  background: #e3f2fd;
  color: #007aff;
  border-color: #007aff;
}

.status-btn.active-shipped {
  background: #fff3e0;
  color: #ff9500;
  border-color: #ff9500;
}

.status-btn.active-arrived {
  background: #e8f5e9;
  color: #34c759;
  border-color: #34c759;
}

/* --- Reminder Section --- */
.reminder-section {
  margin: 0 16px 12px;
  background: #fff8f0;
  border-radius: 12px;
  overflow: hidden;
}

.reminder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #ff9500;
  cursor: pointer;
  user-select: none;
}

.reminder-header svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.reminder-header-chevron {
  margin-left: auto;
  transition: transform 0.2s;
}

.reminder-header-chevron svg {
  width: 14px;
  height: 14px;
}

.reminder-section.collapsed .reminder-header-chevron {
  transform: rotate(-90deg);
}

.reminder-section.collapsed .reminder-body {
  display: none;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 0.5px solid rgba(255, 149, 0, 0.15);
  cursor: pointer;
  transition: background 0.15s;
}

.reminder-item:active {
  background: rgba(255, 149, 0, 0.08);
}

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

.reminder-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reminder-item-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.reminder-item-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}

.reminder-item-due {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.reminder-overdue {
  color: #ff3b30;
  font-weight: 600;
}

/* --- Expense Badge --- */
.expense-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
}

.expense-badge--shipping {
  background: #e3f2fd;
  color: #1565c0;
}

.expense-badge--customs {
  background: #fce4ec;
  color: #c62828;
}

.expense-badge--paypal {
  background: #e8eaf6;
  color: #283593;
}

.expense-badge--wise {
  background: #e8f5e9;
  color: #2e7d32;
}

.expense-badge--bank {
  background: #fff3e0;
  color: #e65100;
}

.expense-badge--other {
  background: var(--brand-lightest);
  color: var(--brand);
}

/* --- Expense Section --- */
.expense-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-light);
}

.expense-list-item:last-child {
  border-bottom: none;
}

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

.expense-item-desc {
  font-size: 14px;
  color: var(--text-primary);
}

.expense-item-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}

.expense-item-delete {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.expense-item-delete:active {
  color: var(--danger);
  background: #fff0ef;
}

.expense-item-delete svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.expense-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1.5px solid var(--border);
  margin-top: 8px;
}

.expense-total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.expense-total-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
}

/* --- Copy Button --- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-lightest);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.copy-btn:active {
  opacity: 0.7;
}

.copy-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --- Report Toggle --- */
.report-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 2px;
  margin: 0 16px 12px;
}

.report-toggle-btn {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.report-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* --- Annual Report Monthly Bar --- */
.annual-month-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.annual-month-label {
  width: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}

.annual-month-bar-track {
  flex: 1;
  height: 20px;
  background: var(--brand-lightest);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.annual-month-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.annual-month-bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* --- Print-friendly --- */
@media print {
  .bottom-nav, .fab, .toast-container { display: none; }
  .page-view { position: static; overflow: visible; opacity: 1; pointer-events: auto; padding: 0; }
  body { overflow: visible; position: static; }
}

/* ===== Dashboard ===== */
.dashboard-section { margin-bottom: 24px; padding: 0 16px; }
.dashboard-section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; letter-spacing: 0.3px; }
.dashboard-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; margin-bottom: 20px; }
.dashboard-card { background: var(--bg-card); border-radius: var(--radius-lg, 14px); box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 16px; }
.dashboard-card.card-alert { border-left: 3px solid var(--danger, #ff3b30); }
.dashboard-card.card-brand { border-left: 3px solid var(--brand, #86775c); }
.dashboard-card-value { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }
.dashboard-card-value.text-danger { color: var(--danger, #ff3b30); }
.dashboard-card-value.text-brand { color: var(--brand, #86775c); }
.dashboard-card-label { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.dashboard-card-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.dashboard-shipping-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid var(--border-light, #e5e5ea); }
.dashboard-shipping-item:last-child { border-bottom: none; }
.dashboard-shipping-icon { width: 36px; height: 36px; border-radius: 10px; background: #f0f4ff; color: #3478f6; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dashboard-shipping-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.dashboard-shipping-info { flex: 1; min-width: 0; }
.dashboard-shipping-name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-shipping-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.dashboard-shipping-date { font-size: 12px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* ===== Seller Ratings ===== */
.rating-axes { padding: 8px 0; }
.rating-axis { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.rating-axis-label { width: 56px; font-size: 13px; font-weight: 500; color: var(--text-secondary); flex-shrink: 0; }
.rating-stars { display: flex; gap: 6px; flex: 1; }
.rating-star { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border, #d1d1d6); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--text-tertiary); cursor: pointer; transition: all 0.15s ease; -webkit-tap-highlight-color: transparent; }
.rating-star.filled { background: var(--brand, #86775c); border-color: var(--brand, #86775c); color: #fff; }
.rating-star:active { transform: scale(0.9); }
.rating-axis-value { font-size: 15px; font-weight: 600; color: var(--brand, #86775c); min-width: 20px; text-align: right; }

/* ===== Category Badge ===== */
.badge--category { background: #f3e8ff; color: #7c3aed; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 500; }

/* ===== Pipeline Status ===== */
.status-badge--listed { background: #f3e8ff; color: #7c3aed; }
.status-badge--sold { background: #ecfdf5; color: #059669; }
.status-btn.active-listed { background: #f3e8ff; color: #7c3aed; border-color: #7c3aed; }
.status-btn.active-sold { background: #ecfdf5; color: #059669; border-color: #059669; }

/* ===== Tracking Info ===== */
.tracking-section { background: var(--bg-input, #f2f2f7); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.tracking-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.tracking-row-label { font-size: 13px; color: var(--text-secondary); }
.tracking-row-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.tracking-number-link { color: var(--brand, #86775c); text-decoration: underline; }

/* ===== Profit Display ===== */
.profit-section { background: var(--bg-input, #f2f2f7); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.profit-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.profit-row.profit-total { padding-top: 8px; margin-top: 4px; border-top: 1.5px solid var(--border, #d1d1d6); }
.profit-label { font-size: 13px; color: var(--text-secondary); }
.profit-value { font-size: 14px; font-weight: 600; }
.profit-value.positive { color: #059669; }
.profit-value.negative { color: var(--danger, #ff3b30); }
.profit-value.large { font-size: 18px; }

/* Status selector wrapping for 6 items */
.status-selector { flex-wrap: wrap; }
.status-selector .status-btn { flex: 0 0 calc(33.333% - 6px); min-width: 0; font-size: 12px; padding: 8px 4px; }

/* ===== Global Search ===== */
.global-search-bar {
  padding: 0 16px 12px;
  position: relative;
}
.global-search-bar .search-input-wrap {
  position: relative;
}
.global-search-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
}
.global-search-results {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 60;
}
.global-search-results:empty {
  display: none;
}
.global-search-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px 4px;
}
.global-search-item {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.global-search-item:active {
  background: var(--bg-input);
}
.global-search-item-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 16px;
  z-index: 510;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.lightbox-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}
.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease;
}
.lightbox-counter {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Notes Timeline ===== */
.notes-section {
  margin-top: 20px;
}
.notes-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.notes-input-wrap textarea {
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  resize: vertical;
  font-family: inherit;
}
.notes-input-wrap textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
}
.notes-input-wrap button {
  align-self: flex-end;
}
.note-item {
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-light);
}
.note-item:last-child {
  border-bottom: none;
}
.note-content {
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.5;
}
.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.note-date {
  font-size: 11px;
  color: var(--text-tertiary);
}
.note-delete {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.note-delete:active {
  color: var(--danger);
  background: #fff0ef;
}
.note-delete svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ===== Overdue Badge ===== */
.badge-overdue {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: #fff0ef;
  color: #ff3b30;
}

/* ===== Tracking Link ===== */
.tracking-link {
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}

/* ===== Seller Picker (custom dropdown with icons) ===== */
.seller-picker { position: relative; }
.seller-pick-selected {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; min-height: 44px; padding-right: 36px;
}
.seller-pick-selected.open { border-color: var(--brand); }
.seller-pick-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none;
  transition: transform .2s;
}
.seller-pick-selected.open .seller-pick-chevron { transform: translateY(-50%) rotate(180deg); }
.seller-pick-placeholder { color: var(--text-tertiary); }
.seller-pick-dropdown {
  display: none; position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 220px; overflow-y: auto; padding: 4px 0;
}
.seller-pick-dropdown.open { display: block; }
.seller-pick-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 15px;
  transition: background .15s;
}
.seller-pick-item:active,
.seller-pick-item.selected { background: var(--bg-tertiary); }
.seller-pick-icon {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.seller-pick-initial {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-lightest); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
