* {
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent: #2563eb;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --sidebar-bg: #1e293b;
  --sidebar-text: #f8fafc;
}

body {
  background-color: #f1f5f9;
  color: var(--text-primary);
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  padding: 0;
}

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-color: #f8fafc;
}

.sidebar {
  background: #1e293b;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 1000;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.view-container {
  flex: 1;
  overflow-y: auto;
  background: #f8fafc;
}

/* Tabs UI */
.page-tabs {
  display: flex;
  background: #fff;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  overflow-x: auto;
  flex-shrink: 0;
}

.tab-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-bottom: none;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s;
  user-select: none;
}

.tab-item:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.tab-item.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: -1px;
  padding-bottom: 9px;
  border-top: 2px solid var(--primary);
}

.tab-label {
  margin-right: 8px;
}

.tab-close {
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  color: #94a3b8;
}

.tab-close:hover {
  background: #cbd5e1;
  color: #ef4444;
}

.page-container {
  width: 100%;
  margin: 0;
}

/* Header within pages is now standardized in Layout.js */
.header {
  display: none;
}

.header-left {
  display: flex;
  align-items: center;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.card {
  background-color: var(--bg-card);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 8px;
  gap: 0;
  border: 1px solid #cbd5e1;
}

.segmented-control .tab-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.segmented-control .tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.segmented-control .tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
}

/* Customer Position symbol tabs */
.position-symbol-tabs.el-tabs--card > .el-tabs__header {
  border-bottom: none;
  margin: 0;
}

.position-symbol-tabs.el-tabs--card > .el-tabs__header .el-tabs__nav {
  border: none;
  display: flex;
  gap: 6px;
}

.position-symbol-tabs.el-tabs--card > .el-tabs__header .el-tabs__item {
  border: 1px solid var(--border) !important;
  border-left: 1px solid var(--border) !important;
  border-radius: 6px;
  height: 32px;
  line-height: 30px;
  padding: 0 14px;
  color: var(--text-secondary);
  background: #ffffff;
  transition: all 0.2s;
}

.position-symbol-tabs.el-tabs--card
  > .el-tabs__header
  .el-tabs__item:hover:not(.is-active) {
  color: var(--primary);
  border-color: var(--primary);
}

.position-symbol-tabs.el-tabs--card
  > .el-tabs__header
  .el-tabs__item.is-active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.position-symbol-tabs.el-tabs--card
  > .el-tabs__header
  .el-tabs__item
  .is-icon-close {
  color: inherit;
}

.header-timezone {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* Filters */
.filters-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

select,
input {
  background-color: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
}

.overflow-x-auto {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: none;
}

.text-green {
  color: var(--success);
}

.text-red {
  color: var(--danger);
}

.text-gray {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: var(--bg-card);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 10;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.dropdown-content a {
  color: var(--text-primary);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.dropdown-content a:hover {
  background-color: #f1f5f9;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.pagination-left {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.page-size-selector select {
  padding: 4px 8px;
  margin-left: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
}

.pagination .pages {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination button {
  background-color: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 38px;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--text-secondary);
  padding: 0 4px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal {
  width: 500px;
  max-width: 90%;
  background: white;
}

.modal h3 {
  margin-top: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.meta-row label {
  color: var(--text-secondary);
}

.mono {
  font-family: monospace;
  color: var(--accent);
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Exchange Multi-select */
.exchange-multiselect {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #fff;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.multiselect-container {
  position: relative;
}

.exchange-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.75rem;
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-small:hover {
  background-color: #e2e8f0;
}

.exchange-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
}

.checkbox-label:hover {
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

/* Timezone Display */
.timezone-display {
  font-size: 0.875rem;
  color: var(--accent);
  background-color: #f1f5f9;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Data Window Badges */
.data-window-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.data-window-badge.execution {
  background-color: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.data-window-badge.fast {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.data-window-badge.core {
  background-color: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.dropdown-content hr {
  margin: 5px 10px;
  border: none;
  border-top: 1px solid var(--border);
}

.loading {
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.3s ease;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* Button Warning Style */
.btn-warning {
  background-color: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
}

.btn-setting {
  background: #facc15;
  color: #1e293b;
}

.btn-setting:hover {
  background: #eab308;
}

/* Investment Module Unified Style */
.investment-page .card {
  border-radius: 10px;
  border: 1px solid #e4e7ed;
  box-shadow: none;
  padding: 16px 18px;
}

.investment-page .filters-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed #ebeef5;
}

.investment-page .filters-bar-single-line {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.investment-page .filters-bar-single-line .filter-group {
  flex-shrink: 0;
}

.investment-page .filters-bar-single-line .filter-actions {
  margin-left: auto;
  flex-shrink: 0;
}

.investment-page .invest-filter-row {
  flex-wrap: wrap;
  overflow: visible;
  gap: 10px;
}

.investment-page .compact-date-picker {
  width: 160px;
}

.investment-page .compact-date-picker-sm {
  width: 130px;
}

.investment-page .invest-date-input {
  width: 150px;
}

.investment-page .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.investment-page .filter-group label {
  color: #606266;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.investment-page input,
.investment-page select {
  height: 36px;
  border-radius: 6px;
  border: 1px solid #dcdfe6;
  color: #303133;
  font-size: 14px;
  font-weight: 400;
  background: #fff;
}

.investment-page input::placeholder {
  color: #a8abb2;
  font-size: 14px;
  font-weight: 400;
}

.investment-page
  input[type="datetime-local"].date-empty::-webkit-datetime-edit {
  color: transparent;
}

.investment-page input:focus,
.investment-page select:focus {
  outline: none;
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15);
}

/* Element Plus inputs in dialogs: remove inner native input border to avoid double frame */
.investment-page .el-input input,
.investment-page .el-select input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
}

.investment-page .el-input input:focus,
.investment-page .el-select input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.investment-page .reject-dialog .el-textarea__inner {
  border: 1px solid #dcdfe6 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 10px 12px !important;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.investment-page .reject-dialog .el-textarea__inner:focus {
  border-color: #409eff !important;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15) !important;
}

.investment-page .filter-actions .btn {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.investment-page .overflow-x-auto {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.investment-page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.investment-page thead tr {
  background: #f8fafc;
}

.investment-page th {
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  color: #606266;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}

.investment-page td {
  text-align: center;
  font-size: 13px;
  color: #606266;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.investment-page tbody tr:nth-child(even) td {
  background: #fafcff;
}

.investment-page tbody tr:hover td {
  background: #f5f7fa;
}

.investment-page tbody tr:last-child td {
  border-bottom: none;
}

.investment-page a {
  color: #409eff;
  text-decoration: none;
}

.investment-page a:hover {
  color: #66b1ff;
}

.investment-page .text-center {
  color: #909399;
}

.investment-page .el-pagination {
  margin-top: 2px;
}

.investment-page .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
}

.investment-page .modal.card {
  border-radius: 10px;
  border: 1px solid #e4e7ed;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  position: relative;
}

.agent-form-nowrap .el-form-item__label {
  white-space: nowrap;
}

/* Investment operation tables: keep left columns no-wrap, horizontal scroll, sticky operation column */
.investment-page .investment-op-table {
  min-width: 1480px;
}

.investment-page .investment-op-table th,
.investment-page .investment-op-table td {
  white-space: nowrap;
}

.investment-page .investment-op-table th:nth-child(1),
.investment-page .investment-op-table td:nth-child(1) {
  position: sticky;
  left: 0;
  min-width: 72px;
  width: 72px;
  max-width: 72px;
  z-index: 2;
  background: #fff;
}

.investment-page .investment-op-table th:nth-child(2),
.investment-page .investment-op-table td:nth-child(2) {
  position: sticky;
  left: 72px;
  min-width: 200px;
  width: 200px;
  max-width: 200px;
  z-index: 2;
  background: #fff;
  box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.45);
}

.investment-page .investment-op-table thead th:nth-child(1),
.investment-page .investment-op-table thead th:nth-child(2) {
  background: #f8fafc;
  z-index: 5;
}

.investment-page .investment-op-table tbody tr:nth-child(even) td:nth-child(1),
.investment-page .investment-op-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #fafcff;
}

.investment-page .investment-op-table tbody tr:hover td:nth-child(1),
.investment-page .investment-op-table tbody tr:hover td:nth-child(2) {
  background: #f5f7fa;
}

.investment-page .investment-op-table .ops-col {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  min-width: 96px;
  width: 96px;
  max-width: 96px;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.45);
}

.investment-page .investment-op-table td.ops-col {
  text-align: center;
}

.investment-page .investment-op-table thead .ops-col {
  background: #f8fafc;
  z-index: 4;
}

.investment-page .investment-op-table tbody tr:nth-child(even) .ops-col {
  background: #fafcff;
}

.investment-page .investment-op-table tbody tr:hover .ops-col {
  background: #f5f7fa;
}

.investment-page .income-op-table .ops-col {
  min-width: 142px;
  width: 142px;
  max-width: 142px;
}

.investment-page .invest-op-table .ops-col,
.investment-page .withdraw-op-table .ops-col {
  min-width: 96px;
  width: 96px;
  max-width: 96px;
}

.investment-page .copyable-id {
  display: inline-block;
  cursor: copy;
  color: #334155;
  font-weight: 600;
  font-size: 12px;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  letter-spacing: 0.1px;
}

.investment-page .copyable-id:hover {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.investment-page .ops-btn-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.investment-page .op-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.investment-page .op-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.16);
}

.investment-page .op-btn:active {
  transform: translateY(0);
}

.investment-page .op-btn-primary {
  color: #fff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.investment-page .op-btn-success {
  color: #fff;
  border-color: #16a34a;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.investment-page .op-btn-warning {
  color: #fff;
  border-color: #d97706;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.investment-page .op-btn-danger {
  color: #fff;
  border-color: #dc2626;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.investment-page .op-btn-plain {
  color: #334155;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.investment-page .op-btn-dropdown {
  min-width: 66px;
}

.investment-page .op-btn-disabled {
  color: #94a3b8;
  border-color: #e2e8f0;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  box-shadow: none;
  cursor: not-allowed;
}

.investment-page .op-btn-disabled:hover,
.investment-page .op-btn-disabled:active {
  transform: none;
  box-shadow: none;
}

.investment-page .op-empty {
  display: inline-block;
  padding: 0;
  color: #94a3b8;
  font-size: 12px;
  border: none;
  background: transparent;
}

.investment-page .el-dropdown-menu__item.is-danger {
  color: #dc2626;
}

.investment-page .el-dropdown-menu__item.is-danger:focus,
.investment-page .el-dropdown-menu__item.is-danger:not(.is-disabled):hover {
  color: #dc2626;
  background-color: #fef2f2;
}

.investment-page .modal-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #94a3b8;
}

.investment-page .modal-close-btn:hover {
  color: #475569;
}

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

.settlement-detail-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.settlement-detail-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.settlement-detail-value {
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
}

.fund-summary-grid.card {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  margin-bottom: 16px;
}

.fund-summary-card.card {
  margin: 0;
  padding: 16px;
}

.fund-summary-label {
  color: #606266;
  font-size: 15px;
  font-weight: 600;
}

.fund-summary-value {
  margin-top: 10px;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}

.fund-summary-unit {
  margin-left: 4px;
  font-size: 20px;
  color: #4b5563;
  font-weight: 600;
}

/* Badge Styles */
.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

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

.badge-gray {
  background-color: #f1f5f9;
  color: #475569;
}

.badge-orange {
  background-color: #ffedd5;
  color: #ea580c;
}

.badge-purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

.text-red {
  color: #ef4444;
}

.text-green {
  color: #10b981;
}

.text-yellow {
  color: #f59e0b;
}

.text-orange {
  color: #ea580c;
}

.font-bold {
  font-weight: 700;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .fund-summary-grid.card {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
    overflow: auto;
    height: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar .logo {
    padding: 15px;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    padding: 0 10px 10px;
  }

  .fund-summary-grid.card {
    grid-template-columns: 1fr;
  }

  .investment-page .filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .investment-page .filter-actions .btn {
    flex: 1;
    min-width: 110px;
  }

  .investment-page .filters-bar-single-line .filter-actions {
    width: auto;
    margin-left: auto;
  }

  .investment-page .filters-bar-single-line .filter-actions .btn {
    flex: initial;
    min-width: 92px;
  }

  .settlement-detail-grid {
    grid-template-columns: 1fr;
  }

  .menu-header {
    display: none;
  }

  .nav-item {
    padding: 10px 15px;
    font-size: 0.875rem;
  }

  .main-content {
    padding: 15px;
    height: auto;
    overflow: visible;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .filters-bar {
    gap: 10px;
  }

  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .filter-group label {
    min-width: 70px;
  }

  .filter-group select,
  .filter-group input {
    flex: 1;
  }

  .filter-group .multiselect-container {
    flex: 1;
  }

  .filter-group .btn {
    width: 100%;
  }

  .filter-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .filter-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .tab-btn {
    padding: 8px 15px;
    white-space: nowrap;
  }

  .modal {
    width: 95%;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }

  .pagination {
    flex-direction: column;
    gap: 15px;
  }
}

/* Login Page Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f0f2f5;
}

.login-card {
  width: 350px;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.login-card button {
  width: 100%;
  padding: 10px;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.login-card button:hover {
  background: #40a9ff;
}

.login-card button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.error-msg {
  color: #ff4d4f;
  margin-bottom: 15px;
  text-align: center;
  font-size: 14px;
}

/* User Profile in Sidebar */
.user-profile {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: #002140;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.username {
  color: white;
  font-weight: bold;
}

.role-badge {
  font-size: 10px;
  background: #1890ff;
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
}

.user-actions {
  display: flex;
  gap: 10px;
}

.btn-text {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.btn-text:hover {
  color: white;
  text-decoration: underline;
}

/* Modal Overlay fixed (if not exists) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* System Mgmt Styles */
.badge-blue {
  background: #e6f7ff;
  color: #1890ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
  background: #f0f2f5;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  cursor: pointer;
}

.btn-small:hover {
  color: #40a9ff;
  border-color: #40a9ff;
}

.tabs {
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
}

.tab-btn.active {
  border-bottom: 2px solid #1890ff;
  color: #1890ff;
  font-weight: bold;
}

/* Top Header Styles */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 1px solid #ddd;
  height: 40px;
  box-sizing: border-box;
  /* The tabs are inside the header now, so no extra padding needed */
}

.page-tabs {
  flex: 1;
  overflow-x: auto;
  border-bottom: none;
  /* Remove duplicate border */
  /* Adjust styles since it's inside header now */
}

.header-user-profile {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 14px;
}

.user-greeting {
  margin-right: 20px;
  color: #555;
}

.header-actions {
  display: flex;
  gap: 15px;
}

.action-btn {
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.action-btn:hover {
  color: #1890ff;
}

.logout-btn:hover {
  color: #ff4d4f;
}

/* --- Login Page Styles --- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f0f2f5;
}

.login-card {
  width: 350px;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.login-card .form-group {
  margin-bottom: 15px;
}

.login-card .form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
}

.login-card .form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.login-card button {
  width: 100%;
  padding: 10px;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.login-card button:hover {
  background: #40a9ff;
}

.login-card button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.login-card .error-msg {
  color: #ff4d4f;
  margin-bottom: 15px;
  text-align: center;
  font-size: 14px;
}

/* Element Plus Customizations */
:root {
  --el-color-primary: var(--primary);
  --el-color-success: var(--success);
  --el-color-danger: var(--danger);
}

.el-button--primary {
  --el-button-hover-bg-color: var(--primary-hover);
  --el-button-hover-border-color: var(--primary-hover);
}

.el-card {
  --el-card-border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid var(--border) !important;
}

.el-table {
  --el-table-border-color: var(--border);
  --el-table-header-bg-color: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}

.el-dialog {
  border-radius: 16px !important;
  overflow: hidden;
}

.el-dialog__header {
  margin-right: 0 !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--border);
}

.el-dialog__title {
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}

.el-dialog__body {
  padding: 30px 24px !important;
}

.el-dialog__footer {
  padding: 16px 24px !important;
  border-top: 1px solid var(--border);
  background: #f9fafb;
}

/* Login Page Specifics */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f1f5f9;
}

.login-card {
  width: 400px;
  padding: 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.captcha-box {
  cursor: pointer;
  height: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  user-select: none;
  background-color: #f8fafc;
}

.captcha-box:hover {
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.captcha-box:active {
  transform: scale(0.95);
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  margin-bottom: 20px;
}

/* Text Ellipsis */
.text-ellipsis {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  cursor: help;
}

/* Investment dialogs */
.fund-dialog {
  border-radius: 10px;
  overflow: hidden;
}

.fund-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.fund-dialog-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
}

.fund-dialog-close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.fund-dialog-close:hover {
  color: #334155;
}

.fund-dialog-body {
  padding: 18px 20px;
}

.fund-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

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

.fund-inline-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.fund-form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fund-form-item label {
  color: #334155;
  font-weight: 600;
  font-size: 14px;
}

.fund-form-item input,
.fund-form-item select,
.fund-form-item textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
}

.fund-form-item textarea {
  resize: vertical;
  min-height: 88px;
}

.fund-form-item input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.fund-customer-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #fff;
}

.fund-customer-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: #334155;
}

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

.fund-customer-item:hover {
  background: #f8fafc;
}

/* Home Page */
.home-page {
  min-height: calc(100vh - 170px);
  width: 100%;
  padding: 8px 4px;
}

.home-hero-card {
  min-height: inherit;
  width: 100%;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #dbe7ff;
  background: radial-gradient(
      circle at 88% 12%,
      rgba(37, 99, 235, 0.15),
      transparent 40%
    ),
    linear-gradient(135deg, #ffffff 0%, #f5f9ff 52%, #eef4ff 100%);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 560px);
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.home-copy {
  max-width: 620px;
}

.home-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #1d4ed8;
}

.home-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.home-slogan {
  margin: 18px 0 0;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
  color: #334155;
  max-width: 36ch;
}

.home-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-visual img {
  width: min(100%, 560px);
  height: auto;
  border-radius: 16px;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.12));
}

@media (max-width: 768px) {
  .home-page {
    min-height: auto;
    padding: 0;
  }

  .home-hero-card {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 22px;
    border-radius: 16px;
    padding: 22px 16px;
  }

  .home-title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .home-slogan {
    margin-top: 12px;
  }
}

/* Customer position / order pages mobile optimization */
.customer-position-page .position-page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-position-page .position-page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.customer-position-page .position-page-toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.customer-position-page .position-symbol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.customer-position-page .position-symbol-tabs-wrap {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.customer-position-page .position-meta-row {
  font-size: 13px;
  color: #64748b;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.customer-position-page .position-meta-weight {
  margin-left: auto;
  color: #334155;
  font-weight: 500;
}

.customer-position-page .position-main-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-open-order-page .open-order-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.customer-open-order-page .open-order-toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.customer-open-order-page .open-order-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-order-page .customer-order-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customer-order-page .customer-order-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.customer-order-page .customer-order-filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed #ebeef5;
}

.customer-order-page .customer-order-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile standalone layout */
.mobile-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f5f7fb;
}

@media (hover: none) and (pointer: coarse) {
  :where(
      .mobile-layout button,
      .mobile-layout .el-button,
      .mobile-layout [role="button"],
      .mobile-layout .el-pagination button,
      .mobile-layout .el-dropdown-menu__item,
      .mobile-layout .el-picker-panel__link-btn,
      .el-popper .el-dropdown-menu__item,
      .el-picker-panel__link-btn
    ) {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  :where(
      .mobile-layout button,
      .mobile-layout .el-button,
      .mobile-layout [role="button"],
      .mobile-layout .el-pagination button,
      .mobile-layout .el-dropdown-menu__item,
      .mobile-layout .el-picker-panel__link-btn,
      .el-popper .el-dropdown-menu__item,
      .el-picker-panel__link-btn
    ):focus,
  :where(
      .mobile-layout button,
      .mobile-layout .el-button,
      .mobile-layout [role="button"],
      .mobile-layout .el-pagination button,
      .mobile-layout .el-dropdown-menu__item,
      .mobile-layout .el-picker-panel__link-btn,
      .el-popper .el-dropdown-menu__item,
      .el-picker-panel__link-btn
    ):focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-trigger {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-topbar-title-wrap {
  min-width: 0;
  flex: 1;
}

.mobile-topbar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.mobile-topbar-user {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.mobile-topbar-timezone {
  max-width: 132px;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.mobile-user-name {
  max-width: 72px;
  font-size: 12px;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-action-btn {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-action-btn.danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.mobile-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  padding-bottom: 8px;
}

.mobile-menu-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.35);
}

.mobile-side-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: min(82vw, 300px);
  height: 100dvh;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 10px 0 26px rgba(15, 23, 42, 0.08);
  transform: translateX(-100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.mobile-side-menu.open {
  transform: translateX(0);
}

.mobile-side-menu-head {
  height: 58px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-side-menu-brand {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.mobile-side-menu-brand span {
  color: #1d4ed8;
}

.mobile-side-menu-close {
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 20px;
  line-height: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-side-menu-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px 14px;
}

.mobile-side-menu-group {
  margin-bottom: 8px;
}

.mobile-side-menu-group-trigger {
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 8px;
  padding: 0 10px 0 12px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-side-menu-group-trigger.active {
  color: #1d4ed8;
  background: #eff6ff;
}

.mobile-side-menu-group-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-side-menu-group-arrow {
  font-size: 18px;
  line-height: 1;
  color: #64748b;
  transform: rotate(0deg);
  transition: transform 0.15s ease-out;
}

.mobile-side-menu-group-arrow.open {
  transform: rotate(90deg);
  color: #2563eb;
}

.mobile-side-menu-group-children {
  padding-top: 4px;
}

.mobile-side-menu-item {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 8px;
  margin-bottom: 6px;
  padding: 0 12px;
  text-align: left;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-side-menu-item.level-root {
  margin-bottom: 8px;
}

.mobile-side-menu-item.level-child {
  padding-left: 24px;
  font-weight: 500;
}

.mobile-side-menu-item:hover {
  background: #f8fafc;
}

.mobile-side-menu-item.active {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.mobile-coming-soon {
  min-height: calc(100dvh - 170px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.mobile-coming-soon-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.mobile-coming-soon-icon {
  font-size: 28px;
  line-height: 1;
}

.mobile-coming-soon-title {
  margin: 10px 0 6px;
  font-size: 18px;
  color: #0f172a;
}

.mobile-coming-soon-desc {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.mobile-home-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-home-welcome {
  background: radial-gradient(
      circle at 88% 12%,
      rgba(37, 99, 235, 0.14),
      transparent 40%
    ),
    linear-gradient(135deg, #ffffff 0%, #f5f9ff 52%, #eef4ff 100%);
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  color: #0f172a;
  padding: 18px 16px;
  min-height: 168px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.mobile-home-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 10px;
  align-items: center;
  min-height: 132px;
}

.mobile-home-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mobile-home-kicker {
  margin: 0;
  font-size: 11px;
  color: #1d4ed8;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.mobile-home-title {
  margin: 10px 0 6px;
  font-size: 20px;
  line-height: 1.2;
  color: #0f172a;
}

.mobile-home-subtitle {
  margin: 0;
  font-size: 13px;
  color: #334155;
}

.mobile-home-slogan {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  font-weight: 500;
}

.mobile-home-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.mobile-home-visual img {
  width: 100%;
  max-width: 126px;
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.14));
}

.mobile-readonly-input .el-input__wrapper {
  background: #f8fafc !important;
  box-shadow: 0 0 0 1px #e2e8f0 inset !important;
}

.mobile-readonly-input .el-input__inner {
  color: #475569 !important;
}

.mobile-form-helper {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.mobile-home-shortcuts {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}

.mobile-home-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: #0f172a;
}

.mobile-home-shortcut-card {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-home-shortcut-card:last-child {
  margin-bottom: 0;
}

.mobile-home-shortcut-title {
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
}

.mobile-home-shortcut-desc {
  font-size: 12px;
  color: #64748b;
}

.mobile-customer-page {
  --mobile-admin-input-height: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-layout,
.mobile-sheet-dialog,
.mobile-trade-dialog,
.mobile-contract-order-dialog,
.mobile-reduction-list-dialog {
  --mobile-admin-input-height: 32px;
}

/* Mobile input height baseline: align all business inputs with CustomerList. */
.mobile-layout .el-input__wrapper,
.mobile-layout .el-select__wrapper,
.mobile-layout .el-date-editor.el-input .el-input__wrapper,
.mobile-sheet-dialog .el-input__wrapper,
.mobile-sheet-dialog .el-select__wrapper,
.mobile-sheet-dialog .el-date-editor.el-input .el-input__wrapper,
.mobile-trade-dialog .el-input__wrapper,
.mobile-trade-dialog .el-select__wrapper,
.mobile-trade-dialog .el-date-editor.el-input .el-input__wrapper,
.mobile-contract-order-dialog .el-input__wrapper,
.mobile-contract-order-dialog .el-select__wrapper,
.mobile-contract-order-dialog .el-date-editor.el-input .el-input__wrapper {
  min-height: var(--mobile-admin-input-height) !important;
  height: var(--mobile-admin-input-height) !important;
}

.mobile-layout input:not(.el-input__inner):not(.el-range-input):not([type="checkbox"]):not([type="radio"]),
.mobile-sheet-dialog input:not(.el-input__inner):not(.el-range-input):not([type="checkbox"]):not([type="radio"]),
.mobile-trade-dialog input:not(.el-input__inner):not(.el-range-input):not([type="checkbox"]):not([type="radio"]),
.mobile-contract-order-dialog input:not(.el-input__inner):not(.el-range-input):not([type="checkbox"]):not([type="radio"]) {
  min-height: var(--mobile-admin-input-height);
  height: var(--mobile-admin-input-height);
}

.mobile-customer-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-customer-toolbar-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
}

.mobile-customer-toolbar-row-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-assoc-toolbar {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-assoc-toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.mobile-assoc-toolbar-row .el-input,
.mobile-assoc-toolbar-row .el-select {
  width: 100%;
  min-width: 0;
}

.mobile-assoc-add-row .el-button {
  width: 100%;
}

.mobile-assoc-select-toolbar {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-assoc-select-fields {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.mobile-invest-toolbar {
  gap: 8px;
}

.mobile-invest-toolbar .el-select,
.mobile-invest-toolbar .el-input,
.mobile-invest-toolbar input {
  width: 100%;
}

.mobile-invest-toolbar .el-input__wrapper,
.mobile-invest-toolbar .el-select__wrapper {
  min-height: var(--mobile-admin-input-height) !important;
  height: var(--mobile-admin-input-height) !important;
}

.mobile-invest-toolbar .el-input__inner,
.mobile-invest-toolbar .el-select__selected-item {
  font-size: 13px;
}

.mobile-invest-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-invest-date-row > span {
  flex: 0 0 22px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.mobile-invest-date-input {
  flex: 1 1 0;
  min-width: 0;
  height: var(--mobile-admin-input-height);
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color: #334155;
  background: #fff;
}

.mobile-invest-date-picker {
  flex: 1 1 0;
  min-width: 0;
}

.mobile-invest-date-picker .el-input__wrapper {
  min-height: var(--mobile-admin-input-height) !important;
  height: var(--mobile-admin-input-height) !important;
  padding: 0 8px !important;
}

.mobile-invest-date-picker .el-input__inner {
  font-size: clamp(10px, 2.8vw, 13px);
  line-height: 1;
}

.mobile-invest-date-picker .el-input__suffix {
  margin-left: 4px;
}

/* Mobile date picker panel: use single-line Chinese weekdays. */
.mobile-date-picker-popper .el-date-table th {
  position: relative;
  white-space: nowrap;
  color: transparent;
}

.mobile-date-picker-popper .el-date-table th::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #606266;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.mobile-date-picker-popper .el-date-table th:nth-child(1)::after { content: "日"; }
.mobile-date-picker-popper .el-date-table th:nth-child(2)::after { content: "一"; }
.mobile-date-picker-popper .el-date-table th:nth-child(3)::after { content: "二"; }
.mobile-date-picker-popper .el-date-table th:nth-child(4)::after { content: "三"; }
.mobile-date-picker-popper .el-date-table th:nth-child(5)::after { content: "四"; }
.mobile-date-picker-popper .el-date-table th:nth-child(6)::after { content: "五"; }
.mobile-date-picker-popper .el-date-table th:nth-child(7)::after { content: "六"; }

/* Left date box in datetime panel header does not need interaction on mobile. */
.mobile-date-picker-popper .el-date-picker__time-header .el-date-picker__editor-wrap:first-child {
  pointer-events: none !important;
}

/* Keep header clickable (for date/time panel switch), but block native text input focus. */
.mobile-date-picker-popper .el-date-picker__time-header .el-input__inner {
  pointer-events: none !important;
  user-select: none !important;
  caret-color: transparent !important;
}

/* Datetime spinner on mobile: force HH:mm two-column layout and remove phantom seconds column. */
.mobile-date-picker-popper .el-time-panel__content.has-seconds .el-time-spinner__wrapper {
  width: 50% !important;
}

.mobile-date-picker-popper .el-time-panel__content.has-seconds .el-time-spinner__wrapper:nth-child(3) {
  display: none !important;
}

.mobile-date-picker-popper .el-time-panel__content.has-seconds:after {
  left: 50% !important;
}

.mobile-date-picker-popper .el-time-panel__content.has-seconds:before {
  padding-left: 50% !important;
}

.mobile-invest-action-grid .mobile-customer-btn {
  width: 100%;
}

.mobile-invest-toggle-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
}

.mobile-invest-toggle-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mobile-invest-toggle-text {
  font-size: 12px;
  color: #64748b;
}

.mobile-invest-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.mobile-invest-base-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mobile-invest-summary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 6px 0 12px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.mobile-invest-back-row {
  width: 100%;
  margin-top: 2px;
}

.mobile-position-symbol-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-position-symbol-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.mobile-position-symbol-tab {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  padding: 0 10px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
}

.mobile-position-symbol-tab.active {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mobile-position-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #64748b;
  padding: 2px 0 0;
}

.mobile-position-meta-tail {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-position-meta-weight {
  margin-left: auto;
  text-align: right;
  color: #64748b;
  font-weight: 400;
}

.mobile-customer-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  font-size: 13px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-customer-btn.full {
  width: 100%;
}

.mobile-customer-btn.primary {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mobile-customer-toolbar-row .mobile-customer-btn.primary {
  min-width: 84px;
}

.mobile-customer-btn.success {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.mobile-customer-btn.warning {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}

.mobile-customer-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.mobile-customer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-customer-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-list-loading-center > .el-loading-mask .el-loading-spinner {
  position: fixed;
  left: 50%;
  top: 50%;
  margin-top: 0;
  transform: translate(-50%, -50%);
}

.mobile-customer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-customer-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.mobile-customer-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mobile-position-title-line {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
}

.mobile-position-title-main,
.mobile-position-title-phone {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: auto;
}

.mobile-position-title-email {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}

.mobile-position-title-main {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.mobile-position-title-phone {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.mobile-position-title-email {
  flex: 1 1 auto;
  flex-shrink: 1;
}

.mobile-customer-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.mobile-customer-head-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.2;
  font-weight: 400;
}

.mobile-customer-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  word-break: break-all;
}

.mobile-customer-meta-inline-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mobile-inline-link-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #409eff;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-customer-label {
  color: inherit;
  font-weight: 400;
}

.mobile-customer-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mobile-customer-btn[disabled] {
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
  cursor: not-allowed;
}

.mobile-invest-card {
  border-color: #dbe5f2;
}

.mobile-invest-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-invest-strong {
  color: #0f172a;
  font-weight: 700;
}

@media (max-width: 380px) {
  .mobile-customer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-customer-actions .mobile-customer-btn {
    width: 100%;
  }
}

.mobile-customer-empty {
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 24px 10px;
  color: #64748b;
  font-size: 13px;
}

.mobile-customer-pagination {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  justify-content: center;
}

.mobile-reduction-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: hidden;
}

.mobile-reduction-table-compact .el-table__cell {
  padding: 6px 4px;
}

.mobile-reduction-table-compact .cell {
  font-size: 12px;
  line-height: 1.25;
  padding: 0 2px;
  white-space: normal;
  word-break: break-word;
}

.mobile-reduction-table-compact .el-table__header .cell {
  font-size: 11px;
  color: #64748b;
}

.mobile-reduction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-reduction-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.mobile-reduction-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-reduction-header-btn {
  height: 28px;
  min-width: 32px;
  padding: 0 9px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.mobile-reduction-header-btn.rotate {
  min-width: 38px;
  padding: 0 7px;
}

.mobile-rotate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mobile-reduction-header-btn.rotate.active {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mobile-reduction-header-btn.close {
  font-size: 18px;
  padding: 0 8px;
}

.mobile-reduction-pagination {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.mobile-reduction-pagination-summary {
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.mobile-reduction-pagination .el-pagination {
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 6px;
}

.mobile-batchtp-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 10px;
}

.mobile-batchtp-top-left {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
}

@media (max-width: 768px) {
  .mobile-layout .investment-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-layout .investment-page .card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 0;
    box-shadow: none;
  }

  .mobile-layout .investment-page .filters-bar,
  .mobile-layout .investment-page .filters-bar-single-line,
  .mobile-layout .investment-page .invest-filter-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 10px;
    overflow: visible;
  }

  .mobile-layout .investment-page .filter-group {
    width: 100%;
    margin-left: 0 !important;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .mobile-layout .investment-page .filter-group label {
    font-size: 12px;
    color: #64748b;
  }

  .mobile-layout .investment-page .filter-group > input,
  .mobile-layout .investment-page .filter-group > select,
  .mobile-layout .investment-page .filter-group > .el-select,
  .mobile-layout .investment-page .filter-group > .el-input,
  .mobile-layout .investment-page .filter-group > .el-date-editor {
    width: 100%;
    min-width: 0;
  }

  .mobile-layout .investment-page .filter-actions {
    width: 100% !important;
    margin-left: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch !important;
  }

  .mobile-layout .investment-page .filter-actions .btn {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  .mobile-layout .investment-page .overflow-x-auto {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
  }

  .mobile-layout .investment-page .investment-op-table {
    min-width: 980px;
  }

  .mobile-layout .investment-page .investment-op-table th,
  .mobile-layout .investment-page .investment-op-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .mobile-layout .investment-page .fund-summary-grid.card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
  }

  .mobile-layout .investment-page .fund-summary-card.card {
    padding: 10px;
  }

  .mobile-layout .investment-page .fund-summary-label {
    font-size: 12px;
  }

  .mobile-layout .investment-page .fund-summary-value {
    margin-top: 6px;
    font-size: 22px;
    line-height: 1.2;
  }

  .mobile-layout .investment-page .fund-summary-unit {
    font-size: 13px;
  }

  .mobile-layout .investment-page .pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .mobile-layout .investment-page .pagination-left {
    justify-content: center;
    font-size: 12px;
  }

  .mobile-layout .investment-page .pagination .pages {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  body.mobile-dialog-scroll-lock {
    overflow: hidden;
    touch-action: none;
  }

  .mobile-layout.mobile-dialog-open {
    height: 100dvh;
    overflow: hidden;
  }

  .mobile-layout.mobile-dialog-open .mobile-content {
    overflow: hidden;
  }

  .mobile-sheet-dialog.el-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
  }

  .mobile-sheet-dialog .el-dialog__header {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9;
  }

  .mobile-sheet-dialog .el-dialog__title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
  }

  .mobile-sheet-dialog .el-dialog__body {
    padding: 14px 16px 10px !important;
    max-height: 62dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-reduction-list-dialog .el-dialog__body {
    padding: 12px 0 10px !important;
    max-height: 76dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 10px;
  }

  .mobile-reduction-list-dialog.el-dialog,
  .mobile-reduction-list-dialog .el-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .mobile-reduction-list-dialog .mobile-reduction-table-wrap {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .mobile-reduction-list-fixed-row {
    flex-shrink: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .mobile-reduction-table-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen.el-dialog {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 100dvh !important;
    max-width: 100dvh !important;
    height: 100dvw !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
    border-radius: 0 !important;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen .el-dialog__header {
    padding: calc(6px + env(safe-area-inset-top)) 8px 6px !important;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen .el-dialog__body {
    padding: 6px 0 0 !important;
    max-height: calc(100dvw - 86px);
    gap: 6px;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen .mobile-reduction-table-compact .cell {
    font-size: 11px;
    line-height: 1.2;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen .mobile-reduction-list-fixed-row {
    padding-left: 0;
    padding-right: 0;
  }

  .mobile-reduction-list-dialog.is-landscape-fullscreen .mobile-customer-pagination.mobile-reduction-pagination {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 6px 0;
    margin: 0;
  }

  .mobile-batchtp-top-row {
    gap: 8px;
  }

  .mobile-batchtp-top-left {
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .mobile-batchtp-top-left .mobile-customer-meta {
    white-space: nowrap;
  }

  .mobile-sheet-dialog .el-dialog__footer {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mobile-sheet-dialog .el-dialog__footer .el-button {
    width: 100%;
    height: 40px;
    margin: 0 !important;
  }

  .mobile-contract-order-dialog.el-dialog {
    top: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .mobile-contract-order-dialog .el-dialog__body {
    max-height: none;
    flex: 1;
    overflow-y: auto;
  }
}

.mobile-login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 82% 10%, rgba(37, 99, 235, 0.18), transparent 45%),
    linear-gradient(160deg, #f8fbff 0%, #eef4ff 55%, #e5eeff 100%);
}

.mobile-login-card {
  width: min(420px, 100%);
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(30, 64, 175, 0.12);
  padding: 18px 16px;
}

.mobile-login-head {
  text-align: center;
  margin-bottom: 16px;
}

.mobile-login-brand {
  font-size: 22px;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: -0.02em;
}

.mobile-login-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.mobile-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.mobile-login-field input {
  width: 100%;
  height: var(--mobile-admin-input-height, 32px);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
}

.mobile-login-captcha-row {
  display: flex;
  gap: 8px;
}

.mobile-captcha-btn {
  width: 110px;
  height: var(--mobile-admin-input-height, 32px);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
  color: #64748b;
}

.mobile-captcha-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-login-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: #be123c;
  padding: 10px 12px;
  font-size: 13px;
}

.mobile-login-submit {
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 768px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mobile-layout,
  .mobile-content,
  .mobile-content .page-container,
  .mobile-content .el-card,
  .mobile-content .el-card__body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Prevent iOS auto-zoom on focus */
  .mobile-layout input,
  .mobile-layout select,
  .mobile-layout textarea,
  .mobile-layout button,
  .mobile-layout .el-input__inner,
  .mobile-layout .el-textarea__inner,
  .mobile-layout .el-select__wrapper,
  .mobile-layout .el-input-number .el-input__inner {
    font-size: 16px !important;
  }

  .mobile-login-field input,
  .mobile-login-submit,
  .mobile-captcha-btn {
    font-size: 16px !important;
  }

  .mobile-login-shell {
    overflow-x: hidden;
  }

  .mobile-login-captcha-row {
    width: 100%;
    min-width: 0;
  }

  .mobile-login-captcha-row input {
    min-width: 0;
  }

  .mobile-captcha-btn {
    flex: 0 0 110px;
  }

  .customer-position-page .position-page-toolbar-actions {
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }

  .customer-position-page .position-page-toolbar-actions .el-input {
    width: 100%;
  }

  .customer-position-page .position-page-toolbar-actions .el-button {
    flex: 1;
    min-width: 92px;
    margin: 0 !important;
  }

  .customer-position-page .position-meta-row {
    gap: 8px;
  }

  .customer-position-page .position-meta-weight {
    margin-left: 0;
    width: 100%;
  }

  .customer-open-order-page .open-order-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .customer-open-order-page .open-order-toolbar-actions .el-input {
    width: 100%;
  }

  .customer-open-order-page .open-order-toolbar-actions .el-button {
    flex: 1;
    min-width: 92px;
    margin: 0 !important;
  }

  .customer-order-page .customer-order-filter-row {
    gap: 8px;
  }

  .customer-order-page .customer-order-filter-row .el-input,
  .customer-order-page .customer-order-filter-row .el-select {
    width: 100%;
  }

  .customer-order-page .customer-order-filter-row .el-button {
    flex: 1;
    min-width: 92px;
    margin: 0 !important;
  }

  .mobile-trade-dialog.el-dialog {
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: 100%;
  }

  .mobile-trade-dialog .el-dialog__header {
    padding: 14px 16px !important;
  }

  .mobile-trade-dialog .el-dialog__body {
    padding: 14px 16px !important;
    max-height: calc(100dvh - 132px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-trade-dialog .el-dialog__footer {
    padding: 12px 16px !important;
  }

  .mobile-trade-dialog .el-form-item {
    margin-bottom: 14px;
  }

  .mobile-trade-dialog .el-col {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .mobile-content .card,
  .mobile-content .el-card {
    border-radius: 10px !important;
  }

  .mobile-content .el-card__header {
    padding: 12px !important;
  }

  .mobile-content .el-card__body {
    padding: 12px !important;
  }
}

/* Keep desktop framework aligned in phone "desktop site" mode.
   Only prevent layout misalignment, no extra responsive behavior. */
@media (max-width: 768px) {
  .pc-layout-root {
    flex-direction: row !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .pc-layout-root .sidebar {
    height: 100% !important;
    border-bottom: none !important;
  }

  .pc-layout-root .sidebar .logo {
    padding: 0 !important;
  }

  .pc-layout-root .main-content {
    padding: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
}
