:root {
  --lq-bg: #f4f7fb;
  --lq-card: #ffffff;
  --lq-border: #e6ecf5;
  --lq-text: #0f172a;
  --lq-muted: #64748b;
  --lq-brand: #4f46e5;
  --lq-nav: #0b1324;
  --lq-nav-hover: #111b34;
  --lq-yellow: #f6c61b;
}

body.linkqin-b2b-admin #wpcontent,
body.linkqin-b2b-admin #wpbody-content {
  margin: 0;
  padding: 0;
}

body.linkqin-b2b-admin #adminmenuwrap,
body.linkqin-b2b-admin #adminmenuback,
body.linkqin-b2b-admin #wpadminbar,
body.linkqin-b2b-admin #wpfooter {
  display: none;
}

body.linkqin-b2b-admin {
  background: var(--lq-bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.lq-admin {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.lq-sidebar {
  width: 220px;
  background: linear-gradient(180deg, #0b1324 0%, #0a1020 100%);
  color: #cbd5f5;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.lq-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.lq-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #a5b4fc;
}

.lq-brand-text {
  font-weight: 600;
  color: #eef2ff;
}

.lq-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.lq-sidebar-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lq-sidebar-user {
  font-size: 12px;
  font-weight: 600;
  color: rgba(238, 242, 255, 0.92);
  line-height: 1.2;
  padding: 0 12px;
  word-break: break-word;
}

.lq-nav-item-logout {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.lq-nav-item-logout:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fff;
}

.lq-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.25);
  width: fit-content;
  margin: 0 12px;
}

.lq-lang-option {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.lq-lang-option:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #fff;
}

.lq-lang-option.is-active {
  background: rgba(99, 102, 241, 0.22);
  color: #eef2ff;
}

.lq-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
}

.lq-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lq-nav-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.lq-nav-badge {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(226, 232, 240, 0.25);
  color: rgba(238, 242, 255, 0.95);
}

.lq-nav-badge-alert {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}

.lq-nav-item:hover {
  background: var(--lq-nav-hover);
  color: #fff;
}

.lq-nav-item.is-active {
  background: #4f46e5;
  color: #fff;
}

.lq-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.lq-nav-icon svg {
  width: 18px;
  height: 18px;
}

.lq-main {
  flex: 1;
  padding: 28px 32px 48px;
  min-width: 0;
}

.lq-page-header {
  background: var(--lq-card);
  border: 1px solid var(--lq-border);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.lq-page-header h1 {
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--lq-text);
}

.lq-page-header p {
  margin: 0;
  color: var(--lq-muted);
  font-size: 12px;
}

.lq-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lq-card {
  background: var(--lq-card);
  border: 1px solid var(--lq-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.lq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.lq-table th,
.lq-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.lq-table th {
  min-width: 80px;
}

.lq-table-orders .lq-col-line-id {
  min-width: 180px;
}

.lq-admin .lq-table-orders {
  min-width: 1700px;
}

.lq-table-orders .lq-col-type,
.lq-table-orders .lq-col-wood {
  min-width: 140px;
}

.lq-table-orders .lq-col-spec {
  min-width: 220px;
}

.lq-table-orders .lq-col-total-area {
  min-width: 120px;
}

.lq-table-head {
  background: #f8fafc;
  text-align: left;
  color: #1f2937;
  font-weight: 600;
}

.lq-table-active .lq-table-head,
.lq-table-payments .lq-table-head {
  background: var(--lq-yellow);
}

.lq-table-history .lq-table-head {
  background: #1f2937;
  color: #fff;
}

.lq-table-filter th {
  background: #fff7db;
}

.lq-table-filter input {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #f2d769;
  font-size: 11px;
}

.lq-table-toolbar {
  background: #fff7db;
  border: 1px solid #f2d769;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lq-table-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.lq-table-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  white-space: nowrap;
}

.lq-table-toolbar .lq-input {
  flex: 1 1 240px;
  max-width: 420px;
  background: #fff;
  border-color: #f2d769;
}

.lq-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 4px;
  color: var(--lq-muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.lq-pagination-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lq-pagination-links a,
.lq-pagination-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--lq-text);
  font-weight: 800;
  text-decoration: none;
}

.lq-pagination-links span.current {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.35);
  color: #4338ca;
}

.lq-pagination-links span.dots {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  padding: 0 4px;
}

.lq-input {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 11px;
}

.lq-inline-edit {
  min-width: 70px;
}

.lq-order-id {
  color: #4f46e5;
  font-weight: 600;
}

.lq-empty {
  text-align: center;
  color: #94a3b8;
  padding: 40px 0;
}

.lq-stat-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lq-stat {
  min-width: 92px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  appearance: none;
  font-family: inherit;
}

.lq-stat:hover {
  filter: brightness(0.985);
}

.lq-stat.is-active {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.45) inset;
}

.lq-stat:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.lq-settings-wrap code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 8px;
}

.lq-settings-wrap {
  --lq-set-ink: #1f1d19;
  --lq-set-muted: #6a5d4c;
  --lq-set-paper: #f7f2ea;
  --lq-set-cream: #fff7ea;
  --lq-set-edge: rgba(60, 47, 35, 0.14);
  --lq-set-accent: #c4542f;
  --lq-set-accent-2: #2f6f6b;
  font-family: "IBM Plex Sans", "Segoe UI", "Tahoma", sans-serif;
  color: var(--lq-set-ink);
}

.lq-settings-wrap h1,
.lq-settings-wrap h2 {
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: 0.3px;
}

.lq-settings-wrap .description {
  color: var(--lq-set-muted);
  max-width: 680px;
}

.lq-settings-tabs .nav-tab-wrapper {
  margin-top: 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--lq-set-paper), #fff);
  border: 1px solid var(--lq-set-edge);
  border-radius: 18px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lq-settings-tabs .nav-tab-wrapper .nav-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--lq-set-muted);
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.lq-settings-tabs .nav-tab-wrapper .nav-tab:hover {
  color: var(--lq-set-ink);
  border-color: rgba(196, 84, 47, 0.3);
  background: rgba(196, 84, 47, 0.08);
}

.lq-settings-tabs .nav-tab-wrapper .nav-tab.nav-tab-active {
  color: #fff;
  background: linear-gradient(120deg, var(--lq-set-accent), #d9763c);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(196, 84, 47, 0.2);
}

.lq-settings-panel {
  display: none;
}

.lq-settings-panel.is-active {
  display: block;
}

.lq-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lq-settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lq-settings-field.lq-settings-field-full {
  grid-column: 1 / -1;
}

.lq-settings-field > span {
  font-weight: 600;
  color: var(--lq-set-ink);
}

.lq-settings-field select {
  width: 100%;
  max-width: 420px;
}

.lq-settings-repeater-head {
  display: grid;
  grid-template-columns: 1fr 160px 120px;
  gap: 10px;
  padding: 8px 2px;
  color: var(--lq-set-muted);
  font-size: 12px;
}

.lq-settings-repeater-row {
  display: grid;
  grid-template-columns: 1fr 160px 120px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.lq-settings-repeater-row .lq-input {
  padding: 6px 10px;
  font-size: 12px;
}

.lq-settings-wrap .lq-card {
  background: linear-gradient(180deg, #fff, var(--lq-set-cream));
  border: 1px solid var(--lq-set-edge);
  box-shadow: 0 12px 30px rgba(60, 47, 35, 0.08);
}

.lq-settings-wrap .lq-input,
.lq-settings-wrap textarea,
.lq-settings-wrap select {
  border-radius: 12px;
  border: 1px solid rgba(60, 47, 35, 0.18);
  background: #fff;
}

.lq-settings-wrap .lq-input:focus,
.lq-settings-wrap textarea:focus,
.lq-settings-wrap select:focus {
  border-color: rgba(196, 84, 47, 0.6);
  box-shadow: 0 0 0 3px rgba(196, 84, 47, 0.15);
}

.lq-settings-wrap .button {
  border-radius: 10px;
  border: 1px solid rgba(60, 47, 35, 0.2);
  background: #fff;
  color: var(--lq-set-ink);
}

.lq-settings-wrap .button:hover {
  border-color: rgba(47, 111, 107, 0.4);
  color: var(--lq-set-accent-2);
}

.lq-preview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fef7ee, #f5faf8);
  border: 1px solid rgba(60, 47, 35, 0.12);
  margin-bottom: 16px;
}

.lq-preview-summary span {
  display: block;
  font-size: 12px;
  color: #6a5d4c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lq-preview-summary strong {
  display: block;
  font-size: 16px;
  color: #1f1d19;
}

.lq-preview-table .lq-table-compact th,
.lq-preview-table .lq-table-compact td {
  padding: 8px 10px;
  font-size: 12px;
}

.lq-settings-row-remove {
  justify-self: start;
}

@media (max-width: 900px) {
  .lq-settings-grid {
    grid-template-columns: 1fr;
  }

  .lq-settings-repeater-head,
  .lq-settings-repeater-row {
    grid-template-columns: 1fr;
  }
}

.lq-stat strong {
  display: block;
  font-size: 16px;
}

.lq-stat-orange { background: #fff7ed; color: #c2410c; }
.lq-stat-gold { background: #fef9c3; color: #a16207; }
.lq-stat-blue { background: #eff6ff; color: #1d4ed8; }
.lq-stat-amber { background: #fff7ed; color: #ea580c; }
.lq-stat-cyan { background: #ecfeff; color: #0e7490; }
.lq-stat-green { background: #ecfdf3; color: #15803d; }
.lq-stat-red { background: #fff1f2; color: #be123c; }
.lq-stat-light { background: #f1f5f9; color: #334155; }

.lq-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #eef2ff;
  color: #4f46e5;
}

.lq-pill-purple { background: #eef2ff; color: #4f46e5; }
.lq-pill-orange { background: #fff7ed; color: #c2410c; }
.lq-pill-green { background: #ecfdf3; color: #15803d; }
.lq-pill-red { background: #fee2e2; color: #b91c1c; }
.lq-pill-amber { background: #fef3c7; color: #b45309; }

.lq-button {
  border: none;
  background: #4f46e5;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lq-button-ghost {
  background: #fff;
  color: #4338ca;
  border: 1px solid #e2e8f0;
}

.lq-button-ghost:hover {
  background: #f8fafc;
}

.lq-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: #eef2ff;
  color: #4f46e5;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lq-icon-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.lq-icon-pin {
  background: #fef3c7;
  color: #b45309;
}

.lq-link {
  background: none;
  border: none;
  color: #4f46e5;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.lq-muted {
  color: var(--lq-muted);
  font-size: 11px;
}

.lq-subtle {
  color: var(--lq-muted);
}

.lq-text-green { color: #16a34a; }
.lq-text-red { color: #ef4444; }
.lq-text-purple { color: #4f46e5; }

.lq-callout {
  padding: 16px;
  border-radius: 16px;
  font-size: 12px;
}

.lq-callout-success {
  background: #ecfdf3;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.lq-callout-danger {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.lq-callout-dark {
  background: #1f2a44;
  color: #dbeafe;
}

.lq-files-row {
  display: none;
  background: #f8fafc;
}

.lq-files-row.is-open {
  display: table-row;
}

.lq-file-list {
  margin: 0;
  padding-left: 18px;
}

.lq-order-entry label,
.lq-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--lq-muted);
}

.lq-order-entry input,
.lq-order-entry select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.lq-order-header {
  padding: 20px 24px;
}

.lq-order-header-grid {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.lq-order-field {
  min-width: 220px;
}

.lq-order-label {
  font-size: 10px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lq-order-input {
  width: 260px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 900;
  color: var(--lq-brand);
}

.lq-order-date {
  font-size: 16px;
  font-weight: 900;
  color: var(--lq-text);
  padding: 10px 4px;
}

.lq-order-actions {
  margin-left: auto;
}

.lq-config-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.lq-config-card::before {
  content: none;
}

.lq-config-card::after {
  content: none;
}

.lq-config-card > * {
  position: relative;
}

.lq-config-card h3 {
  margin-top: 0;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.lq-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
}

@media (max-width: 980px) {
  .lq-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .lq-config-grid {
    grid-template-columns: 1fr;
  }
}

.lq-config-grid label {
  display: block;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--lq-text);
}

.lq-config-grid label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef3c7;
  color: #111827;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.lq-config-grid label input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  color: var(--lq-text);
  margin-left: 10px;

}

.lq-config-grid label:focus-within {
  outline: none;
}

.lq-config-grid label:focus-within input {
  outline: none;
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.lq-config-full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.lq-config-full span {
  display: inline-block;
  align-self: flex-start;
  background: #fef3c7;
  color: #334155;
  font-weight: 800;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 10px;
}

.lq-config-full input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--lq-text);
}

.lq-entry-footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #eef2f7;
}

.lq-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.lq-total-label {
  font-size: 10px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lq-total strong {
  font-size: 28px;
  font-weight: 900;
  color: var(--lq-brand);
  line-height: 1;
}

.lq-plus {
  display: inline-block;
  margin-right: 6px;
  font-weight: 900;
}

.lq-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-gutter: stable both-edges;
  scrollbar-color: rgba(15, 23, 42, 0.45) rgba(15, 23, 42, 0.08);
  scrollbar-width: auto;
}

.lq-table-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.lq-table-scroll::-webkit-scrollbar {
  height: 14px;
}

.lq-table-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
}

.lq-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.45);
  border-radius: 999px;
}

.lq-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.6);
}

.lq-entry-table {
  min-width: 980px;
}

.lq-entry-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.lq-entry-readonly {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-style: italic;
  pointer-events: none;
}

.lq-entry-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.lq-entry-price {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-weight: 900;
  color: var(--lq-brand);
}

.lq-entry-qty {
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 800;
}

.lq-entry-actions {
  text-align: center;
}

.lq-entry-remove {
  border: none;
  background: transparent;
  color: #cbd5e1;
  padding: 8px;
  border-radius: 14px;
  cursor: pointer;
}

.lq-entry-remove:hover {
  color: #ef4444;
  background: #fff1f2;
}

.lq-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lq-tags span {
  background: #f1f5f9;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 10px;
  color: #475569;
}

.lq-user {
  font-weight: 600;
}

.lq-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lq-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lq-modal.is-open {
  display: flex;
}

.lq-modal-card {
  background: #fff;
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
  padding: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.lq-modal-card-wide {
  width: 760px;
  max-width: 94vw;
  max-height: 92vh;
  padding: 0;
  overflow: auto;
}

.lq-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.lq-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--lq-text);
}

.lq-modal-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.lq-modal-header-soft {
  padding: 18px 22px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0;
}

.lq-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lq-modal-body-full {
  grid-template-columns: 1fr;
}

.lq-modal-body label,
.lq-form-grid label {
  color: var(--lq-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lq-modal-body label span,
.lq-form-grid label span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.lq-modal-body label input,
.lq-modal-body label select,
.lq-modal-body label textarea,
.lq-form-grid label input,
.lq-form-grid label select,
.lq-form-grid label textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
}

.lq-modal-body label textarea,
.lq-form-grid label textarea {
  resize: vertical;
  min-height: 90px;
}

.lq-modal-body label input[readonly],
.lq-form-grid label input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.lq-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 18px 22px 8px;
}

.lq-media-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lq-media-row input {
  flex: 1 1 auto;
}

.lq-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.lq-modal-footer-split {
  justify-content: space-between;
}

.lq-modal-card-wide .lq-modal-footer {
  margin-top: 0;
  padding: 14px 22px 18px;
  border-top: 1px solid #eef2f7;
}

.lq-modal-card-wide .lq-modal-footer-split .lq-button {
  padding: 10px 16px;
  border-radius: 14px;
}

.lq-modal-card-wide .lq-modal-footer-split .lq-button[type="submit"] {
  min-width: 240px;
  justify-content: center;
}

.lq-modal-card-wide .lq-modal-footer-split .lq-button-ghost {
  min-width: 140px;
  justify-content: center;
}

.lq-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lq-modal-close:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.lq-modal-close:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.25);
  outline-offset: 2px;
}

.lq-date-range-input {
  cursor: pointer;
  background: #fff;
}

.lq-date-range-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 18px;
}

.lq-date-range-overlay.is-open {
  display: flex;
}

.lq-date-range-card {
  width: 390px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
  overflow: hidden;
}

.lq-dr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: radial-gradient(circle at 10% 10%, rgba(246, 198, 27, 0.32) 0%, rgba(79, 70, 229, 0.12) 42%, rgba(248, 250, 252, 0.96) 72%);
  border-bottom: 1px solid #eef2f7;
}

.lq-dr-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--lq-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lq-dr-close {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.lq-dr-close:hover {
  background: rgba(15, 23, 42, 0.1);
}

.lq-dr-body {
  padding: 14px 16px 12px;
}

.lq-dr-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.lq-dr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lq-dr-field span {
  font-size: 11px;
  font-weight: 800;
  color: var(--lq-muted);
}

.lq-dr-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  color: var(--lq-text);
}

.lq-dr-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 10px;
}

.lq-dr-nav {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.lq-dr-nav:hover {
  background: #f8fafc;
}

.lq-dr-month-label {
  flex: 1;
  text-align: center;
  font-weight: 900;
  color: var(--lq-text);
  letter-spacing: 0.02em;
}

.lq-dr-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.lq-dr-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
}

.lq-dr-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding-bottom: 6px;
}

.lq-dr-empty {
  height: 40px;
}

.lq-dr-day {
  border: none;
  background: transparent;
  border-radius: 14px;
  height: 40px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  transition: background 140ms ease, color 140ms ease;
}

.lq-dr-day:hover {
  background: rgba(15, 23, 42, 0.06);
}

.lq-dr-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(246, 198, 27, 0.65);
}

.lq-dr-day.is-in-range {
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
}

.lq-dr-day.is-start,
.lq-dr-day.is-end {
  background: #4f46e5;
  color: #fff;
}

.lq-dr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.lq-dr-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 520px) {
  .lq-date-range-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .lq-date-range-card {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }

  .lq-dr-inputs {
    grid-template-columns: 1fr;
  }
}

.lq-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.lq-upload-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lq-upload-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.lq-upload-box {
  position: relative;
  height: 168px;
  width: 100%;
  border-radius: 18px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.lq-upload-box:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.lq-upload-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 160ms ease-in-out;
}

.lq-upload-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.lq-upload-plus {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.12);
  color: var(--lq-brand);
  font-size: 22px;
}

.lq-upload-box.has-media .lq-upload-preview {
  opacity: 1;
}

.lq-upload-box.has-media .lq-upload-placeholder {
  opacity: 0;
}

@media (max-width: 840px) {
  .lq-modal-body,
  .lq-form-grid {
    grid-template-columns: 1fr;
  }

  .lq-upload-grid {
    grid-template-columns: 1fr;
  }

  .lq-modal-footer-split {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .lq-modal-footer-split .lq-button {
    width: 100%;
  }
}

.lq-image-thumb {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.lq-image-thumb img,
.lq-table-products img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lq-image-thumb:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.lq-image-modal-card {
  width: min(900px, 92vw);
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
}

.lq-image-modal-body {
  padding: 12px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.lq-image-modal-body img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}

.lq-order-id-input {
  font-weight: 600;
  color: #4f46e5;
}

.lq-icon-warning {
  background: #eef2ff;
  color: #4f46e5;
}

.lq-icon-success {
  background: #ecfdf3;
  color: #16a34a;
}

.lq-table-head-dark {
  background: #0f172a;
  color: #fff;
}

.lq-file-cell {
  text-align: center;
}

.lq-file-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lq-file-button {
  border: none;
  background: #eef2ff;
  color: #4338ca;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lq-file-name {
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
}

.lq-search input {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  background: #fff;
}

.lq-table-stocks .lq-stock-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lq-stock-adjust {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.lq-stock-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: #f8fafc;
  color: #475569;
}

.lq-stock-low {
  background: #fff1f2;
}

.lq-stock-low .lq-stock-status {
  background: #fee2e2;
  color: #b91c1c;
}

.lq-memo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lq-memo-title-row input {
  border: none;
  border-bottom: 2px solid #e2e8f0;
  padding: 4px 6px;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
}

.lq-memo-form {
  padding: 16px;
}

.lq-memo-form input,
.lq-memo-form textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
}

.lq-memo-form textarea {
  resize: vertical;
  min-height: 90px;
}

.lq-memo-form-title {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 8px;
}

.lq-memo-form-body {
  padding-top: 10px;
}

.lq-memo-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.lq-memo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lq-memo-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}

.lq-memo-card.is-pinned {
  border-color: #f59e0b;
  background: #fffbeb;
}

.lq-memo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.lq-memo-sender {
  font-weight: 600;
  color: #1f2937;
}

.lq-memo-time {
  font-size: 11px;
  color: #94a3b8;
}

.lq-memo-actions {
  display: flex;
  gap: 6px;
}

.lq-memo-actions button {
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.lq-memo-title-input {
  width: 100%;
  border: none;
  font-weight: 600;
  margin-bottom: 6px;
  background: transparent;
}

.lq-memo-content {
  width: 100%;
  border: none;
  resize: vertical;
  min-height: 60px;
  background: transparent;
}

.lq-modal-full {
  grid-column: 1 / -1;
}

.lq-button-save {
  background: #0f172a;
}

.lq-button-save.is-active {
  background: #4f46e5;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.2);
}

.lq-button-dark {
  background: #0f172a;
  color: #fff;
}

.lq-table-orders tbody tr.is-dirty {
  background: #fff7ed;
}

.lq-order-detail-card {
  max-width: 920px;
}

.lq-order-detail {
  display: flex;
  flex-direction: column;
}

.lq-order-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 26px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.lq-order-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lq-order-detail-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.lq-order-detail-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.lq-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #eef2ff;
  color: #4338ca;
}

.lq-status-auditing { background: #fff7ed; color: #c2410c; }
.lq-status-preparing { background: #fef3c7; color: #b45309; }
.lq-status-production { background: #eff6ff; color: #1d4ed8; }
.lq-status-ready_in_10d { background: #fff7ed; color: #ea580c; }
.lq-status-ready_in_30d { background: #ecfeff; color: #0e7490; }
.lq-status-ready_for_shipment { background: #ecfdf3; color: #15803d; }
.lq-status-unpaid { background: #fee2e2; color: #b91c1c; }
.lq-status-completed { background: #e2e8f0; color: #475569; }

.lq-order-detail-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lq-order-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.lq-order-summary > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lq-order-summary span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.lq-order-summary strong {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.lq-order-section h4,
.lq-order-config h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.lq-order-section h4 span,
.lq-order-config h4 span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4f46e5;
  display: inline-block;
}

.lq-order-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.lq-order-table thead {
  background: #0f172a;
  color: #fff;
}

.lq-order-table th,
.lq-order-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: center;
}

.lq-order-table td.lq-text-right {
  text-align: right;
}

.lq-order-table tbody tr:hover {
  background: #f8fafc;
}

.lq-order-config {
  background: #f3f6ff;
  border: 1px solid #e0e7ff;
  border-radius: 18px;
  padding: 20px;
}

.lq-config-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
}

.lq-config-grid-view div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #dbeafe;
  padding-bottom: 6px;
}

.lq-config-grid-view span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.lq-config-grid-view strong {
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
}

.lq-config-notes {
  margin-top: 16px;
  border-top: 1px solid #dbeafe;
  padding-top: 12px;
}

.lq-config-notes span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.lq-config-notes p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
}

.lq-order-detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 24px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.lq-payment-summary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  color: #0f172a;
}

.lq-payment-summary span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.lq-text-right {
  text-align: right;
}

.lq-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.lq-ticket-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lq-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.lq-ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lq-ticket-message {
  border: 1px solid var(--lq-border);
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.lq-ticket-message.is-admin {
  background: #f8fafc;
}

.lq-ticket-message.is-customer {
  background: #eff6ff;
}

.lq-ticket-meta {
  font-size: 12px;
  color: var(--lq-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.lq-ticket-meta .lq-ticket-message-delete {
  margin-left: auto;
}

.lq-ticket-body {
  margin: 0;
  white-space: pre-wrap;
}

.lq-ticket-order-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.lq-ticket-order-row label {
  flex: 1 1 auto;
  margin: 0;
}

.lq-ticket-order-row .lq-button {
  white-space: nowrap;
}

.lq-ticket-attachments {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lq-ticket-attachments-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.lq-ticket-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lq-ticket-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}

.lq-ticket-attachment.is-image img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.lq-ticket-message.is-pinned {
  border-color: #f6c61b;
  background: #fffbea;
  box-shadow: 0 0 0 2px rgba(246, 198, 27, 0.25) inset;
}

.lq-ticket-message-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lq-ticket-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 auto;
}

.lq-ticket-message.is-customer .lq-ticket-avatar {
  background: #f1f5f9;
  color: #475569;
}

.lq-ticket-message-main {
  flex: 1 1 auto;
  min-width: 0;
}

.lq-ticket-message-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lq-ticket-sender {
  font-weight: 800;
  color: var(--lq-text);
  font-size: 14px;
}

.lq-ticket-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lq-ticket-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: #eef2ff;
  color: #4f46e5;
}

.lq-ticket-badge-admin { background: #eef2ff; color: #4f46e5; }
.lq-ticket-badge-me { background: #f1f5f9; color: #475569; }
.lq-ticket-badge-customer { background: #e0f2fe; color: #0369a1; }
.lq-ticket-badge-pin { background: #fef3c7; color: #b45309; }
.lq-ticket-badge-unread { background: #fee2e2; color: #b91c1c; }

.lq-ticket-time {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.lq-ticket-message-tools {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lq-ticket-message-content {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lq-ticket-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--lq-text);
}

.lq-ticket-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.lq-ticket-action {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.lq-ticket-action:hover {
  color: #4f46e5;
}

.lq-ticket-action.is-active {
  color: #4f46e5;
}

.lq-ticket-action svg {
  width: 14px;
  height: 14px;
}

.lq-ticket-reply textarea {
  min-height: 120px;
}

.lq-ticket-reply-context {
  border: 1px dashed #cbd5f5;
  background: #f8faff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.lq-ticket-reply-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.lq-ticket-reply-context-body {
  font-size: 12px;
  color: #0f172a;
  line-height: 1.5;
  white-space: pre-wrap;
}

.lq-ticket-reply-clear {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.lq-table-tickets tbody tr.is-new {
  background: rgba(99, 102, 241, 0.12);
}

.lq-table-tickets tbody tr.is-unread {
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 980px) {
  .lq-admin {
    flex-direction: column;
  }

  .lq-sidebar {
    width: 100%;
    padding: 14px 14px 10px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
  }

  .lq-brand {
    margin-bottom: 0;
  }

  .lq-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .lq-nav {
    width: 100%;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    margin-top: 6px;
    scrollbar-width: none;
  }

  .lq-nav::-webkit-scrollbar {
    height: 0;
  }

  .lq-nav-item {
    flex: 0 0 auto;
    padding: 10px 12px;
  }

  .lq-sidebar-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .lq-sidebar-user {
    display: none;
  }

  .lq-lang-toggle {
    margin: 0;
  }

  .lq-main {
    padding: 18px 14px 40px;
  }

  .lq-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .lq-header-actions {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .lq-brand-text {
    display: none;
  }

  .lq-main {
    padding: 16px 10px 40px;
  }

  .lq-page-header {
    padding: 16px 16px;
  }

  .lq-card {
    padding: 14px;
  }

  .lq-table-toolbar {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .lq-table-toolbar .lq-input {
    max-width: none;
  }
}

@media (max-width: 840px) {
  .lq-card {
    overflow-x: auto;
  }

  .lq-table {
    min-width: 720px;
  }

  .lq-table th,
  .lq-table td {
    white-space: nowrap;
  }

  .lq-modal-card-wide {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .lq-modal-card-wide .lq-modal-header-soft {
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

.lq-analytics-page {
  padding: 24px;
}

.lq-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.lq-analytics-card {
  background: var(--lq-card);
  border: 1px solid var(--lq-border);
  border-radius: 12px;
  padding: 24px;
}

.lq-analytics-card h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--lq-text);
}

.lq-analytics-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lq-analytics-filters select,
.lq-analytics-filters input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--lq-border);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.lq-analytics-chart-card {
  grid-column: span 2;
}

.lq-chart-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.lq-chart-tab {
  padding: 8px 16px;
  border: 1px solid var(--lq-border);
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.lq-chart-tab:hover {
  background: var(--lq-bg);
}

.lq-chart-tab.active {
  background: var(--lq-brand);
  color: #fff;
  border-color: var(--lq-brand);
}

.lq-chart-container {
  height: 350px;
  position: relative;
}

.lq-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lq-summary-item {
  text-align: center;
  padding: 16px;
  background: var(--lq-bg);
  border-radius: 8px;
}

.lq-summary-label {
  display: block;
  font-size: 13px;
  color: var(--lq-muted);
  margin-bottom: 8px;
}

.lq-summary-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--lq-text);
}

.lq-analytics-table-card {
  grid-column: span 1;
}

.lq-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lq-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.lq-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lq-table-container {
  overflow-x: auto;
  max-height: 400px;
}

.lq-table-container table {
  min-width: 600px;
}

.lq-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.lq-table-scroll table {
  min-width: 900px;
}

.lq-export-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lq-export-grid .lq-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.lq-export-grid .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
}

.lq-button-sm {
  padding: 6px 12px;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .lq-analytics-grid {
    grid-template-columns: 1fr;
  }

  .lq-analytics-chart-card {
    grid-column: span 1;
  }

  .lq-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lq-export-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== 数据分析页面增强样式 ==================== */

/* 排名徽章 */
.lq-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px;
}

.lq-rank-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.lq-rank-silver {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

.lq-rank-bronze {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.lq-rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--lq-bg);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--lq-muted);
}

/* 徽章样式 */
.lq-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.lq-badge-primary {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.lq-badge-info {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.lq-badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

/* 文本颜色 */
.lq-text-green {
  color: #22c55e;
}

.lq-text-purple {
  color: #a855f7;
}

.lq-muted {
  color: var(--lq-muted);
  font-size: 12px;
}

/* 表格增强 */
.lq-table-striped tbody tr:nth-child(even) {
  background: rgba(244, 247, 251, 0.5);
}

.lq-table-striped tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* 概览卡片动画 */
.lq-summary-item {
  transition: all 0.3s ease;
}

.lq-summary-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lq-summary-value {
  transition: color 0.3s ease;
}

.lq-summary-item:hover .lq-summary-value {
  color: var(--lq-brand);
}

/* 加载动画 */
@keyframes lq-spin {
  to {
    transform: rotate(360deg);
  }
}

.lq-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: lq-spin 0.8s linear infinite;
}

/* 图表标签增强 */
.lq-chart-tabs {
  border-bottom: 1px solid var(--lq-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.lq-chart-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--lq-muted);
  font-weight: 500;
  position: relative;
}

.lq-chart-tab::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s;
}

.lq-chart-tab.active {
  color: var(--lq-brand);
  background: transparent;
}

.lq-chart-tab.active::after {
  background: var(--lq-brand);
}

/* 空状态 */
.lq-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--lq-muted);
  font-size: 14px;
  text-align: center;
}

/* 数据卡片阴影 */
.lq-analytics-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.lq-analytics-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 按钮增强 */
.lq-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lq-button-ghost {
  background: transparent;
  border: 1px solid var(--lq-border);
}

.lq-button-ghost:hover {
  background: var(--lq-bg);
}

.lq-button-outline {
  background: transparent;
  border: 2px solid var(--lq-border);
  color: var(--lq-text);
}

.lq-button-outline:hover {
  border-color: var(--lq-brand);
  color: var(--lq-brand);
  background: rgba(99, 102, 241, 0.05);
}

/* 响应式增强 */
@media (max-width: 768px) {
  .lq-analytics-page {
    padding: 16px;
  }

  .lq-analytics-grid {
    gap: 16px;
  }

  .lq-analytics-card {
    padding: 16px;
  }

  .lq-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lq-chart-container {
    height: 250px;
  }

  .lq-table-container {
    max-height: 300px;
  }
}

/* ========================================
 * 批量操作样式
 * ======================================== */

.lq-bulk-actions {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.lq-bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lq-bulk-selection {
  color: white;
  font-weight: 500;
  font-size: 14px;
}

.lq-bulk-selection strong {
  color: #ffd700;
  font-size: 18px;
}

.lq-bulk-actions-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lq-bulk-apply {
  background: white;
  color: #667eea;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lq-bulk-apply:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lq-bulk-apply:active {
  transform: translateY(0);
}

.lq-bulk-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lq-bulk-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lq-col-checkbox {
  width: 40px;
  text-align: center;
}

.lq-bulk-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.lq-bulk-modal-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.lq-bulk-modal-summary strong {
  color: #1d4ed8;
}

/* 按钮图标颜色主题 */
.lq-icon-primary {
  color: #4f46e5;
}

.lq-icon-primary:hover {
  color: #4338ca;
}

/* ========================================
 * 模板选择器样式
 * ======================================== */

.lq-template-bar {
  background: white;
  border: 1px solid var(--lq-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lq-template-bar .lq-label {
  font-weight: 500;
  color: var(--lq-text);
}

.lq-template-selector {
  flex: 1;
  max-width: 300px;
}

/* 模板管理弹窗样式 */
#lq-template-manager-modal .lq-modal-card-wide {
  max-width: 800px;
}

.lq-template-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lq-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
  max-height: 500px;
  overflow-y: auto;
  padding: 4px;
}

.lq-template-item {
  background: var(--lq-bg);
  border: 1px solid var(--lq-border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.lq-template-item:hover {
  border-color: var(--lq-brand);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.lq-template-info {
  margin-bottom: 12px;
}

.lq-template-name {
  font-weight: 600;
  color: var(--lq-text);
  font-size: 16px;
  margin-bottom: 4px;
}

.lq-template-meta {
  color: var(--lq-muted);
  font-size: 13px;
}

.lq-template-actions {
  display: flex;
  gap: 8px;
}

/* 模板栏响应式 */
@media (max-width: 768px) {
  .lq-template-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .lq-template-selector {
    max-width: none;
  }

  .lq-template-bar .lq-button {
    width: 100%;
  }
}
