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

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    background-color: #eef1f5;
    color: #2b2f36;
    line-height: 1.6;
}

/* 머리띠 */
.header {
    background-color: #1f3a5f;
    color: #fff;
    padding: 13px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;          /* 스크롤해도 상단 고정 */
    top: 0;
    z-index: 100;
}
.header .logo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.header .user-info {
    font-size: 14px;
    color: #cdd6e3;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;   /* 메뉴판이 햄버거 버튼이 아니라 이 영역(=페이지 우측)을 기준으로 펼쳐지도록 */
}
.header-dashboard-btn {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.header-dashboard-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* 상단바 도움말 버튼 — 노란색으로 눈에 띄게 */
.header-help-btn {
    background: #ffcc00;
    color: #5a4200;
    border: 1px solid #e6b800;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}
.header-help-btn:hover {
    background: #ffd633;
}

/* 상단바 아이콘 버튼 (메뉴 삼선 / 로그아웃) */
.header-icon-btn {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.15s;
}
.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}
.header-icon-btn .header-logout-icon {
    display: block;
    width: 17px;
    height: 17px;
    vertical-align: middle;
}

/* 상단바 삼선 메뉴 — 마우스를 올리면 바로가기 목록이 스르륵 펼쳐짐 */
.header-menu-wrap {
    /* position 없음(static) — 메뉴판은 이 버튼이 아니라 조상인 .header-right 기준으로 펼친다(아래 설명) */
}
.header-menu-dropdown {
    position: absolute;
    /* 삼선 버튼(.header-icon-btn) 높이 30px(패딩6px+테두리1px 위아래+글자16px)의 절반만큼 위로 당겨서
       버튼과 메뉴판 사이 빈틈을 줄임 — 마우스를 내리다 살짝 벗어나 메뉴가 사라지는 걸 줄여줌 */
    top: calc(100% - 15px);
    /* .header-menu-wrap(햄버거 버튼) 기준으로 펼치면, 버튼 뒤에 대시보드·로그아웃 버튼이 더 있어서
       메뉴판이 실제 화면 우측보다 한참 왼쪽에 자리잡게 되고(=자주 쓰는 첫 메뉴가 마우스에서 멀어짐),
       버튼 폭이 넓을 땐 화면 밖으로 잘리기도 한다. 그래서 이 버튼이 아니라 조상 .header-right(=페이지
       우측 여백 바로 안쪽, position:relative)를 기준 삼아 펼쳐 — 항상 페이지 우측에 붙고, 버튼 개수·순서가
       바뀌어도 흔들리지 않는다. */
    right: 0;
    left: auto;
    width: 452px;
    max-width: calc(100vw - 20px);
    background: white;
    border: 1px solid #dde3eb;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.2);
    padding: 6px;
    column-count: 2;
    column-gap: 12px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;   /* 좁은 화면에서 긴 글자가 컬럼 폭을 넘겨 옆으로 삐져나가 화면이 밀리는 것 방지 */
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 200;
}
.header-menu-wrap:hover .header-menu-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* 같은 성격(색상)의 메뉴 묶음은 하나의 단위로 취급해, 2단 배치 시 중간에 컬럼이 갈라지지 않게 한다 */
.header-menu-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}
/* 모바일에서도 2단 배치를 그대로 유지 — 위 max-width: calc(100vw - 20px)가 드롭다운 전체 폭을
   화면에 맞게 이미 줄여주고, 각 칸 폭은 아래 button의 줄바꿈 허용으로 넘치지 않게 한다.
   (화면이 좁다고 1단으로 접으면 오른쪽 칸에 있던 메뉴들이 사용자 눈에 안 띄어 "메뉴가 없다"고
   오해하기 쉬움 — 좁아진 폭 안에서 2단을 그대로 보여주는 쪽이 낫다) */
@media (max-width: 768px) {
    /* 상단바 폭이 부족해 "중개톡"/"도움말" 끝 글자가 줄바꿈되는 문제 — 모바일에서는 이 두 버튼을
       상단바에서 숨기고 대신 삼선 메인메뉴 끝에 넣어둔 같은 기능 항목을 쓰게 한다 */
    .header-help-btn, #header_logout_btn { display: none !important; }
}
.header-menu-dropdown button {
    text-align: left;
    border: none;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    /* nowrap이면 "실시간 서버 모니터링"처럼 긴 이름이 칸 폭을 넘겨 옆으로 삐져나가 2단 중
       오른쪽 칸이 화면 밖으로 밀려버림(좁은 화면일수록 심함) — 줄바꿈을 허용해 칸 안에 눌러 담는다.
       word-break: keep-all로 한글 단어(음절 덩어리)가 중간에 끊기지 않고 공백에서만 줄바꿈됨 */
    white-space: normal;
    word-break: keep-all;
}
/* 대시보드 바로가기 버튼과 동일한 색상 분류 — 배경색으로 시인성 확보 */
.header-menu-dropdown button.cat-gray   { background: #ebebeb; color: #2c3340; }
.header-menu-dropdown button.cat-gray:hover   { background: #d8dbdf; }
.header-menu-dropdown button.cat-blue   { background: #e8f0fb; color: #1d3d63; }
.header-menu-dropdown button.cat-blue:hover   { background: #cfdef3; }
.header-menu-dropdown button.cat-yellow { background: #fff3b8; color: #6a4a00; }
.header-menu-dropdown button.cat-yellow:hover { background: #f0db84; }
.header-menu-dropdown button.cat-purple { background: #f0e6f9; color: #5a3f7a; }
.header-menu-dropdown button.cat-purple:hover { background: #ddc8ef; }

#header_admin_menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* 만료 띠도 sticky 일관성 위해 — header 아래 자리 */
#expiry_banner {
    position: sticky;
    top: 52px;            /* header 높이 정도 */
    z-index: 99;
}

/* 대시보드 메뉴 버튼 — 박준선님 정한 색상 분류 */
.menu-btn.cat-gray   { background: #ebebeb; color: #2c3340; border-color: #c3c9d1; }
.menu-btn.cat-gray:hover   { background: #d8dbdf; }
.menu-btn.cat-blue   { background: #e8f0fb; color: #1d3d63; border-color: #a9c8ec; }
.menu-btn.cat-blue:hover   { background: #cfdef3; }
.menu-btn.cat-yellow { background: #fff3b8; color: #6a4a00; border-color: #e6c64a; }
.menu-btn.cat-yellow:hover { background: #f0db84; }
.menu-btn.cat-purple { background: #f0e6f9; color: #5a3f7a; border-color: #cbaee3; }
.menu-btn.cat-purple:hover { background: #ddc8ef; }

/* 내용 영역 */
.content {
    max-width: 1100px;
    margin: 22px auto;
    padding: 26px;
    background-color: #fff;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    min-height: 400px;
}

/* 대시보드 전용 — 우측 캘린더 컬럼(320px+간격 22px)이 늘어난 만큼만 넓혀서, 기존 좌측 내용 폭(1100px)은 그대로 유지 */
.content-dashboard {
    max-width: 1442px;
}

/* 넓은 테이블 페이지용 — 카드 스타일 유지하면서 폭만 확장 */
.content-wide {
    max-width: 95vw;
    margin: 22px auto;
    padding: 26px;
    background-color: #fff;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    min-height: 400px;
}

/* 입력 폼 공통 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: bold;
    color: #5a6472;
}

.form-group input {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c4ccd6;
    border-radius: 4px;
    font-size: 14px;
    color: #2b2f36;
}

.form-group input:focus {
    outline: none;
    border-color: #2f6fb5;
    box-shadow: 0 0 0 2px rgba(47,111,181,0.15);
}

/* 비밀번호 입력란 + 눈모양 보이기 버튼 — 폭은 절반으로 */
.pw-toggle-wrap {
    position: relative;
    width: 50%;
    min-width: 160px;
}

.pw-toggle-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 40px !important;
}

.pw-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px 6px;
    color: #6a7480;
}

.pw-toggle-btn:hover {
    color: #2b2f36;
}

/* 금액 입력란 — 숫자라 우측정렬, 절반 폭, 우측에 '만원' 단위 표시
   .form-group input(0,1,1)보다 우선순위가 높아야 폭이 실제로 줄어듦 */
.form-group input.price-input {
    width: 50%;
    min-width: 90px;
    text-align: right;
    font-size: 15px;
    box-sizing: border-box;
}

.price-unit-suffix {
    font-size: 13px;
    color: #6a7480;
    white-space: nowrap;
}

/* 버튼 공통 */
/* 버튼 공통 */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
    transition: background-color 0.15s, transform 0.08s, box-shadow 0.15s;
}

/* 마우스 올렸을 때 - 살짝 떠오름 */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.18);
}

/* 누르는 순간 - 제자리로 내려감 */
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.btn-primary {
    background-color: #2f6fb5;
    color: #fff;
}

.btn-primary:hover {
    background-color: #285f9c;
}

.btn-gray {
    background-color: #e6e9ee;
    color: #3c4450;
    border: 1px solid #c4ccd6;
}

.btn-gray:hover {
    background-color: #dadee5;
}


/* 안내 메시지 */
.msg {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.msg-error {
    background-color: #fbeaea;
    color: #b3382c;
    border: 1px solid #f0c6c2;
}

.msg-ok {
    background-color: #e9f5ed;
    color: #2a7d4f;
    border: 1px solid #c2e3cf;
}

.msg-warn {
    background-color: #fff8e0;
    color: #8a6d00;
    border: 1px solid #e6c64a;
}

/* 대시보드 메뉴 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.menu-btn {
    padding: 28px 12px;
    background-color: #f5f7fa;
    border: 1px solid #d4dae2;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #2b3a4f;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.08s, box-shadow 0.15s;
}

.menu-btn:hover {
    background-color: #e9eef4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 그리드(표) */
.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.grid thead th {
    background-color: #1f3a5f;
    color: #fff;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
}

.grid tbody td {
    padding: 9px 8px;
    border-bottom: 1px solid #e1e5ea;
}

.grid tbody tr:hover {
    background-color: #f5f7fa;
}

/* 넓은 표 — 모바일 등 좁은 화면에서 가로 스크롤로 보기 */
.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 빠른 툴팁 — 브라우저 기본 title 자료보다 빠르게 표시 (base.html JS가 제어) */
.fast-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    max-width: 320px;
    padding: 6px 10px;
    background: #2b2f36;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 5px;
    white-space: pre-line;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none;
}


/* 체크박스 라벨 (체크박스와 글자가 붙어다니는 것) */
.check-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: normal;
    color: #2b2f36;
    cursor: pointer;
}

.check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* 섹션 제목 */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    color: #1f3a5f;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1f3a5f;
}

/* 등록 폼 접기/펼치기 토글 */
.reg-toggle-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 13px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
    border: 1.5px solid #c8d0da;
    background: #f5f7fa;
    color: #6a7a8a;
    line-height: 1.6;
}
.reg-toggle-btn:hover  { background: #e8ecf2; border-color: #aab4c0; }
.reg-toggle-btn.closed { border-color: #2f6fb5; background: #eef4fc; color: #2f6fb5; }
.reg-toggle-btn { position: relative; overflow: hidden; }
.reg-toggle-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%);
    animation: reg-sheen 2.4s ease-in-out infinite;
}
@keyframes reg-sheen {
    0%   { left: -80%; }
    40%  { left: 130%; }
    100% { left: 130%; }
}

.reg-form-body { }
.reg-form-body.hidden { display: none; }

/* 등기소 단일 물건 조회 확인 — 미확인 상태일 때 눈에 띄게 하는 펄스 효과 */
.iros-pulse {
    animation: iros-pulse-glow 1.4s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes iros-pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(179, 56, 44, .35); }
    50%      { box-shadow: 0 0 0 6px rgba(179, 56, 44, 0); }
}

/* 등기소 단일 물건 조회 확인 진행 중 — 회전 스피너 */
.iros-spin {
    display: inline-block;
    animation: iros-spin-rotate 0.9s linear infinite;
}
@keyframes iros-spin-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* 등기소 단일 물건 조회 확인 진행 중 — 확인 영역 테두리 은은한 강조 */
.iros-checking {
    animation: iros-checking-glow 1.2s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes iros-checking-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 181, .35); }
    50%      { box-shadow: 0 0 0 6px rgba(47, 111, 181, 0); }
}

/* 등기소 단일 물건 미확인 + 임대차(전세/월세) — 깜빡임 강조 */
.iros-blink {
    animation: iros-blink-fade 1s ease-in-out infinite;
}
@keyframes iros-blink-fade {
    0%, 100% { opacity: 1; }
    50%      { opacity: .25; }
}

/* 글씨는 고정하고 후광(그림자)만 깜빡이는 강조 — 텍스트 자체는 항상 선명하게 유지해야 할 때 사용 */
.glow-blink {
    animation: glow-blink-fade 1.2s ease-in-out infinite;
}
@keyframes glow-blink-fade {
    0%, 100%   { text-shadow: 0 0 0 rgba(47, 111, 181, 0); }
    50%        { text-shadow: 0 0 8px rgba(47, 111, 181, .85); }
}

/* 버튼 광택(샤인) 모션 — 흰 빛줄기가 대각선으로 쓸고 지나가는 강조. 글씨는 그대로 유지됨 */
.btn-sheen { position: relative; overflow: hidden; }
.btn-sheen::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 90%; height: 100%;
    background: linear-gradient(105deg, transparent 15%, rgba(255,255,255,.75) 50%, transparent 85%);
    animation: btn-sheen-sweep 2s ease-in-out infinite;
}
@keyframes btn-sheen-sweep {
    0%   { left: -80%; }
    40%  { left: 130%; }
    100% { left: 130%; }
}

/* 등록 타이틀바 클릭 토글 */
.reg-section-title { cursor: pointer; user-select: none; }
.reg-section-title:hover { opacity: .82; }
/* 접혀있을 때는 박스 전체가 클릭 지점 — 박스 통째로 배경 강조 */
.reg-box { cursor: default; transition: background .15s, border-color .15s; }
.reg-box.is-collapsed { cursor: pointer; }
.reg-box.is-collapsed:hover { background: #cfe0f5; border-color: #1f3a5f; }
.reg-box.is-collapsed:hover .reg-section-title { opacity: 1; border-bottom-color: #1f3a5f; }

/* 항상접기 토글 스위치 */
.always-collapse-wrap {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 400; color: #8a9aad;
    cursor: pointer; white-space: nowrap;
}
.always-collapse-wrap input[type=checkbox] { display: none; }
.ac-track {
    width: 28px; height: 15px; border-radius: 999px;
    background: #d0d8e4; position: relative;
    flex-shrink: 0; transition: background .2s;
    display: inline-block;
}
.ac-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 11px; height: 11px; border-radius: 50%;
    background: #fff; transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.always-collapse-wrap input:checked ~ .ac-track { background: #2f6fb5; }
.always-collapse-wrap input:checked ~ .ac-track .ac-thumb { left: 15px; }

/* 범용 토글 스위치 (공동소유자 등 자주 안 쓰는 선택 항목) — 항상접기와 같은 모양의 트랙·손잡이 재사용 */
.toggle-switch-wrap {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
}
.toggle-switch-wrap input[type=checkbox] { display: none; }
.toggle-switch-wrap input:checked ~ .ac-track { background: #2f6fb5; }
.toggle-switch-wrap input:checked ~ .ac-track .ac-thumb { left: 15px; }


/* 표 안의 작은 버튼 */
.btn-small {
    padding: 4px 12px;
    border: 1px solid #c4ccd6;
    border-radius: 4px;
    background-color: #f5f7fa;
    color: #2b3a4f;
    font-size: 13px;
    cursor: pointer;
}

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


/* 표 안의 위험(삭제) 버튼 */
.btn-small-danger {
    background-color: #fbeaea;
    border-color: #f0c6c2;
    color: #b3382c;
}

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


/* 드롭다운(select) */
.form-select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c4ccd6;
    border-radius: 4px;
    font-size: 14px;
    color: #2b2f36;
    background-color: #fff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #2f6fb5;
    box-shadow: 0 0 0 2px rgba(47,111,181,0.15);
}

/* 흰 박스 없이 넓게 쓰는 화면 (목록 위주 업무 화면) */
.content-plain {
    background-color: transparent;
    border: none;
    max-width: 95vw;
    padding: 0;
}

/* 모달 (화면 위에 뜨는 선택 창) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.45);
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 680px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    background-color: #1f3a5f;
    color: #fff;
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: bold;
}

.modal-header .modal-close {
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 4px;
    color: #fff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.modal-header .modal-close:hover {
    background: rgba(255,255,255,0.28);
}

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
}

/* 여러 줄 입력 상자 */
.form-textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c4ccd6;
    border-radius: 4px;
    font-size: 14px;
    color: #2b2f36;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #2f6fb5;
    box-shadow: 0 0 0 2px rgba(47,111,181,0.15);
}

/* 글자 수 표시 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #8a93a0;
    margin-top: 3px;
}

/* 템플릿 선택 카드 */
.tpl-pick-card:hover {
    background-color: #f4f7fb;
    border-color: #2f6fb5 !important;
}


/* 텍스트 링크 버튼 (낮은 중요도 기능용) */
.text-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #8a93a0;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

.text-link-btn:hover {
    color: #2f6fb5;
}


/* 치환변수 입력 버튼 */
.var-btn-area {
    margin-bottom: 7px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.var-btn-label {
    font-size: 12px;
    color: #6a7480;
    margin-right: 3px;
}

.var-btn {
    background: #eef3f9;
    border: 1px solid #c5d4e6;
    color: #2f6fb5;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 11px;
    cursor: pointer;
    font-family: inherit;
}

.var-btn:hover {
    background: #2f6fb5;
    color: #fff;
    border-color: #2f6fb5;
}

.var-help {
    font-size: 12px;
    color: #9aa3b0;
    margin-top: 5px;
    line-height: 1.5;
}


/* 템플릿 버튼 편집 */
.btn-add-area {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-bottom: 8px;
}
.btn-add-chip {
    background: #eef3f9; border: 1px solid #c5d4e6; color: #2f6fb5;
    font-size: 12px; padding: 4px 10px; border-radius: 13px;
    cursor: pointer; font-family: inherit;
}
.btn-add-chip:hover { background: #2f6fb5; color: #fff; border-color: #2f6fb5; }

.button-list { display: flex; flex-direction: column; gap: 6px; }
.button-row {
    display: flex; align-items: center; gap: 6px;
    background: #f7f9fb; border: 1px solid #e1e5ea; border-radius: 6px;
    padding: 6px 8px;
}
.btn-order { display: flex; flex-direction: column; gap: 1px; }
.btn-arrow {
    background: #fff; border: 1px solid #c4ccd6; border-radius: 3px;
    font-size: 9px; line-height: 1; padding: 1px 4px; cursor: pointer; color: #6a7480;
}
.btn-arrow:disabled { opacity: 0.3; cursor: default; }
.btn-type-tag {
    font-size: 11px; color: #2f6fb5; background: #e9f0fa;
    border-radius: 9px; padding: 2px 8px; white-space: nowrap;
}

.btn-name-input { width: 110px; flex: 0 0 110px; padding: 5px 7px; border: 1px solid #c4ccd6; border-radius: 4px; font-size: 13px; }
.btn-url-input { flex: 1 1 auto; min-width: 0; padding: 5px 7px; border: 1px solid #c4ccd6; border-radius: 4px; font-size: 13px; }

.btn-del {
    background: #fff; border: 1px solid #e0b4b0; color: #c0392b;
    border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 12px;
}
.btn-del:hover { background: #c0392b; color: #fff; }



/* 잠긴 입력칸 (가져온 버튼, 정해진 버튼) */
.input-locked {
    background: #f0f2f5 !important;
    color: #6a7480 !important;
    cursor: not-allowed;
}


/* 검수중·승인 상태 안내 */
.lock-notice {
    background: #fff8e1;
    border: 1px solid #f0c674;
    color: #8a6308;
    padding: 18px 28px;
    border-radius: 8px;
    margin: 14px auto;
    font-size: 15px;
    text-align: center;
    max-width: 660px;
}


/* 잠긴(disabled) 버튼들 */
.var-btn:disabled,
.btn-add-chip:disabled,
.btn-arrow:disabled,
.btn-del:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn-primary:disabled,
.btn-gray:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* 잠금 안내 박스 안의 새 템플릿 버튼 */
.lock-notice-text {
    margin-bottom: 10px;
}

.lock-notice-action {
    text-align: center;
}

.btn-new-template {
    background: #fff;
    border: 1px solid #c89a3b;
    color: #8a6308;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
}
.btn-new-template:hover {
    background: #c89a3b;
    color: #fff;
}

/* 환영 알림톡 재발송 버튼 */
.btn-resend {
    background: #fff;
    border: 1px solid #2f6fb5;
    color: #2f6fb5;
}
.btn-resend:hover {
    background: #2f6fb5;
    color: #fff;
}


/* ===== 템플릿 미리보기 모달 ===== */
.preview-modal {
    position: fixed;
    display: none;
    z-index: 1100;
    pointer-events: auto;
}
.preview-modal.show {
    display: block;
}

/* 휴대폰 본체 */
.phone-frame {
    width: 300px;
    background: #abc1d1;
    border: 2px solid #4a5763;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    font-family: -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

/* 상태바 */
.phone-statusbar {
    background: #2c3e50;
    color: #fff;
    font-size: 11px;
    padding: 5px 14px;
    text-align: right;
    letter-spacing: 1px;
}

/* 채널 헤더 */
.phone-channel {
    background: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid #e1e5ea;
}
.phone-channel-name {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}

/* 대화 영역 */
.phone-talk-area {
    padding: 14px 10px;
}

/* 알림톡 카드 */
.alimtalk-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.alimtalk-header {
    background: #fee500;
    color: #3c1e1e;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    letter-spacing: 0.3px;
}
.alimtalk-body {
    padding: 14px 14px 18px 14px;   /* 하단에 여백 더 */
    font-size: 13px;
    line-height: 1.65;
    color: #222;
    white-space: pre-wrap;
    word-break: break-word;
}
.alimtalk-body .var {
    color: #2f6fb5;
    font-weight: 500;
}

/* 버튼 묶음 — 카드와 분리된 느낌 */
.alimtalk-buttons {
    padding: 4px 10px 10px 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;                         /* 버튼 간 이격 */
}
.alimtalk-btn {
    background: #f3f4f6;              /* 옅은 회색 배경 */
    border-radius: 6px;               /* 라운드 네모 */
    padding: 9px;
    text-align: center;
    font-size: 13px;
    color: #444;
}


/* 템플릿 목록 행 — 내용 칸만 클릭 가능 */
.template-row:hover,
.template-row.selected-for-preview {
    background-color: #f5f8fc !important;
}

/* 템플릿 복사 버튼 */
.btn-copy {
    background: #fff;
    border: 1px solid #c89a3b;
    color: #8a6308;
}
.btn-copy:hover {
    background: #c89a3b;
    color: #fff;
}

/* 수정 모드 — 제목에 주황 강조 + 언더바 */
.section-title.edit-mode {
    color: #d97706;
    border-bottom: 2px solid #d97706;
    padding-bottom: 6px;
    transition: color 0.2s, border-color 0.2s;
}


/* 완전 삭제 버튼 — 강한 빨강 */
.btn-hard-delete {
    background: #fff;
    border: 1px solid #c0392b;
    color: #c0392b;
    font-weight: 500;
}
.btn-hard-delete:hover {
    background: #c0392b;
    color: #fff;
}


/* 로그인 페이지 — 세션 만료 안내 */
.expired-notice {
    max-width: 400px;
    margin: 20px auto;
    padding: 14px 18px;
    background: #fff8e1;
    border: 1px solid #f0c674;
    color: #8a6308;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

/* 로그인 페이지 — 좌우 2분할 레이아웃 */
:root {
    --login-side-bg: #134CDB;
    --login-logo-max-width: 238px; /* 새 로고(여백 포함 500px 원본)에 맞춰 조정 (280px에서 15% 축소) */
}

/* 로그인 화면은 상단 공통 머리띠·만료 띠를 쓰지 않음 */
.no-top-header .header,
.no-top-header #expiry_banner {
    display: none;
}

/* 로그인 화면에서는 기본 카드형 .content 스타일을 걷어내고 화면 전체를 사용 */
.content.login-split-page {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    background-color: transparent;
    border: none;
    border-radius: 0;
    min-height: calc(100dvh - 56px); /* 상단 머리띠 높이만큼 제외 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.no-top-header .content.login-split-page {
    min-height: 100dvh; /* 머리띠가 없으므로 화면 전체 높이로 중앙 정렬 */
}

/* 좌우를 하나의 박스로 — 테두리는 좌측 배경색 */
.login-split {
    display: flex;
    width: 100%;
    max-width: 1014px; /* 기존 780px에서 좌우 모두 30% 확대 */
    border: 2px solid var(--login-side-bg);
    border-radius: 14px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.login-split-left {
    flex: 0 0 48%; /* 기존 34%에서 40% 확대 */
    background-color: var(--login-side-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* 좌측 패널 — 빛이 쓕 지나가는 샤임머 효과 */
.login-split-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 45%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.13) 50%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: login-shimmer-sweep 3.6s ease-in-out infinite;
}

@keyframes login-shimmer-sweep {
    0%   { left: -75%; }
    28%  { left: 130%; }
    100% { left: 130%; }
}

.login-split-logo {
    max-width: var(--login-logo-max-width);
    width: 100%;
    height: auto;
}

.login-split-right {
    flex: 1 1 auto;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.login-split-form-wrap {
    width: 100%;
    max-width: 266px; /* 기존 380px에서 30% 축소 */
}

.login-split-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--login-side-bg);
}

/* 로그인 버튼 — 좌측 배경색과 통일 */
.login-split-form-wrap .btn-primary {
    background-color: var(--login-side-bg);
}
.login-split-form-wrap .btn-primary:hover {
    filter: brightness(0.9);
}

/* 모바일 — 좌측 패널은 상단 축소 배너로, 폼은 전체 폭 */
@media (max-width: 768px) {
    .login-split {
        flex-direction: column;
        max-width: 420px;
    }
    .login-split-left {
        flex: 0 0 auto;
        padding: 27px 18px; /* 로고 영역 높이 50% 확대 (18px -> 27px) */
    }
    .login-split-logo {
        max-width: 119px; /* 새 로고에 맞춰 조정 (140px에서 15% 축소) */
    }
    .login-split-right {
        padding: 30px 20px 36px;
    }
}


/* 스케줄 미리보기 — 모달 아래 안내문구 */
 .preview-notice {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f6f8fb;
    border: 1px solid #dde3eb;
    color: #2f6fb5;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}

/* 거래 표 — 행 클릭 가능 */
.grid tbody tr.deal-row {
    cursor: pointer;
}
.grid tbody tr.deal-row:hover {
    background: #f8fafc;
}
.grid tbody tr.deal-row.selected {
    background: #e8f0fb;
}

/* 거래 보기 모달 — 섹션 */
.deal-view-section {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    background: #f8fafc;
}
.deal-view-section-title {
    font-size: 13px;
    font-weight: bold;
    color: #2f6fb5;
    margin-bottom: 8px;
    border-bottom: 1px solid #dde3eb;
    padding-bottom: 4
}

.deal-view-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    gap: 12px;
}
.deal-view-row-label {
    min-width: 96px;
    flex-shrink: 0;
    padding: 4px 10px;
    background: #eef2f7;
    border-radius: 4px;
    color: #5a6573;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
}
.deal-view-row-value {
    color: #2c3340;
    flex: 1;
    font-weight: 500;
    padding: 4px 0;
}

/* 거래 보기 모달 — 본 페이지 보이도록 오버레이 옅게 */
#deal_view_modal {
    background-color: rgba(0, 0, 0, 0.05);
}


/* ── 메모 빠른입력 키워드 ── */
/* 펼치기 버튼 — 작고 라운딩된 외곽선 버튼 */
.memo-kw-toggle {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid #c4ccd6;
    background: #f8fafc;
    color: #5a6573;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.6;
}
.memo-kw-toggle:hover { background: #eef2f7; }
/* 키워드 펼침 영역 — 칩 줄바꿈 배치 */
.memo-kw-panel {
    margin-top: 7px;
    gap: 6px;
    flex-wrap: wrap;
}
/* 키워드 칩 — 작고 둥근 색상 버튼 */
.memo-kw-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.7;
    white-space: nowrap;
}
.memo-kw-chip:hover { filter: brightness(0.96); }

/* ── 메모 미리보기 / 목록 비고 색상 태그 ── */
/* 입력란 아래 미리보기 영역 */
.memo-kw-preview {
    margin-top: 6px;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}
/* 색상 태그 — 미리보기·목록 공용 (작은 라운드 칩) */
.memo-kw-tag {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 11px;
    font-size: 11.5px;
    line-height: 1.7;
    white-space: nowrap;
}
/* 키워드와 일치하지 않는 일반 텍스트 조각 */
.memo-kw-tag-plain {
    background: transparent !important;
    border: none !important;
    color: #5a6573 !important;
    padding: 1px 2px;
}

/* ── 주소 표시 (지번 메인 + 도로명 참고) ── */
.addr-main { color: #2c3340; font-size: 14px; line-height: 1.5; }
.addr-sub  { color: #8a93a0; font-size: 12px; line-height: 1.4; margin-top: 1px; }
.addr-sub::before { content: "도로명 "; color: #b0b8c4; }
/* 고객 관심지역 — 주소 1건 = 한 줄(키워드), 구성 항목을 칩으로 펼침 */
.addr-kw-list { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.addr-kw-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
    padding: 6px 9px; border: 1px solid #e1e5ea; border-radius: 8px; background: #fafbfc;
}
/* 구성 항목 칩 (도/시·시군구·읍면·동/리·건물명) — 항목별 개별 삭제 */
.addr-part {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px 9px; border-radius: 12px; font-size: 12px;
    background: #eef4fb; color: #2c5d8f; border: 1px solid #d6e4f2; white-space: nowrap;
}
/* 칩에 마우스를 올렸을 때만 보이는 항목 삭제 x */
.addr-part-del {
    display: none; border: none; background: transparent; color: #b3382c;
    cursor: pointer; font-size: 13px; line-height: 1; padding: 0 0 0 2px;
}
.addr-part:hover { background: #e2edfa; }
.addr-part:hover .addr-part-del { display: inline-block; }
/* 계약 목록·발송스케줄 — 공동 매도/임대인·공동 매수/임차인 표시 칩 (연회색 배경에서도 잘 보이도록 진한 배경 + 흰 글씨) */
.co-chip {
    display: inline-flex; align-items: center;
    background: #2f6fb5; color: #fff;
    font-size: 10.5px; font-weight: 700;
    padding: 1px 6px; border-radius: 9px;
}
/* 주소(행) 전체 삭제 — 행 오른쪽 끝, 항상 표시 */
.addr-kw-del {
    margin-left: auto; flex-shrink: 0; border: none; background: #e9edf2; color: #6a7480;
    border-radius: 50%; width: 20px; height: 20px; line-height: 18px; cursor: pointer; font-size: 13px;
}
.addr-kw-del:hover { background: #f0d4d4; color: #b3382c; }
/* 단일 주소 선택 표시 박스 (물건) */
.addr-box {
    border: 1px solid #d7dde5; border-radius: 6px; padding: 8px 11px; background: #fafbfc;
    min-height: 20px;
}
.addr-box.empty { color: #9aa3af; font-size: 13px; }

/* ── 등록 폼 성격별 섹션 구분 ── */
.form-section {
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 12px 14px 4px;
    margin-bottom: 14px;
    background: #fcfdfe;
}
.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #2f6fb5;
    margin: 0 0 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid #eef2f6;
}

/* ── 빠른 툴팁 (기본 title 자료의 지연 없이 즉시 표시) ── */
.quick-tip {
    position: relative;
    cursor: help;
}
.quick-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #2b2f36;
    color: #fff;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 11.5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.05s linear;
    z-index: 100;
    pointer-events: none;
}
.quick-tip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 간단 리치 에디터 공용 — 색상 선택 팝오버 (base.html rtColorPopoverHtml) */
.rt-color-wrap { position: relative; display: inline-block; }
.rt-color-toggle { font-size: 13px; padding: 4px 9px; border: 1px solid #c4ccd6; background: #fff; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.rt-color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.25); vertical-align: middle; }
.rt-color-popover {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
    background: #fff; border: 1px solid #c4ccd6; border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15); padding: 10px; min-width: 168px;
}
.rt-color-popover.show { display: block; }
.rt-color-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.rt-color-chip {
    width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(0,0,0,0.15); transition: transform 0.1s;
}
.rt-color-chip:hover { transform: scale(1.18); }
.rt-color-custom-row { display: flex; gap: 6px; align-items: center; border-top: 1px dashed #e1e5ea; padding-top: 9px; }
.rt-color-custom-row input[type=color] { width: 34px; height: 26px; padding: 2px; border: 1px solid #c4ccd6; border-radius: 4px; cursor: pointer; }
.rt-color-apply-btn { font-size: 12px; padding: 4px 12px; border: 1px solid #2f6fb5; background: #2f6fb5; color: #fff; border-radius: 4px; cursor: pointer; }
.rt-color-apply-btn:hover { background: #24578f; }
