* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: #f5f7fb;
  color: #1e293b;
}

.hidden { display: none !important; }

.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 9999;
  animation: splashFadeOut 0.4s ease 1.5s forwards;
}

.splash-logo {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  animation: splashPulse 1.2s ease-in-out infinite;
}

.splash-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

@keyframes splashPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.03); }
}

@keyframes splashFadeOut {
  to { opacity: 0; pointer-events: none; }
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 20px;
}

.landing-container {
  width: 100%;
  max-width: 480px;
}

.landing-hero {
  text-align: center;
  color: #1e293b;
  margin-bottom: 16px;
}

.landing-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.landing-logo-img {
  max-width: 280px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.header-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-icon {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.app-title {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.app-title-accent {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}
.landing-hero .app-title {
  font-size: 1.7rem;
  margin: 0;
  color: white;
}
.landing-hero .app-title-accent {
  background: linear-gradient(135deg, #93c5fd, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .app-title {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: #1e293b;
}

.landing-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin: 4px 0 16px 0;
}

.landing-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.landing-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
}

.landing-feature-icon {
  font-size: 1.2rem;
}

.landing-auth-area {
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 16px 18px;
}

.app-features-toggle {
  text-align: center;
  margin-top: 16px;
}

.app-features-toggle a {
  color: #94a3b8;
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.app-features-toggle a:hover {
  color: #475569;
}

.app-features-panel {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: featuresFadeIn 0.3s ease;
}

@keyframes featuresFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-features-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.app-features-card h4 {
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.app-features-card p {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
}

.landing-footer {
  position: fixed;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.72rem;
  pointer-events: none;
}

.auth-divider {
  display: none;
  text-align: center;
  margin: 16px 0;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  background: white;
  padding: 0 12px;
  position: relative;
  color: #94a3b8;
  font-size: 0.85rem;
}

.social-login-area {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.social-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: opacity 0.2s;
}

.social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.kakao-btn {
  background: #FEE500;
  color: #191919;
}

.naver-btn {
  background: #03C75A;
  color: white;
}

.social-icon {
  font-size: 1.1rem;
  font-weight: 900;
}

.biz-number-row {
  display: flex;
  gap: 8px;
}

.biz-number-row input {
  flex: 1;
}

.verify-btn {
  padding: 10px 16px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.verify-btn:hover {
  background: #047857;
}

.biz-verify-status {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.biz-verify-status.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.biz-verify-status.fail {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-form h2 {
  font-size: 1.1rem;
  color: #1e293b;
  margin: 0 0 14px 0;
  text-align: center;
}

.auth-form .form-group {
  margin-bottom: 12px;
}

.auth-form .form-group-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-form .form-group-inline label {
  display: block;
  width: 52px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0;
}

.auth-form .form-group-inline input {
  flex: 1;
  min-width: 0;
}

.auth-form .form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.auth-form .form-group input,
.auth-form .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.auth-btn-row .auth-btn {
  flex: 1;
  width: auto;
}

.auth-btn-outline {
  background: #475569 !important;
  color: #ffffff;
  border: none;
  font-weight: 700;
}

.auth-btn-outline:hover {
  background: #334155 !important;
}

.register-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.register-close-btn:hover {
  color: #475569;
  background: #f1f5f9;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
  border-color: #2d5a87;
}

.terms-agreement {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.terms-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.terms-check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}
.terms-checkmark { display: none; }
.terms-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}
.terms-notice {
  margin: 4px 0 0 0;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #94a3b8;
}
.terms-detail-toggle {
  margin-top: 8px;
  text-align: center;
}
.terms-detail-toggle a {
  font-size: 0.76rem;
  color: #64748b;
  text-decoration: none;
}
.terms-detail-toggle a:hover {
  color: #2563eb;
}
.terms-detail-box {
  margin-top: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.terms-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  margin: 10px 0 2px 0;
}
.terms-section-title:first-child {
  margin-top: 0;
}

.auth-btn {
  width: 100%;
  padding: 8px 12px;
  background: #64748b;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.auth-btn:hover {
  background: #475569;
}

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.auth-switch a {
  color: #2d5a87;
  font-weight: 600;
  text-decoration: none;
}

.hero-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  font-size: 0.85rem;
  color: #64748b;
  white-space: nowrap;
}

.logout-btn {
  padding: 6px 14px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #dc2626;
}

.guide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.guide-btn:hover {
  background: #1d4ed8;
}

.mypage-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: transparent;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.mypage-btn:hover {
  background: #f1f5f9;
  border-color: #2563eb;
  color: #2563eb;
}
.mypage-btn svg {
  flex-shrink: 0;
}

.mypage-panel {
  background: white;
  border-radius: 16px;
  width: 92%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.mypage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.mypage-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.mypage-body {
  padding: 20px;
}
.mypage-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border-radius: 12px;
  margin-bottom: 20px;
}
.mypage-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #bfdbfe;
}
.mypage-info {
  min-width: 0;
}
.mypage-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}
.mypage-username {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}
.mypage-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}
.mypage-section {
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.mypage-section h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.mypage-form-group {
  margin-bottom: 12px;
}
.mypage-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}
.mypage-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.mypage-form-group input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.mypage-save-btn {
  width: 100%;
  padding: 11px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.mypage-save-btn:hover {
  background: #1d4ed8;
}
.mypage-pw-btn {
  background: #475569;
}
.mypage-pw-btn:hover {
  background: #334155;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.hero, .panel {
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  color: #475569;
}

.hero-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: #0f172a;
  color: white;
  font-weight: 700;
}

.tabs, .subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab, .subtab {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.tab.active, .subtab.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.tab-content, .subtab-content {
  display: none;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}

.tab-content.active, .subtab-content.active { display: block; }

form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

input[type="file"] {
  flex: 1;
  min-width: 240px;
}

button {
  border: none;
  background: #2563eb;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: #64748b;
}

button.active-view {
  background: #0f172a;
}

.result-toolbar, .history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.toolbar-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 6;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.card.full { grid-column: 1 / -1; }

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
}

.kv div.key {
  color: #475569;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.policy-item, .note-item, .history-item {
  padding: 12px;
  border-radius: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.score {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 13px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  text-align: center;
  color: #64748b;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-meta {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

.history-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 12px;
  overflow: auto;
  min-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.loading {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.error {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  white-space: pre-wrap;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.upload-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}
.upload-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 10px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  min-height: 80px;
}
.upload-action-btn:active {
  transform: scale(0.97);
}
.upload-action-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 4px;
}
.upload-action-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.upload-action-desc {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
.native-camera-btn {
  border-color: #22c55e;
  background: #f0fdf4;
  grid-column: 1 / -1;
}
.native-camera-btn:hover {
  background: #dcfce7;
  border-color: #16a34a;
}
.native-camera-btn .upload-action-label {
  color: #166534;
}
.quick-camera-btn {
  border-color: #0f172a;
  background: #f1f5f9;
}
.quick-camera-btn:hover {
  background: #e2e8f0;
}
.gallery-action-btn {
  border-color: #475569;
  background: #f1f5f9;
}
.gallery-action-btn:hover {
  background: #e2e8f0;
}
.upload-quality-notice {
  padding: 8px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 11px;
  color: #1e40af;
  line-height: 1.5;
  margin-bottom: 8px;
}

.camera-btn, .gallery-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  color: white;
}

.camera-btn {
  background: #0f172a;
}

.gallery-btn {
  background: #475569;
}

.file-preview {
  width: 100%;
  min-height: 0;
}

.file-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-top: 10px;
}

.file-preview .file-name {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.feedback-grid label,
textarea {
  display: block;
  width: 100%;
}

.feedback-grid input,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  background: white;
}

#feedbackForm {
  display: block;
}

.crm-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.crm-search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: #f8fafc;
  transition: border-color 0.2s;
}

.crm-search-bar input:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
}

.crm-search-bar button {
  padding: 12px 20px;
  border-radius: 12px;
  white-space: nowrap;
}

.crm-stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 12px;
}

.crm-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #475569;
}

.crm-stat-value {
  font-weight: 800;
  color: #0f172a;
  font-size: 16px;
}

.crm-company-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.crm-company-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.1);
}

.crm-company-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.crm-company-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.crm-contact-badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.crm-company-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}

.crm-back-btn {
  background: none;
  color: #2563eb;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 0;
  margin-bottom: 16px;
}

.crm-detail-header {
  background: #0f172a;
  color: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.crm-detail-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.crm-detail-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: #22c55e;
  color: white;
  font-size: 13px;
  font-weight: 700;
  margin-left: 12px;
}

.crm-detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.crm-detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crm-detail-info-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.crm-detail-info-value {
  font-size: 15px;
  color: white;
  font-weight: 600;
}

.crm-contacts-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.crm-contacts-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-contacts-count {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.crm-contact-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  gap: 12px;
  transition: background 0.15s;
}

.crm-contact-row:hover {
  background: #f8fafc;
}

.crm-contact-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.crm-contact-rank.primary {
  background: #2563eb;
}

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

.crm-contact-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-contact-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.crm-contact-position {
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.crm-contact-position.primary-pos {
  background: #dbeafe;
  color: #1d4ed8;
}

.crm-contact-details {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
}

.crm-contact-detail-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.crm-actions-section {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-btn-danger {
  background: #ef4444;
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .card {
    grid-column: 1 / -1;
  }
  .hero, .result-toolbar, .history-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .feedback-grid {
    grid-template-columns: 1fr;
  }
  .crm-detail-info {
    grid-template-columns: 1fr;
  }
  .crm-contact-details {
    flex-direction: column;
    gap: 4px;
  }
}

.bulk-toggle-btn {
  padding: 8px 14px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.bulk-toggle-btn:hover {
  background: #047857;
}

.bulk-upload-panel {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.bulk-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bulk-upload-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #166534;
}

.bulk-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.bulk-desc {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 12px 0;
}

.bulk-actions {
  margin-bottom: 14px;
}

.bulk-template-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.bulk-template-btn:hover {
  background: #1d4ed8;
}

.bulk-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.bulk-submit-btn:hover {
  opacity: 0.9;
}

.bulk-result {
  margin-top: 16px;
}

.bulk-summary h4 {
  margin: 0 0 12px 0;
  color: #166534;
}

.bulk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.bulk-stat {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.bulk-stat.success {
  background: #dcfce7;
  border-color: #86efac;
}

.bulk-stat.warn {
  background: #fef3c7;
  border-color: #fde68a;
}

.bulk-stat-label {
  font-size: 0.75rem;
  color: #64748b;
}

.bulk-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.bulk-mapping {
  font-size: 0.82rem;
  color: #475569;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.bulk-errors {
  background: #fef2f2;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #dc2626;
  margin-bottom: 10px;
}

.bulk-errors ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.bulk-details table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.bulk-details th {
  background: #1e3a5f;
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
}

.bulk-details td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.bulk-details tr:hover td {
  background: #f8fafc;
}

.pd-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pd-subtab {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.pd-subtab.active {
  background: #1e3a5f;
  color: white;
  border-color: #1e3a5f;
}

.pd-subtab-content {
  display: none;
}

.pd-subtab-content.active {
  display: block;
}

.pd-search-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.pd-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.pd-input-group input {
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
}

.pd-input-group input:focus {
  outline: none;
  border-color: #2563eb;
}

.pd-search-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-policy-search {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.pd-policy-search input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
}

.pd-policy-search input:focus {
  outline: none;
  border-color: #1e3a5f;
}

.pd-result {
  margin-top: 16px;
}

.pd-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.pd-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
}

.pd-section-source {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
  margin-left: auto;
}

.pd-kv-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 12px;
  font-size: 14px;
}

.pd-kv-label {
  color: #64748b;
  font-weight: 600;
}

.pd-kv-value {
  color: #1e293b;
  word-break: break-all;
  overflow-wrap: break-word;
  min-width: 0;
}

.pd-status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.pd-status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.pd-status-badge.inactive {
  background: #fef2f2;
  color: #dc2626;
}

.pd-finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.pd-finance-table th {
  background: #f1f5f9;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.pd-finance-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.pd-finance-table tr:hover td {
  background: #f8fafc;
}

.pd-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pd-policy-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.pd-policy-card:hover {
  border-color: #1e3a5f;
}

.pd-policy-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.pd-policy-ministry {
  font-size: 13px;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 8px;
}

.pd-policy-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.pd-policy-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}

.pd-policy-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.pd-policy-link:hover {
  text-decoration: underline;
}

.pd-crm-lookup-btn {
  padding: 8px 16px;
  background: #1e3a5f;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

.pd-crm-lookup-btn:hover {
  background: #2d5a87;
}

@media (max-width: 900px) {
  .pd-search-form {
    grid-template-columns: 1fr;
  }
  .pd-kv-grid {
    grid-template-columns: 90px 1fr;
    gap: 4px 8px;
    font-size: 13px;
  }
  .pd-kv-label {
    font-size: 12px;
  }
  .pd-section {
    padding: 12px;
  }
}

.report-card {
  border-left: 4px solid #1e3a5f;
}

.report-section {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.report-section:last-child {
  border-bottom: none;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.kv-row .key {
  color: #6b7280;
}

.grade-badge {
  display: inline-block;
  min-width: 32px;
  text-align: center;
}

.ext-api-status {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.ext-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
}

.ext-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ext-status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.ext-status-dot.inactive {
  background: #94a3b8;
}

.ext-status-features {
  color: #6b7280;
  font-size: 12px;
  margin-left: auto;
}

.mock-badge {
  background: #fef3c7 !important;
  color: #92400e !important;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.pd-result-header {
  font-size: 18px;
  font-weight: bold;
  color: #1e3a5f;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1e3a5f;
}

.pd-result-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

.notification-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  position: relative;
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin: 0 12px 12px;
  max-height: 70vh;
  overflow-y: auto;
}
.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-radius: 12px 12px 0 0;
}
.notif-panel-header h3 {
  margin: 0;
  font-size: 16px;
  color: #1e3a5f;
}
.notif-panel-header div {
  display: flex;
  gap: 6px;
}
.notif-panel-header button {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.notif-list {
  padding: 8px;
}
.notif-item {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
}
.notif-unread {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.notif-read {
  background: #f9fafb;
  opacity: 0.7;
}
.notif-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.notif-same {
  background: #dbeafe;
  color: #1e40af;
}
.notif-diff {
  background: #fef3c7;
  color: #92400e;
}
.notif-message {
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
  margin-bottom: 8px;
}
.notif-message strong {
  color: #1e3a5f;
}
.notif-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.notif-request-text {
  font-size: 12px;
  color: #6b7280;
}
.notif-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #9ca3af;
}
.notif-read-btn {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  color: #6b7280;
}

.crm-requests-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}
.crm-requests-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.crm-request-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.request-type-select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}
.crm-request-form textarea {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  resize: vertical;
}
.crm-request-form input[type="text"] {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
}
.crm-request-form button {
  padding: 10px;
  background: #1e3a5f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.crm-request-form button:active {
  background: #16304d;
}
.crm-request-list {
  margin-top: 8px;
}
.crm-request-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  position: relative;
}
.crm-request-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.crm-request-date {
  font-size: 11px;
  color: #9ca3af;
}
.crm-request-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}
.crm-request-keywords {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.crm-request-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
}
.chip-need {
  background: #dbeafe !important;
  color: #1e40af !important;
}
.chip-supply {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.phone-link {
  color: #1e3a5f;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.phone-link::before {
  content: "📞";
  font-size: 13px;
}
.phone-link:active {
  color: #2563eb;
}

.misc-doc-type-select {
  margin-bottom: 12px;
}
.misc-doc-type-select label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}
.misc-doc-type-select select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.proposal-generate-form {
  background: #f0f4f8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.proposal-generate-form .pd-input-group {
  margin-bottom: 12px;
}
.proposal-generate-form button {
  width: 100%;
  padding: 12px;
  background: #1e3a5f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.proposal-generate-form button:active {
  background: #16304d;
}

.proposal-year-group {
  margin-bottom: 16px;
}
.proposal-year-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
}
.proposal-year-label {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.proposal-year-count {
  font-size: 12px;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
}
.proposal-year-arrow {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s;
}
.proposal-year-group.collapsed .proposal-year-arrow {
  transform: rotate(-90deg);
}
.proposal-year-group.collapsed .proposal-year-items {
  display: none;
}
.proposal-list-item {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.proposal-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.proposal-list-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.4;
}
.proposal-list-actions {
  display: flex;
  gap: 8px;
}
.proposal-list-actions button {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.proposal-list-actions button:first-child {
  background: #1e3a5f;
  color: white;
}
.proposal-list-actions button.secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.proposal-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0fe 100%);
}
.proposal-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.proposal-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.proposal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.proposal-section h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.proposal-text {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}
.proposal-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.proposal-status-item {
  background: white;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
}
.proposal-status-item strong {
  display: block;
  font-size: 13px;
  color: #1e3a5f;
  margin-bottom: 6px;
}
.proposal-status-item div {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.proposal-rating {
  font-size: 18px !important;
  font-weight: 700;
  color: #1e3a5f !important;
}
.proposal-rec-item {
  background: white;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
}
.proposal-rec-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.chip-high { background: #fef2f2 !important; color: #dc2626 !important; border-color: #fecaca !important; }
.chip-mid { background: #fffbeb !important; color: #d97706 !important; border-color: #fde68a !important; }
.chip-low { background: #f0fdf4 !important; color: #16a34a !important; border-color: #bbf7d0 !important; }

.proposal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.proposal-table th,
.proposal-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.proposal-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}
.proposal-table td {
  color: #4b5563;
}
.consulting-opinion {
  background: #eff6ff;
  border-left: 4px solid #1e3a5f;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.proposal-detail {
  margin-top: 16px;
}
.proposal-list {
  margin-top: 16px;
}

.main-actions {
  padding: 16px;
}

.category-group {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  transition: background 0.15s;
}

.category-header:hover {
  background: #eff6ff;
}

.category-header:active {
  background: #dbeafe;
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #2563eb;
  font-size: 18px;
}

.category-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}

.category-toggle {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.category-body {
  padding: 8px 12px 12px;
  transition: all 0.2s ease;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.action-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.action-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.action-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.action-label {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.action-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
}

.upload-panel {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.upload-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.upload-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.close-panel-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.close-panel-btn:hover {
  color: #1e293b;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 12px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.25s ease-out;
  margin: auto 0;
}

.modal-container-wide {
  max-width: 680px;
}

#modalCrm.modal-overlay {
  padding: 0;
}

#modalCrm .modal-container-wide {
  width: 100%;
  height: 100vh;
  max-width: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

#modalCrm .modal-body {
  flex: 1;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: #1e293b;
}

.modal-body {
  padding: 20px 24px 24px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.modal-open {
  overflow: hidden;
}

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.modal-tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: #f8fafc;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid #e2e8f0;
}

.modal-tab:last-child {
  border-right: none;
}

.modal-tab.active {
  background: #1e3a5f;
  color: white;
}

.modal-tab:hover:not(.active) {
  background: #e2e8f0;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

.tab-desc {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.direct-input-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.direct-input-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.direct-input-form .form-group.full-width {
  grid-column: 1 / -1;
}

.direct-input-form .form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.direct-input-form .form-group label .required {
  color: #ef4444;
}

.direct-input-form .form-group input,
.direct-input-form .form-group textarea {
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.direct-input-form .form-group input:focus,
.direct-input-form .form-group textarea:focus {
  border-color: #2563eb;
}

.direct-input-form .submit-btn {
  grid-column: 1 / -1;
  padding: 14px;
  background: linear-gradient(135deg, #1e3a5f, #2d5a87);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.direct-input-form .submit-btn:hover {
  opacity: 0.9;
}

@media (max-width: 480px) {
  .direct-input-form {
    grid-template-columns: 1fr;
  }
  .modal-tabs {
    flex-direction: row;
  }
  .modal-tab {
    font-size: 0.82rem;
    padding: 10px 6px;
  }
}

.bottom-notifications {
  background: white;
  border-top: 3px solid #2563eb;
}

.notif-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.notif-section-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}

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

.notif-badge-inline {
  padding: 2px 10px;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.notif-phone-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.notif-phone-link:hover {
  text-decoration: underline;
}

.hero-subtitle {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
}

.crm-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.crm-detail-tab {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.crm-detail-tab.active {
  background: #1e3a5f;
  color: white;
  border-color: #1e3a5f;
}

.crm-detail-tab-content {
  display: none;
}

.crm-detail-tab-content.active {
  display: block;
}

.da-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.da-subtab {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  white-space: nowrap;
}

.da-subtab.active {
  color: #1e3a5f;
  border-bottom-color: #1e3a5f;
  background: #f0f7ff;
}

.da-subtab:hover:not(.active) {
  color: #334155;
  background: #f1f5f9;
}

.da-subtab-content {
  display: none;
}

.da-subtab-content.active {
  display: block;
}

.proposal-inline-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
}

.proposal-inline-section h3 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #1e3a5f;
}

.result-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 6000;
  overflow-y: auto;
  padding: 20px 12px;
  animation: modalFadeIn 0.2s ease-out;
}

.result-modal-overlay .result-toolbar,
.result-modal-overlay .result-grid,
.result-modal-overlay pre {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.result-modal-overlay .result-toolbar {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 20px 24px 12px;
  margin-top: 20px;
}

.result-modal-overlay .result-grid {
  background: white;
  padding: 0 24px 24px;
  border-radius: 0 0 20px 20px;
}

.result-modal-overlay pre {
  border-radius: 0 0 20px 20px;
}

.camera-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}
.camera-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.8);
  color: white;
  z-index: 2;
}
.camera-title {
  font-size: 16px;
  font-weight: 700;
}
.camera-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.camera-viewfinder {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.camera-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-guide-frame {
  position: absolute;
  width: 85%;
  aspect-ratio: 9/5.5;
  max-height: 55%;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
}
.guide-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #22c55e;
  border-style: solid;
  border-width: 0;
}
.guide-corner.tl { top: -2px; left: -2px; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 12px; }
.guide-corner.tr { top: -2px; right: -2px; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 12px; }
.guide-corner.bl { bottom: -2px; left: -2px; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 12px; }
.guide-corner.br { bottom: -2px; right: -2px; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 12px; }
.guide-text {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 32px;
  background: rgba(0,0,0,0.85);
}
.camera-count {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  min-width: 70px;
}
.camera-shutter {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid white;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s;
}
.camera-shutter::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 50%;
  background: white;
  transition: background 0.1s;
}
.camera-shutter:active {
  transform: scale(0.92);
}
.camera-shutter:active::after {
  background: #e2e8f0;
}
.camera-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  padding: 24px;
}
.camera-preview-overlay.hidden {
  display: none;
}
.camera-preview-img {
  max-width: 90%;
  max-height: 55%;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: contain;
}
.camera-preview-buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  width: 90%;
  max-width: 360px;
}
.camera-preview-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.camera-preview-btn.continue-btn {
  background: #334155;
  color: white;
}
.camera-preview-btn.continue-btn:active {
  background: #475569;
}
.camera-preview-btn.done-btn {
  background: #22c55e;
  color: white;
}
.camera-preview-btn.done-btn:active {
  background: #16a34a;
}
.camera-flash {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  animation: cameraFlash 0.3s ease-out;
}
@keyframes cameraFlash {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}
.captured-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.captured-list:empty {
  display: none;
}
.captured-thumb {
  position: relative;
  width: 64px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
}
.captured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.captured-thumb .thumb-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: #1e3a5f;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}
.captured-thumb .thumb-remove {
  position: absolute;
  top: 1px;
  right: 1px;
  background: rgba(239,68,68,0.85);
  color: white;
  border: none;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.batch-progress {
  margin-top: 12px;
}
.batch-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}
.batch-progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  transition: width 0.3s;
}
.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #e2e8f0;
}
.batch-item.success { border-color: #bbf7d0; background: #f0fdf4; }
.batch-item.fail { border-color: #fecaca; background: #fef2f2; }
.batch-item.pending { border-color: #bfdbfe; background: #eff6ff; }
.batch-item-thumb {
  width: 48px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.batch-item-info {
  flex: 1;
  font-size: 13px;
}
.batch-item-status {
  font-size: 12px;
  font-weight: 600;
}

.progress-timer {
  width: 100%;
}
.progress-timer-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.progress-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: width 0.8s ease;
}
.progress-timer-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  font-weight: 500;
}

.crm-list-delete-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
}
.crm-list-delete-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

.company-edit-toggle-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.company-edit-toggle-btn:hover {
  background: #1d4ed8;
}
.company-edit-form {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.company-edit-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  gap: 4px;
}
.company-edit-form input,
.company-edit-form textarea {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.knowledge-intro {
  margin-bottom: 16px;
}
.knowledge-upload-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px;
}
.knowledge-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.knowledge-filter {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}
.knowledge-stats-bar {
  padding: 8px 12px;
  background: #f0f7ff;
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 12px;
}
.knowledge-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}
.knowledge-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  transition: box-shadow 0.15s;
}
.knowledge-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.knowledge-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.knowledge-category-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
  white-space: nowrap;
}
.knowledge-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-delete-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.knowledge-delete-btn:hover {
  color: #ef4444;
}
.knowledge-summary {
  font-size: 13px;
  color: #555;
  margin: 0 0 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.knowledge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #9ca3af;
}

@media (max-width: 600px) {
  .action-cards {
    grid-template-columns: 1fr 1fr;
  }
  .landing-features {
    grid-template-columns: 1fr;
  }
  .biz-number-row {
    flex-direction: column;
  }
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.pdf-download-btn:hover {
  background: linear-gradient(135deg, #16325a, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30,58,95,0.3);
}
.pdf-download-btn:active {
  transform: translateY(0);
}
.pdf-download-btn::before {
  content: "\1F4C4";
  font-size: 13px;
}

.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  position: absolute;
  top: -4px;
  right: -4px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.cached-result-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 11px;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 8px;
}

.cached-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.cached-result-banner.cached-stale {
  background: linear-gradient(135deg, #fef3c7, #fff7ed);
  border-color: #fbbf24;
  color: #92400e;
}

.cached-result-banner.cached-stale .cached-dot {
  background: #f59e0b;
}

.server-cached-summary {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

.mypage-withdraw-section {
  border-top: 1px solid #fecaca;
  margin-top: 16px;
  padding-top: 16px;
}

.mypage-withdraw-btn {
  width: 100%;
  padding: 10px;
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.mypage-withdraw-btn:active {
  background: #fef2f2;
}

.withdraw-modal-content {
  background: #fff;
  width: 90%;
  max-width: 380px;
  margin: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.withdraw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #fee2e2;
}

.withdraw-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #dc2626;
}

.withdraw-modal-body {
  padding: 24px 18px;
  text-align: center;
}

.withdraw-warning-icon {
  margin-bottom: 16px;
}

.withdraw-msg {
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 20px;
}

.withdraw-form-group {
  text-align: left;
}

.withdraw-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.withdraw-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.withdraw-form-group input:focus {
  outline: none;
  border-color: #dc2626;
}

.withdraw-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid #f1f5f9;
}

.withdraw-cancel-btn {
  flex: 1;
  padding: 10px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.withdraw-confirm-btn {
  flex: 1;
  padding: 10px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.withdraw-confirm-btn:active {
  background: #b91c1c;
}

.crop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}
.crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.9);
  color: white;
  font-size: 15px;
  font-weight: 700;
}
.crop-skip-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: #94a3b8;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.crop-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.crop-guide-frame {
  position: absolute;
  width: 85%;
  aspect-ratio: 9/5.5;
  max-height: 55%;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
  z-index: 2;
}
.crop-controls {
  padding: 16px 24px 32px;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
}
.crop-confirm-btn {
  background: #22c55e;
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}
.crop-confirm-btn:active {
  background: #16a34a;
}

.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.pwa-install-banner .pwa-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pwa-install-banner .pwa-text {
  flex: 1;
  min-width: 0;
}
.pwa-install-banner .pwa-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.pwa-install-banner .pwa-desc {
  font-size: 12px;
  opacity: 0.9;
}
.pwa-install-banner .pwa-install-btn {
  background: #fff;
  color: #6c5ce7;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.pwa-install-banner .pwa-install-btn:active {
  background: #e8e6ff;
}
.pwa-install-banner .pwa-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
  flex-shrink: 0;
}
.pwa-install-banner .pwa-close:hover {
  opacity: 1;
}

@media (display-mode: standalone) {
  .pwa-install-banner { display: none !important; }
}

@keyframes aiVoiceWaveAnim {
  from { height: 6px; }
  to { height: 18px; }
}

#aiVoiceBtn:hover {
  border-color: #2563eb !important;
}

#aiVoiceBtn:hover #aiVoiceIcon {
  stroke: #2563eb !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ent-tab-bar {
  display: flex;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ent-tab-bar::-webkit-scrollbar { display: none; }
.ent-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.ent-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}
.ent-tab-panel {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}
.ent-tab-panel.hidden { display: none; }
.ent-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
}
.ent-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .ent-form { grid-template-columns: 1fr; }
}
.ent-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ent-form-row label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.ent-form-row input,
.ent-form-row textarea,
.ent-form-row select {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color .2s;
}
.ent-form-row input:focus,
.ent-form-row textarea:focus {
  border-color: #2563eb;
  outline: none;
}
.ent-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.ent-btn-primary:hover { background: #1d4ed8; }
.ent-btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}
.ent-btn-large {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
  width: 100%;
}
.ent-msg {
  grid-column: 1/-1;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 4px;
}
.ent-msg.success { color: #166534; background: #dcfce7; }
.ent-msg.error { color: #991b1b; background: #fee2e2; }
.ent-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #f8fafc;
}
.ent-file-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
}
.ent-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.ent-file-item .ent-file-name {
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ent-file-item .ent-file-meta {
  font-size: 11px;
  color: #94a3b8;
}
.ent-health-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.ent-health-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.ent-health-card .score {
  font-size: 32px;
  font-weight: 800;
  color: #2563eb;
}
.ent-health-card .grade {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}
.ent-health-card .label {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}
.ent-axis-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ent-axis-bar .axis-name {
  width: 80px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
}
.ent-axis-bar .axis-track {
  flex: 1;
  height: 16px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.ent-axis-bar .axis-fill {
  height: 100%;
  border-radius: 8px;
  transition: width .5s ease;
}
.ent-axis-bar .axis-score {
  width: 36px;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}
.ent-solution-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.ent-solution-card .sol-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}
.ent-solution-card .sol-desc {
  font-size: 12px;
  color: #3b82f6;
}
.four-area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.four-area-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.four-area-icon {
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
}
.four-area-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 500;
}
.four-area-score {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.four-area-grade {
  font-size: 14px;
  font-weight: 600;
  margin-left: 4px;
}
.four-area-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.four-area-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.opp-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opp-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}
.opp-card.opp-recommended {
  border-color: #93c5fd;
  background: #eff6ff;
}
.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.opp-label {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}
.opp-score {
  font-size: 18px;
  font-weight: 700;
}
.opp-grade {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}
.opp-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}
.opp-factors {
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
}
.opp-factors li {
  font-size: 11px;
  color: #475569;
  padding: 2px 0;
  padding-left: 12px;
  position: relative;
}
.opp-factors li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: #94a3b8;
}
.opp-apply-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 14px;
  padding: 10px 0;
}
.ent-analysis-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
}
.ent-analysis-card .analysis-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.ent-analysis-card .analysis-summary {
  font-size: 13px;
  color: #475569;
  margin-top: 4px;
}
.ent-consultant-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}
.ent-consultant-card .cons-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.ent-consultant-card .cons-info {
  flex: 1;
  min-width: 0;
}
.ent-consultant-card .cons-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.ent-consultant-card .cons-detail {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.ent-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.ent-btn-request {
  background: #2563eb;
  color: #fff;
}
.ent-btn-request:hover { background: #1d4ed8; }
.ent-btn-accept {
  background: #16a34a;
  color: #fff;
}
.ent-btn-accept:hover { background: #15803d; }
.ent-btn-reject {
  background: #dc2626;
  color: #fff;
}
.ent-btn-reject:hover { background: #b91c1c; }
.ent-request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}
.ent-request-card .req-info {
  flex: 1;
  min-width: 0;
}
.ent-request-card .req-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}
.ent-request-card .req-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.ent-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.ent-status-pending { background: #fef3c7; color: #92400e; }
.ent-status-accepted { background: #dcfce7; color: #166534; }
.ent-status-rejected { background: #fee2e2; color: #991b1b; }
.ent-status-completed { background: #dbeafe; color: #1e40af; }
.consultant-pending-section {
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  background: #fffbeb;
}
.consultant-pending-section .section-title {
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}

.briefing-page {
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.briefing-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  table-layout: auto;
}
.briefing-page th,
.briefing-page td {
  border: 1px solid #e2e8f0;
  padding: 5px 6px;
  text-align: left;
  font-size: 11px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.briefing-page th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
}
.briefing-page .section-title {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  border-left: 4px solid #3b82f6;
  padding-left: 8px;
  margin: 16px 0 10px 0;
}
.briefing-page .report-header {
  text-align: center;
  padding: 30px 10px;
  border-bottom: 3px solid #3b82f6;
}
.briefing-page .header-title {
  font-size: 22px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 16px;
}
.briefing-page .header-info {
  font-size: 13px;
  color: #475569;
  line-height: 2;
}
.briefing-page .credit-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 900;
}
.briefing-page .status-box {
  display: inline-block;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 6px;
  text-align: center;
  margin: 3px;
  min-width: 60px;
  font-size: 10px;
}
.briefing-page .status-label {
  font-size: 9px;
  color: #64748b;
  margin-bottom: 3px;
}
.briefing-page .status-value {
  font-weight: 700;
  color: #1e293b;
  font-size: 11px;
}
.briefing-page .diag-circle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
}
.briefing-page .diag-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
}
.briefing-page .footer-line {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 16px;
}
@media (max-width: 480px) {
  .briefing-page {
    padding: 10px;
  }
  .briefing-page th,
  .briefing-page td {
    padding: 4px 3px;
    font-size: 10px;
  }
  .briefing-page .section-title {
    font-size: 13px;
  }
  .briefing-page .status-box {
    min-width: 48px;
    padding: 4px 3px;
    font-size: 9px;
  }
  .briefing-page .diag-circle {
    min-width: 44px;
  }
  .briefing-page .diag-ring {
    width: 44px;
    height: 44px;
    font-size: 9px;
  }
}

@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

table td[style*="text-align:right"],
table td[style*="text-align: right"],
td.pd-amount {
  font-variant-numeric: tabular-nums;
}
