/* ============================================================
   인슈비앱 (InsuBee) — Global Stylesheet v2
   Navy + Gold 통일 브랜딩
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.min.css');

:root {
  --navy: #1a1f3d;
  --navy-light: #252a4a;
  --navy-dark: #12152e;
  --gold: #e6a817;
  --gold-light: #f0c040;
  --gold-pale: #fdf6e3;
  --white: #ffffff;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.12);
  --max-width: 720px;
  --nav-height: 0px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ======== SHARED HEADER (matches index.html) ======== */
.site-header {
  background: rgba(26,31,61,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky; top: 0; z-index: 100;
}
.site-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 800; color: var(--white);
  text-decoration: none;
}
.site-logo-icon {
  width: 32px; height: 32px; background: var(--gold);
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; font-weight: 900; color: var(--navy);
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); }
.site-nav .btn-register {
  background: var(--white); color: var(--navy);
  font-weight: 700; padding: 9px 20px; border-radius: 24px;
  font-size: 14px; margin-left: 8px; transition: all 0.2s;
}
.site-nav .btn-register:hover { background: var(--gold); color: var(--navy); }
.mobile-menu-btn { display: none; background: none; color: var(--white); font-size: 28px; padding: 4px; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .site-header-inner { padding: 0 20px; }
}

/* ======== SHARED FOOTER ======== */
.site-footer {
  background: #111; padding: 48px 32px 32px;
  color: rgba(255,255,255,0.4); font-size: 13px;
}
.site-footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px; flex-wrap: wrap; gap: 24px;
}
.footer-brand { font-size: 18px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-info { line-height: 1.8; }

/* ======== PAGE CONTENT ======== */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: calc(100dvh - 64px - 200px);
  padding: 32px 24px;
}

@media (max-width: 600px) {
  .page-container { padding: 24px 16px; }
}

/* ======== PAGE TITLE ======== */
.page-title {
  font-size: 28px; font-weight: 900; color: var(--navy);
  margin-bottom: 8px;
}
.page-subtitle {
  font-size: 15px; color: var(--gray-500); margin-bottom: 24px;
}

/* ======== CARDS ======== */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }

/* ======== BUTTONS ======== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: none;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--gold-pale); color: var(--navy); }
.btn-secondary:hover { background: #fcecc4; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn-outline { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: var(--gray-50); }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ======== FORMS ======== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; color: var(--gray-800);
  background: #fff; transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,31,61,.12); }
.form-input::placeholder { color: var(--gray-400); }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

/* ======== CHIPS ======== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--gray-200); background: var(--gray-50);
  color: var(--gray-600); cursor: pointer; transition: all .2s;
}
.chip.active { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ======== STATUS ======== */
.status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-accepted { background: #D1FAE5; color: #065F46; }
.status-rejected { background: #FEE2E2; color: #991B1B; }
.status-progress { background: #DBEAFE; color: #1E40AF; }
.status-completed { background: #E5E7EB; color: #374151; }
.status-cancelled { background: #F3F4F6; color: #6B7280; }

/* ======== AGENT CARD ======== */
.agent-card {
  display: flex; gap: 14px; padding: 20px;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: #fff; margin-bottom: 12px; cursor: pointer; transition: all .2s;
}
.agent-card:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.agent-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold-pale); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
}
.agent-info { flex: 1; min-width: 0; }
.agent-name { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
.agent-company { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.agent-meta { display: flex; gap: 12px; font-size: 12px; color: var(--gray-500); }
.agent-meta i { font-size: 14px; }
.rating { display: inline-flex; align-items: center; gap: 2px; color: var(--warning); font-weight: 600; }
.premium-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 4px;
  background: linear-gradient(135deg, #FDE68A, #FCD34D);
  color: #92400E; font-size: 11px; font-weight: 700;
}
.agent-specialty { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.agent-specialty span {
  padding: 3px 8px; border-radius: 4px;
  background: var(--gray-100); font-size: 11px; color: var(--gray-600);
}

/* ======== TABS ======== */
.tab-group { display: flex; border-bottom: 2px solid var(--gray-100); margin-bottom: 16px; }
.tab-item {
  flex: 1; text-align: center; padding: 12px; font-size: 14px; font-weight: 600;
  color: var(--gray-400); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.tab-item.active { color: var(--navy); border-bottom-color: var(--gold); }

/* ======== ROLE SELECT ======== */
.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.role-card {
  border: 2px solid var(--gray-200); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; cursor: pointer; transition: all .2s;
}
.role-card.active { border-color: var(--gold); background: var(--gold-pale); }
.role-card i { font-size: 32px; color: var(--gray-400); margin-bottom: 8px; display: block; }
.role-card.active i { color: var(--navy); }
.role-card .role-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.role-card .role-desc { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ======== SEARCH ======== */
.search-bar { position: relative; margin-bottom: 16px; }
.search-bar i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 18px; }
.search-bar .form-input { padding-left: 42px; }

/* ======== SECTION ======== */
.section-title { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }

/* ======== NOTIFICATION ======== */
.notif-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.notif-item.unread { background: var(--gold-pale); margin: 0 -20px; padding: 14px 20px; }
.notif-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.notif-icon.match { background: var(--gold-pale); color: var(--navy); }
.notif-icon.accept { background: #D1FAE5; color: var(--success); }
.notif-icon.system { background: var(--gray-100); color: var(--gray-500); }
.notif-content { flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.notif-body { font-size: 13px; color: var(--gray-500); }
.notif-time { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ======== EMPTY STATE ======== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 15px; }

/* ======== LOADING ======== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200); border-top-color: var(--navy);
  border-radius: 50%; animation: spin .6s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======== TOAST ======== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--navy); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; z-index: 1000;
  opacity: 0; transition: all .3s ease; max-width: calc(var(--max-width) - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ======== MODAL ======== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; display: none; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 520px; max-height: 85dvh;
  overflow-y: auto; padding: 32px 24px; margin: 16px;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.modal-handle { width: 36px; height: 4px; background: var(--gray-300); border-radius: 2px; margin: 0 auto 16px; }

/* ======== HERO BANNER (sub pages) ======== */
.hero-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; border-radius: var(--radius-lg); padding: 28px 24px; margin-bottom: 24px;
}
.hero-banner h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.hero-banner p { font-size: 14px; opacity: .75; margin-bottom: 16px; }
.hero-banner .btn { background: var(--gold); color: var(--navy); font-weight: 700; }
.hero-banner .btn:hover { background: var(--gold-light); }

/* ======== STAT ROW ======== */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-card .label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ======== QUICK MENU ======== */
.quick-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; background: var(--gray-50); border-radius: var(--radius);
  text-decoration: none; color: var(--gray-700); font-size: 12px; font-weight: 600;
  transition: background .2s;
}
.quick-item:hover { background: var(--gold-pale); }
.quick-item i { font-size: 24px; color: var(--navy); }

/* ======== DETAIL INFO ======== */
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.detail-info-item { background: var(--gray-50); border-radius: var(--radius-sm); padding: 12px; }
.detail-info-item .label { font-size: 12px; color: var(--gray-500); }
.detail-info-item .value { font-size: 15px; font-weight: 700; margin-top: 2px; }

/* ======== REVIEW ======== */
.review-item { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.review-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.review-stars { color: var(--warning); font-size: 14px; }

/* ======== PROFILE ======== */
.profile-header { text-align: center; padding: 24px 0; margin-bottom: 16px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gold-pale); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; margin: 0 auto 12px;
}
.profile-name { font-size: 22px; font-weight: 800; }

/* ======== UTILITIES ======== */
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--gray-500); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }

/* ======== FILTER BAR ======== */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }

/* ======== REQUEST ACTIONS ======== */
.request-actions { display: flex; gap: 8px; margin-top: 12px; }
.request-actions .btn { flex: 1; }
.customer-info-row { display: flex; gap: 16px; font-size: 13px; color: var(--gray-600); margin-top: 6px; }
.response-form { margin-top: 12px; padding: 12px; background: var(--gray-50); border-radius: var(--radius-sm); }

/* ======== ERROR MSG ======== */
.error-msg {
  background: #FEE2E2; color: #991B1B;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; display: none;
}
.error-msg.show { display: block; }

/* ======== TERMS CHECK ======== */
.terms-check {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 10px; font-size: 13px; color: var(--gray-600);
}
.terms-check input { margin-top: 3px; accent-color: var(--navy); }
.terms-check a { color: var(--navy); text-decoration: underline; }

/* ======== MOBILE MENU ======== */
.mobile-menu {
  display: none; background: var(--navy);
  padding: 16px 24px 24px;
}
.mobile-menu a {
  display: block; padding: 12px 0;
  color: rgba(255,255,255,0.8); font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu a.highlight {
  color: var(--gold); font-weight: 700; border: none; padding-top: 14px;
}
