/* ===== Loan Service - 融資情報サービス ===== */
/* accent: #1e40af (deep blue) */

/* --- Base Layout --- */
.ls-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}
.ls-header {
  margin-bottom: 4px;
}
.ls-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ls-title-icon {
  font-size: 24px;
}
.ls-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin: 2px 0 0;
}

/* --- Tabs --- */
.ls-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ls-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.ls-tab:hover {
  color: var(--text);
}
.ls-tab.active {
  color: #1e40af;
  border-bottom-color: #1e40af;
  font-weight: 600;
}
[data-theme="dark"] .ls-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

/* --- Section Headings --- */
.ls-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ls-section-title-icon {
  font-size: 16px;
  opacity: 0.8;
}

/* --- Dashboard: Stats --- */
.ls-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.ls-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.15s;
}
.ls-stat:hover {
  box-shadow: var(--shadow-hover);
}
.ls-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e40af;
  line-height: 1.1;
}
[data-theme="dark"] .ls-stat-value {
  color: #60a5fa;
}
.ls-stat-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
  font-weight: 500;
}

/* --- Dashboard: Quick Actions --- */
.ls-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.ls-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 16px;
}
.ls-action:hover {
  box-shadow: var(--shadow-hover);
  border-color: #1e40af;
}
.ls-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ls-action-icon.blue { background: rgba(30,64,175,0.1); }
.ls-action-icon.green { background: rgba(22,163,74,0.1); }
.ls-action-icon.purple { background: rgba(124,58,237,0.1); }
.ls-action-icon.amber { background: rgba(217,119,6,0.1); }
.ls-action-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 3px;
}
.ls-action-body p {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
}

/* --- Dashboard: Recent Activity --- */
.ls-recent-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ls-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.ls-recent-item:last-child { border-bottom: none; }
.ls-recent-item:hover { background: var(--accent-soft); }
.ls-recent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ls-recent-dot.draft { background: #9ca3af; }
.ls-recent-dot.ai { background: #3b82f6; }
.ls-recent-dot.review { background: #f59e0b; }
.ls-recent-dot.check { background: #8b5cf6; }
.ls-recent-dot.finalized { background: #22c55e; }
.ls-recent-dot.published { background: #059669; }
.ls-recent-dot.archived { background: #6b7280; }
.ls-recent-info { flex: 1; min-width: 0; }
.ls-recent-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-recent-meta {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}
.ls-recent-score {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ls-recent-score.high { background: rgba(22,163,74,0.12); color: #16a34a; }
.ls-recent-score.mid { background: rgba(245,158,11,0.12); color: #d97706; }
.ls-recent-score.low { background: rgba(239,68,68,0.12); color: #ef4444; }

/* --- Empty State --- */
.ls-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}
.ls-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.ls-empty-msg {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.ls-empty-sub {
  font-size: 13px;
}

/* --- Banks: Split View --- */
.ls-banks-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  min-height: 500px;
}
.ls-bank-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ls-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ls-panel-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.ls-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* --- Banks: Search --- */
.ls-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.ls-search:focus {
  border-color: #1e40af;
}
.ls-search-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

/* --- Banks: Bank Item --- */
.ls-bank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  margin-bottom: 2px;
}
.ls-bank-item:hover { background: var(--accent-soft); }
.ls-bank-item.selected {
  background: rgba(30,64,175,0.1);
  border: 1px solid rgba(30,64,175,0.25);
}
[data-theme="dark"] .ls-bank-item.selected {
  background: rgba(96,165,250,0.12);
  border-color: rgba(96,165,250,0.25);
}
.ls-bank-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(30,64,175,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ls-bank-info { flex: 1; min-width: 0; }
.ls-bank-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.ls-bank-meta {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 1px;
}
.ls-bank-count {
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* --- Banks: Branch Table --- */
.ls-branch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ls-branch-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.ls-branch-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ls-branch-table tr:hover td {
  background: var(--accent-soft);
}
.ls-branch-table tr:last-child td { border-bottom: none; }
.ls-branch-phone {
  font-family: 'Noto Sans JP', monospace;
  font-size: 13px;
  letter-spacing: 0.3px;
}

/* --- Hearing: Session List --- */
.ls-hearing-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ls-hearing-filters {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
}
.ls-filter-btn {
  padding: 6px 14px;
  font-size: 13px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-sub);
  font-weight: 500;
  transition: all 0.15s;
}
.ls-filter-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.ls-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.ls-session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ls-session-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #1e40af;
}
.ls-session-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.ls-session-bank {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.ls-session-branch {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
}
.ls-session-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.ls-session-date {
  font-size: 12px;
  color: var(--text-sub);
}

/* --- Hearing: Wizard --- */
.ls-wizard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ls-wizard-steps {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}
.ls-wizard-step-indicator {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ls-wizard-step-indicator.active {
  color: #1e40af;
  font-weight: 600;
}
.ls-wizard-step-indicator.done {
  color: #16a34a;
}
.ls-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.ls-wizard-step-indicator.active .ls-step-num {
  border-color: #1e40af;
  background: #1e40af;
  color: white;
}
.ls-wizard-step-indicator.done .ls-step-num {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
}
.ls-wizard-body {
  padding: 28px 32px;
}
.ls-wizard-footer {
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* --- Reports: List --- */
.ls-report-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ls-report-grid {
  display: grid;
  gap: 12px;
}
.ls-report-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 140px 120px 100px;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ls-report-row:hover {
  box-shadow: var(--shadow-hover);
  border-color: #1e40af;
}
.ls-report-bank {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.ls-report-branch-name {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
}
.ls-report-date-col {
  font-size: 13px;
  color: var(--text-sub);
}

/* --- Reports: Detail/Editor --- */
.ls-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.ls-detail-back:hover { color: var(--text); }
.ls-detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.ls-detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.ls-detail-meta {
  font-size: 13px;
  color: var(--text-sub);
}
.ls-detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ls-detail-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

/* --- Reports: Quality Score Panel --- */
.ls-quality-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 80px;
}
.ls-quality-total {
  text-align: center;
  margin-bottom: 20px;
}
.ls-score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  position: relative;
}
.ls-score-circle svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ls-score-circle circle {
  fill: none;
  stroke-width: 6;
  cx: 50;
  cy: 50;
  r: 44;
}
.ls-score-circle .ls-score-bg {
  stroke: var(--border);
}
.ls-score-circle .ls-score-fg {
  stroke-dasharray: 276.46;
  transition: stroke-dashoffset 0.6s ease;
}
.ls-score-num {
  font-size: 28px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.ls-score-num.high { color: #16a34a; }
.ls-score-num.mid { color: #d97706; }
.ls-score-num.low { color: #ef4444; }
.ls-score-label {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}
.ls-quality-breakdown {
  display: grid;
  gap: 12px;
}
.ls-quality-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ls-quality-name {
  font-size: 12px;
  color: var(--text-sub);
  width: 60px;
  flex-shrink: 0;
}
.ls-quality-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.ls-quality-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ls-quality-fill.high { background: #16a34a; }
.ls-quality-fill.mid { background: #f59e0b; }
.ls-quality-fill.low { background: #ef4444; }
.ls-quality-pct {
  font-size: 12px;
  font-weight: 600;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}
.ls-threshold-line {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
}
.ls-threshold-line strong {
  color: var(--text);
}

/* --- Reports: Field Editor --- */
.ls-fields-editor {
  display: grid;
  gap: 16px;
}
.ls-field-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ls-field-group-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.ls-field-group-header:hover { background: var(--accent-soft); }
.ls-field-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ls-field-group-arrow {
  font-size: 12px;
  color: var(--text-sub);
  transition: transform 0.2s;
}
.ls-field-group.collapsed .ls-field-group-arrow { transform: rotate(-90deg); }
.ls-field-group.collapsed .ls-field-group-body { display: none; }
.ls-field-group-body {
  padding: 4px 0;
}
.ls-field-row {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: start;
  gap: 12px;
}
.ls-field-row:last-child { border-bottom: none; }
.ls-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ls-field-required {
  color: #ef4444;
  font-size: 11px;
}
.ls-field-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ls-field-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.ls-field-input:focus {
  border-color: #1e40af;
}
textarea.ls-field-input {
  min-height: 60px;
}
select.ls-field-input {
  cursor: pointer;
}
.ls-field-ai-hint {
  font-size: 11px;
  color: #3b82f6;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ls-field-tags {
  display: flex;
  gap: 4px;
  padding-top: 8px;
}

/* --- Tier Badges --- */
.ls-tier {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ls-tier.lite { background: rgba(107,114,128,0.12); color: #6b7280; }
.ls-tier.standard { background: rgba(37,99,235,0.12); color: #2563eb; }
.ls-tier.premium { background: rgba(124,58,237,0.12); color: #7c3aed; }
[data-theme="dark"] .ls-tier.lite { background: rgba(156,163,175,0.15); color: #9ca3af; }
[data-theme="dark"] .ls-tier.standard { background: rgba(96,165,250,0.15); color: #60a5fa; }
[data-theme="dark"] .ls-tier.premium { background: rgba(167,139,250,0.15); color: #a78bfa; }

/* --- Status Badges --- */
.ls-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.ls-status.draft { background: rgba(156,163,175,0.12); color: #6b7280; }
.ls-status.ai { background: rgba(59,130,246,0.12); color: #3b82f6; }
.ls-status.review { background: rgba(245,158,11,0.12); color: #d97706; }
.ls-status.check { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.ls-status.finalized { background: rgba(34,197,94,0.12); color: #16a34a; }
.ls-status.published { background: rgba(5,150,105,0.12); color: #059669; }
.ls-status.archived { background: rgba(107,114,128,0.12); color: #6b7280; }

/* --- Bank Type Badges --- */
.ls-type-badge {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.ls-type-badge.mega { background: rgba(220,38,38,0.1); color: #dc2626; }
.ls-type-badge.regional { background: rgba(37,99,235,0.1); color: #2563eb; }
.ls-type-badge.regional2 { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.ls-type-badge.shinkin { background: rgba(22,163,74,0.1); color: #16a34a; }
.ls-type-badge.shinkumi { background: rgba(5,150,105,0.1); color: #059669; }
.ls-type-badge.net { background: rgba(124,58,237,0.1); color: #7c3aed; }
.ls-type-badge.other { background: rgba(107,114,128,0.1); color: #6b7280; }

/* --- Fields Admin Table --- */
.ls-fields-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ls-fields-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.ls-fields-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.ls-fields-table tbody tr:hover td { background: var(--accent-soft); }
.ls-fields-table tbody tr:last-child td { border-bottom: none; }
.ls-field-category-row td {
  background: var(--bg) !important;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-sub);
  padding: 8px 14px;
  letter-spacing: 0.3px;
}

/* --- Buttons --- */
.ls-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.ls-btn:hover { opacity: 0.88; }
.ls-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ls-btn.primary {
  background: #1e40af;
  color: white;
}
.ls-btn.success {
  background: #16a34a;
  color: white;
}
.ls-btn.danger {
  background: #dc2626;
  color: white;
}
.ls-btn.secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.ls-btn.ghost {
  background: none;
  color: var(--text-sub);
}
.ls-btn.sm {
  padding: 5px 12px;
  font-size: 12px;
}
.ls-btn.lg {
  padding: 12px 28px;
  font-size: 15px;
}

/* --- Modal --- */
.ls-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}
.ls-modal-overlay.active { display: flex; }
.ls-modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.ls-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.ls-modal-head h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.ls-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--text-sub);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ls-modal-close:hover { background: var(--border); }
.ls-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.ls-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Form Fields --- */
.ls-form-group {
  margin-bottom: 16px;
}
.ls-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.ls-form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ls-form-input:focus { border-color: #1e40af; }
textarea.ls-form-input { min-height: 80px; resize: vertical; }
select.ls-form-input { cursor: pointer; }
.ls-form-hint {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* --- Toast --- */
.ls-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.ls-toast-item {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: auto;
  animation: ls-toast-in 0.3s ease;
  max-width: 360px;
}
.ls-toast-item.success { background: #16a34a; }
.ls-toast-item.error { background: #dc2626; }
.ls-toast-item.info { background: #1e40af; }
@keyframes ls-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Confirm Dialog --- */
.ls-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 700;
}
.ls-confirm-box {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.ls-confirm-msg {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}
.ls-confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* --- Multi-select tags --- */
.ls-tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  min-height: 38px;
  align-items: center;
  cursor: text;
}
.ls-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(30,64,175,0.1);
  color: #1e40af;
}
.ls-tag-remove {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
}
.ls-tag-remove:hover { opacity: 1; }

/* --- Call List Table --- */
.ls-cl-count {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
  font-weight: 500;
}
.ls-cl-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}
.ls-cl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 900px;
}
.ls-cl-table thead th {
  text-align: left;
  padding: 11px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.ls-cl-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.ls-cl-row { transition: background 0.1s; }
.ls-cl-row:hover td { background: var(--accent-soft); }
.ls-cl-row.ls-cl-ticket td {
  background: rgba(245, 158, 11, 0.06);
}
.ls-cl-row.ls-cl-ticket:hover td {
  background: rgba(245, 158, 11, 0.12);
}
.ls-cl-ticket-badge {
  font-size: 12px;
  vertical-align: middle;
}
.ls-cl-bank {
  font-weight: 500;
}
.ls-cl-expand-cell {
  width: 28px;
  text-align: center;
}
.ls-cl-expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-sub);
  padding: 4px;
  border-radius: 4px;
  transition: background 0.1s;
}
.ls-cl-expand-btn:hover { background: var(--border); }

/* Call List: Column Filter */
.ls-col-filterable { position: relative; }
.ls-col-filter-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 9px;
  color: var(--text-sub);
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 2px;
  transition: background 0.15s, color 0.15s;
  vertical-align: middle;
}
.ls-col-filter-btn:hover {
  background: var(--border);
  color: var(--text);
}
.ls-col-filter-btn.active {
  color: var(--accent);
}
.ls-col-filter-btn.filtered {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ls-col-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 200px;
  max-width: 280px;
  padding: 6px 0;
  font-size: 13px;
  animation: ls-dd-in 0.12s ease-out;
}
@keyframes ls-dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.ls-col-dd-sort { padding: 4px 6px; }
.ls-col-dd-sort-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.1s;
}
.ls-col-dd-sort-btn:hover { background: var(--accent-soft); }
.ls-col-dd-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.ls-col-dd-action {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  transition: background 0.1s, color 0.1s;
}
.ls-col-dd-action:hover { background: var(--accent-soft); color: var(--accent); }
.ls-col-dd-filters {
  padding: 4px 6px;
  max-height: 240px;
  overflow-y: auto;
}
.ls-col-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.1s;
}
.ls-col-dd-item:hover { background: var(--accent-soft); }
.ls-col-dd-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Call List: Inline Edit */
.ls-cl-inline {
  width: 100%;
  max-width: 140px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ls-cl-inline:hover {
  border-color: var(--border);
  background: var(--bg);
}
.ls-cl-inline:focus {
  border-color: #1e40af;
  background: var(--bg);
}
.ls-cl-inline::placeholder {
  color: var(--text-sub);
  opacity: 0.5;
  font-style: italic;
}

/* Call List: Expanded Detail Row */
.ls-cl-detail-row td {
  padding: 0 !important;
  background: var(--bg) !important;
  border-bottom: 2px solid var(--border) !important;
}
.ls-cl-detail {
  padding: 16px 20px 16px 48px;
}
.ls-cl-detail-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
}
.ls-cl-detail-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ls-cl-notes-input {
  font-size: 13px !important;
  min-height: 60px !important;
}

/* Call List: History */
.ls-cl-history {
  display: grid;
  gap: 8px;
}
.ls-cl-history-item {
  display: grid;
  grid-template-columns: 90px 80px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.ls-cl-history-date {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
}
.ls-cl-history-who {
  font-weight: 500;
  color: var(--text);
}
.ls-cl-history-notes {
  color: var(--text-sub);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .ls-stats { grid-template-columns: repeat(2, 1fr); }
  .ls-banks-layout { grid-template-columns: 1fr; }
  .ls-detail-body { grid-template-columns: 1fr; }
  .ls-report-row { grid-template-columns: 1fr 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .ls-wrap { padding: 16px 14px 32px; }
  .ls-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ls-stat { padding: 14px; }
  .ls-stat-value { font-size: 24px; }
  .ls-actions { grid-template-columns: 1fr; }
  .ls-session-grid { grid-template-columns: 1fr; }
  .ls-report-row { grid-template-columns: 1fr; }
  .ls-tabs { gap: 0; }
  .ls-tab { padding: 8px 12px; font-size: 12px; }
  .ls-field-row { grid-template-columns: 1fr; }
  .ls-wizard-body { padding: 20px 16px; }
  .ls-wizard-footer { padding: 12px 16px; }
  .ls-detail-header { flex-direction: column; }
}

/* ===== Member Preview ===== */
.lsp-container { max-width: 520px; margin: 16px auto; }
.lsp-tier-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.lsp-tier-tab { flex: 1; padding: 10px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 500; cursor: pointer; transition: all .2s; color: var(--text-sub); }
.lsp-tier-tab.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.lsp-tier-tab:hover:not(.active) { background: #f0f4ff; }

.lsp-phone-frame { background: #111; border-radius: 32px; padding: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.lsp-phone-notch { width: 120px; height: 5px; background: #333; border-radius: 3px; margin: 0 auto 8px; }
.lsp-phone-body { background: #fff; border-radius: 22px; overflow-y: auto; max-height: 70vh; padding: 0; }

.lsp-report { padding: 24px 20px; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif; color: #1a1a1a; }
.lsp-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #1e40af; }
.lsp-logo { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #1e40af, #3b82f6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.lsp-header-info { flex: 1; }
.lsp-bank-name { font-size: 18px; font-weight: 700; color: #1a1a1a; }
.lsp-date { font-size: 12px; color: #6b7280; margin-top: 2px; }
.lsp-freshness { font-size: 12px; color: #6b7280; white-space: nowrap; }

.lsp-summary { background: #f0f4ff; border-left: 4px solid #1e40af; padding: 14px 16px; border-radius: 0 8px 8px 0; margin-bottom: 16px; font-size: 14px; line-height: 1.7; color: #1e3a5f; }
.lsp-staff-comment { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 14px 16px; border-radius: 0 8px 8px 0; margin-bottom: 24px; }
.lsp-staff-comment-label { font-size: 11px; font-weight: 600; color: #92400e; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.lsp-staff-comment-body { font-size: 14px; line-height: 1.7; color: #78350f; white-space: pre-wrap; }

.lsp-section { margin-bottom: 24px; }
.lsp-section-title { font-size: 15px; font-weight: 700; color: #1e40af; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; margin-bottom: 12px; }

.lsp-field { margin-bottom: 14px; }
.lsp-field-label { font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 3px; }
.lsp-field-value { font-size: 14px; line-height: 1.7; color: #1a1a1a; }

.lsp-locked { display: flex; align-items: center; gap: 10px; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 8px; padding: 14px 16px; margin-top: 8px; }
.lsp-locked-icon { font-size: 20px; }
.lsp-locked-text { font-size: 13px; color: #9ca3af; }

/* Logo image */
.lsp-logo-img { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid #e5e7eb; flex-shrink: 0; }

/* Toolbar */
.lsp-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.lsp-device-tabs { display: flex; gap: 4px; }
.lsp-device-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.lsp-device-btn.active { background: #1e40af; border-color: #1e40af; filter: grayscale(1) brightness(10); }
.lsp-device-btn:hover:not(.active) { background: #f0f4ff; }

/* PC mode */
.lsp-container.lsp-pc { max-width: 900px; }
.lsp-pc-frame { background: #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.lsp-pc-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f3f4f6; border-bottom: 1px solid #d1d5db; }
.lsp-pc-dot { width: 10px; height: 10px; border-radius: 50%; }
.lsp-pc-dot.red { background: #ef4444; }
.lsp-pc-dot.yellow { background: #f59e0b; }
.lsp-pc-dot.green { background: #22c55e; }
.lsp-pc-url { margin-left: 12px; font-size: 12px; color: #6b7280; background: #fff; padding: 4px 12px; border-radius: 6px; border: 1px solid #d1d5db; flex: 1; max-width: 400px; }
.lsp-pc-body { background: #fff; max-height: 75vh; overflow-y: auto; }
.lsp-pc-body .lsp-report { padding: 32px 48px; max-width: 800px; margin: 0 auto; }
.lsp-pc-body .lsp-header { gap: 20px; }
.lsp-pc-body .lsp-logo { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
.lsp-pc-body .lsp-logo-img { width: 64px; height: 64px; border-radius: 16px; }
.lsp-pc-body .lsp-bank-name { font-size: 22px; }
.lsp-pc-body .lsp-summary { font-size: 15px; }
.lsp-pc-body .lsp-section-title { font-size: 17px; }
.lsp-pc-body .lsp-field-value { font-size: 15px; }
.lsp-pc-body .lsp-field { display: grid; grid-template-columns: 160px 1fr; gap: 8px; align-items: start; }
.lsp-pc-body .lsp-field-label { font-size: 13px; padding-top: 2px; }

/* Hot badge */
.lsp-hot-badge { background: linear-gradient(90deg, #fef3c7, #fde68a); border: 1px solid #f59e0b; border-radius: 8px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: #92400e; margin-bottom: 16px; text-align: center; }

/* Highlight cards */
.lsp-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.lsp-hl-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 8px; text-align: center; }
.lsp-hl-icon { font-size: 18px; margin-bottom: 4px; }
.lsp-hl-value { font-size: 16px; font-weight: 700; color: #1e40af; line-height: 1.2; }
.lsp-hl-label { font-size: 11px; color: #6b7280; margin-top: 2px; }

/* Appetite meter */
.lsp-appetite { display: flex; align-items: center; gap: 10px; background: #f0f4ff; border-radius: 10px; padding: 12px 16px; margin: 12px 0 20px; flex-wrap: wrap; }
.lsp-appetite-label { font-size: 13px; font-weight: 600; color: #1e40af; white-space: nowrap; }
.lsp-appetite-dots { display: flex; gap: 4px; }
.lsp-dot { width: 14px; height: 14px; border-radius: 50%; background: #e2e8f0; }
.lsp-dot.active { background: #1e40af; }
.lsp-appetite-text { font-size: 12px; color: #6b7280; }

/* Collapsible sections */
.lsp-collapse-toggle { cursor: pointer; user-select: none; }
.lsp-collapse-arrow { float: right; font-size: 10px; transition: transform .2s; color: #9ca3af; }
.lsp-collapsible.collapsed .lsp-section-body { display: none; }
.lsp-collapsible.collapsed .lsp-collapse-arrow { transform: rotate(-90deg); }

/* Phone responsive highlights */
.lsp-phone-body .lsp-highlights { grid-template-columns: repeat(2, 1fr); }
.lsp-phone-body .lsp-hl-value { font-size: 14px; }
