/* NOTIFICATION BADGE (sidebar nav — expanded label) */
.notif-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}

/* NUMBER BUBBLE on the bell icon (both rail + expanded modes) */
.nav-notif-bubble {
  position: absolute;
  top: -5px; right: -6px;
  min-width: 17px; height: 17px;
  background: var(--red); color: #fff;
  border-radius: 9px;
  border: 1.5px solid var(--surface);
  font-size: 10px; font-weight: 700;
  font-family: 'IBM Plex Sans', sans-serif;
  display: none;
  align-items: center; justify-content: center;
  line-height: 1;
  padding: 0 3px;
  box-sizing: border-box;
}
.nav-notif-bubble.visible { display: flex; }

/* NOTIFICATION CENTER BACKDROP */
.notif-backdrop {
  position: fixed; inset: 0; z-index: 199;
  opacity: 0; pointer-events: none;
}
.notif-backdrop.open { opacity: 1; pointer-events: all; }

/* ── NOTIFICATION CENTER PANEL ── */
.nc-panel {
  position: fixed;
  right: 0; top: 0; height: 100vh;
  width: 340px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 32px rgba(15,20,40,0.10);
  z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.nc-panel.open {
  transform: translateX(0);
  pointer-events: all;
}

/* Header */
.nc-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.nc-header-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
}
.nc-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px; color: var(--navy); font-weight: 400;
}
.nc-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 16px; padding: 4px 6px; line-height: 1;
  border-radius: 4px; transition: all 0.1s;
}
.nc-close:hover { color: var(--navy); background: var(--bg); }

/* Tabs */
.nc-tabs {
  display: flex;
  padding: 0 20px;
}
.nc-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 10px 0;
  margin-right: 20px;
  background: none; border: none; cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.nc-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.nc-tab-badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 10px;
  min-width: 16px; text-align: center;
  display: none;
}
.nc-tab-badge.visible { display: inline-block; }

/* Content */
.nc-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.nc-pane { display: none; flex: 1; overflow-y: auto; flex-direction: column; }
.nc-pane.active { display: flex; }

/* ── ALERTS ── */
.nc-alert-item {
  padding: 13px 18px; display: flex; gap: 12px; align-items: flex-start;
  border-bottom: 1px solid var(--border);
  font-family: 'IBM Plex Sans', sans-serif;
  transition: background 0.1s;
}
.nc-alert-item.unread { background: rgba(28,43,74,0.03); }
.nc-alert-item:last-child { border-bottom: none; }

.nc-alert-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0; margin-top: 1px;
}
.nc-alert-dot.approved, .nc-alert-dot.published { background: var(--green-bg); color: var(--green); }
.nc-alert-dot.rejected  { background: var(--red-bg); color: var(--red); }
.nc-alert-dot.order     { background: var(--blue-bg); color: var(--blue); }
.nc-alert-dot.label     { background: var(--navy-soft); color: #fff; font-size: 10px; }

.nc-alert-body { flex: 1; min-width: 0; }
.nc-alert-title { font-size: 13px; color: var(--navy); font-weight: 500; line-height: 1.4; }
.nc-alert-sub   { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.nc-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
  color: var(--muted); font-family: 'IBM Plex Sans', sans-serif;
}
.nc-empty svg { opacity: 0.25; margin-bottom: 12px; }
.nc-empty p { font-size: 13px; }

/* ── MESSAGES: COMING SOON ── */
.nc-coming-soon {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 28px; text-align: center;
  font-family: 'IBM Plex Sans', sans-serif;
}
.nc-coming-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--slate);
}
.nc-coming-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px; color: var(--navy); margin-bottom: 12px;
}
.nc-coming-sub {
  font-size: 13px; color: var(--muted); line-height: 1.65;
  max-width: 260px;
}

/* ── NOTIFICATIONS PAGE ── */
.notif-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.notif-page-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 18px 11px 0;
  margin-right: 24px;
  background: none; border: none; cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.notif-page-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.notif-page-tab-badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 10px;
  min-width: 16px; text-align: center;
  display: none;
}
.notif-page-tab-badge.visible { display: inline-block; }

.notif-page-pane { display: none; }
.notif-page-pane.active { display: block; }

/* Notification skeleton loader */
.notif-skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #e8eaed 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: notif-shimmer 1.4s infinite;
}
@keyframes notif-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Clickable alert item */
.nc-alert-item.nc-alert-clickable:hover {
  background: var(--accent-soft);
}
.nc-alert-item.nc-alert-clickable:hover .nc-alert-title {
  color: var(--accent);
}

/* CATALOG SEARCH */
.catalog-search-wrap { position: relative; margin-bottom: 4px; }
.catalog-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.catalog-dropdown.open { display: block; }
.catalog-option {
  padding: 10px 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.catalog-option:last-child { border-bottom: none; }
.catalog-option:hover { background: var(--accent-soft); }
.catalog-option-title { font-weight: 500; font-size: 13px; color: var(--navy); }
.catalog-option-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.selected-catalog {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  padding: 10px 13px;
  margin-top: 6px;
  display: none;
}
.selected-catalog.show { display: block; }
.selected-catalog-title { font-weight: 500; font-size: 13px; color: var(--navy); }
.selected-catalog-meta { font-size: 11px; color: var(--muted); }
.btn-clear-catalog {
  font-size: 11px;
  color: var(--slate);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
}

/* ── SETTINGS PAGE ── */
.s-card-hd {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.s-card-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--navy);
}

/* View mode */
.sv-field { }
.sv-lbl {
  font-size: 10px; font-weight: 700; color: var(--slate);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.sv-val {
  font-size: 14px; color: var(--navy);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.5;
}

/* Edit mode */
.se-row { display: flex; gap: 16px; margin-bottom: 18px; }
.se-col { flex: 1; min-width: 0; }
.se-lbl {
  font-size: 10px; font-weight: 700; color: var(--slate);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.se-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px; color: var(--navy);
  outline: none; box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--surface);
}
.se-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28,43,74,0.08);
}
textarea.se-input { resize: vertical; line-height: 1.5; }

/* CONDITION BUTTONS — hide abbreviations, show full label only */
.condition-btn .cond-grade { display: none; }
.condition-btn .cond-label { font-size: 12px; color: var(--navy); display: block; }
.condition-btn.selected .cond-label { color: var(--navy); font-weight: 600; }
.condition-btn.selected { border-color: var(--navy); background: var(--navy-soft); }

/* CONDITION GRID */
.condition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.condition-btn {
  padding: 10px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: 'IBM Plex Sans', sans-serif;
}
.condition-btn .cond-grade { font-size: 16px; font-weight: 500; color: var(--navy); display: block; }
.condition-btn .cond-label { font-size: 10px; color: var(--muted); margin-top: 2px; display: block; }
.condition-btn.selected { border-color: var(--accent); background: var(--accent-soft); }
.condition-btn.selected .cond-grade { color: var(--accent); }

/* ORDER DETAIL */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.order-card-header {
  padding: 14px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.order-number { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--navy); }
.order-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.order-card-body { padding: 16px 18px; }
.order-item-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-item-row:last-child { border-bottom: none; }
.order-item-title { font-weight: 500; font-size: 14px; }
.order-item-meta { font-size: 12px; color: var(--muted); }
.order-item-price { font-family: 'Playfair Display', serif; font-size: 15px; margin-left: auto; white-space: nowrap; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--navy); color: #fff; }

/* SPINNER */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ALERT BOX */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #E8D9A0; }
.alert-info { background: var(--blue-bg); color: var(--blue); border: 1px solid #BFDBFE; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #FECACA; }

/* LOADING */
.loading-row td { text-align: center; padding: 40px; color: var(--muted); }
#demo-btn:hover { background: #EDD9B8 !important; }

/* CREATE ORDER FORM — override global form-group label styling */
#orders-create-view .form-row {
  display: flex !important;   /* override shared.css display:grid */
  flex-direction: row;
  gap: 12px;
  width: 100%;
}
#orders-create-view .form-row .form-group {
  flex: 1 1 0%;
  min-width: 0;
  margin-bottom: 0;
}
#orders-create-view .form-group {
  min-width: 0;
}
#orders-create-view .form-group label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
}
#orders-create-view .form-group input,
#orders-create-view .form-group select,
#orders-create-view .form-group textarea {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #9AAFC4;
}
#orders-create-view .form-group input:focus,
#orders-create-view .form-group select:focus,
#orders-create-view .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
}
#orders-create-view .co-card-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 13px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#orders-create-view .co-card-body {
  padding: 14px 16px;
}
