:root { --message-alert: #c51f3d; }
.nav-account { position: relative; }
.nav-account-button { position: relative; display: inline-flex; align-items: center; gap: 4px; max-width: 46vw; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #111827; font: 600 13px 'Noto Sans KR', sans-serif; cursor: pointer; white-space: nowrap; }
.nav-account-button span:first-child { overflow: hidden; text-overflow: ellipsis; }
.nav-account-unread { position: absolute; top: -7px; right: -6px; box-sizing: border-box; min-width: 20px; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; background: var(--message-alert); color: #fff; text-align: center; font: 700 11px/16px 'Noto Sans KR', sans-serif; font-variant-numeric: tabular-nums; pointer-events: none; }
.nav-account-button:hover { border-color: #3b82f6; color: #3b82f6; }
.nav-account-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 150px; padding: 6px 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.10); z-index: 1000; }
.nav-account-menu[hidden] { display: none; }
.nav-account-names { padding: 6px 16px 8px; border-bottom: 1px solid #e5e7eb; margin-bottom: 4px; font-size: 13px; line-height: 1.8; color: #111827; }
.nav-account-menu button { display: block; width: 100%; padding: 9px 16px; border: 0; background: none; text-align: left; font: 400 13px 'Noto Sans KR', sans-serif; color: #111827; cursor: pointer; white-space: nowrap; }
.nav-account-menu button:hover { background: #f4f6fb; color: #3b82f6; }
.nav-account-menu .nav-account-inbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.message-unread-count { display: inline-block; min-width: 19px; padding: 1px 5px; border-radius: 999px; background: var(--message-alert); color: #fff; text-align: center; font: 700 11px/17px 'Noto Sans KR', sans-serif; }
.message-unread-count[hidden] { display: none; }
.nav-account-menu .nav-account-phone { display: none; }
.account-dialog { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.account-dialog form { width: 100%; max-width: 360px; padding: 28px 24px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); font-family: 'Noto Sans KR', sans-serif; }
.account-dialog h2 { margin: 0 0 18px; font-size: 18px; font-weight: 700; color: #111827; }
.account-dialog label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #6b7280; }
.account-dialog input { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 16px; font-family: inherit; box-sizing: border-box; outline: none; }
.account-dialog input:focus { border-color: #3b82f6; }
.account-dialog input[hidden] { display: none; }
.account-dialog .account-remember { display: flex; align-items: center; gap: 8px; font-weight: 400; color: #111827; cursor: pointer; }
.account-dialog .account-remember input { width: auto; margin: 0; }
.account-dialog .account-error { min-height: 20px; margin: 4px 0 0; font-size: 13px; color: #dc2626; }
.account-dialog .account-done { color: #059669; }
.account-dialog .account-actions { display: flex; gap: 8px; margin-top: 14px; }
.account-dialog .account-actions button { flex: 1; padding: 11px; border-radius: 10px; font: 700 14px 'Noto Sans KR', sans-serif; cursor: pointer; }
.account-dialog .account-cancel { border: 1px solid #e5e7eb; background: #f4f6fb; color: #111827; }
.account-dialog .account-submit { border: 0; background: #3b82f6; color: #fff; }
.account-dialog .account-submit:disabled { opacity: .5; cursor: default; }
/* 관리자 화면 이동(메인·현장·관리): 관리자·현장 화면(lab/public/styles.css)과 같은 모양, 같은 오른쪽 끝 자리. */
.nav-links .area-switch { display: inline-flex; border: 1px solid #c9d5e6; border-radius: 9px; overflow: hidden; background: #fff; }
.nav-links .area-switch a { display: inline-flex; align-items: center; min-height: 33px; padding: 0 12px; font: 800 13px 'Noto Sans KR', sans-serif; color: #152b4a; text-decoration: none; white-space: nowrap; }
.nav-links .area-switch a + a { border-left: 1px solid #c9d5e6; }
.nav-links .area-switch a:hover { background: #eff6ff; color: #152b4a; }
.nav-links .area-switch a[aria-current="page"] { background: #152b4a; color: #fff; }
.nav-account-login { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.nav-account-login:hover { color: #3b82f6; }
@media (max-width: 640px) {
  nav { padding-left: 0; }
  .nav-links > .nav-about { display: none; }
  .nav-links.nav-master > li:has(> a[href="/contact"]) { display: none; }
  .nav-links .area-switch a { min-height: 29px; padding: 0 8px; font-size: 12px; }
  .nav-account-item .nav-account-login { font-size: 14px; font-weight: 600; color: #3b82f6; }
  .nav-account-button { padding: 3px 10px; font-size: 14px; max-width: calc(100vw - 180px); }
  .nav-account-menu { top: calc(100% + 6px); }
  .nav-account-menu .nav-account-phone { display: block; }
}
