/* ═══════════════════════════════════════════════════
   고객 호스팅 관리 (Hosting)
   ═══════════════════════════════════════════════════ */

.ht_wrap {
    width: 100%;
    padding: clamp(20px, calc(1.56vw + 15px), 40px) 0;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    color: #444;
}

/* ── 상단 ── */
.ht_top_area {
    float: left;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: clamp(16px, calc(1.25vw + 12px), 32px);
}

.ht_page_title {
    font-size: clamp(22px, calc(0.94vw + 19px), 32px);
    font-weight: 700;
    color: #333;
    margin: 0;
}

.ht_top_left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ht_year_selector select {
    padding: 6px 28px 6px 12px;
    font-size: 17px;
    font-weight: 700;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.ht_btn_year {
    color: #666;
    border-color: #bbb;
    font-size: 13px;
}

.ht_btn_del_year {
    color: #c44;
    border-color: #dcc;
    font-size: 12px;
    padding: 5px 10px;
}
.ht_btn_del_year:hover { background: #c44; color: #fff; }

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

.ht_btn {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ht_btn:hover { background: #f0f0f0; border-color: #aaa; }
.ht_btn_save { background: #555; color: #fff; border-color: #555; }
.ht_btn_save:hover { background: #444; }
.ht_btn_add { color: #2a7ae2; border-color: #2a7ae2; }
.ht_btn_add:hover { background: #2a7ae2; color: #fff; }
.ht_btn_add_big { font-size: 15px; padding: 9px 20px; font-weight: 600; }

/* ── 12달 미니 캘린더 ── */
.ht_calendar {
    float: left;
    width: 100%;
    margin-bottom: clamp(16px, calc(1.25vw + 12px), 32px);
    padding: clamp(16px, calc(1.25vw + 12px), 32px);
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.ht_cal_year {
    font-size: clamp(18px, calc(0.63vw + 16px), 24px);
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

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

.ht_cal_cell {
    text-align: center;
    padding: 10px 4px 8px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.ht_cal_cell:hover { border-color: #bbb; background: #f5f5f5; }

.ht_cal_current {
    border-color: #555;
    border-width: 2px;
    background: #f8f8ff;
}

.ht_cal_paid { background: #f0faf0; border-color: #c3e6c3; }
.ht_cal_pending { background: #fff9f0; border-color: #f0ddb8; }
.ht_cal_urgent { background: #fff3e0; border-color: #ffb74d; }
.ht_cal_overdue { background: #ffeaea; border-color: #ef9a9a; }

.ht_cal_selected {
    border-color: #333 !important;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.ht_cal_month {
    font-size: clamp(12px, calc(0.31vw + 11px), 14px);
    font-weight: 700;
    color: #555;
    margin-bottom: 3px;
}

.ht_cal_clients {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.ht_cal_dot {
    display: inline-block;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    background: #e0e0e0;
    color: #777;
    line-height: 1.3;
    white-space: nowrap;
}

.ht_cal_dot_paid { background: #c8e6c9; color: #2e7d32; }
.ht_cal_dot_urgent { background: #ffe0b2; color: #e65100; }
.ht_cal_dot_overdue { background: #ffcdd2; color: #c62828; }

.ht_cal_count {
    font-size: 10px;
    color: #999;
    margin-top: 1px;
}

.ht_cal_empty {
    font-size: 12px;
    color: #ddd;
    padding: 6px 0;
}

/* 깜빡임 */
@keyframes ht_blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ht_cal_blink {
    animation: ht_blink 1.5s ease-in-out infinite;
}

.ht_cal_blink:hover {
    animation: none;
}

/* 범례 */
.ht_cal_legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.ht_cal_leg {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
}

.ht_cal_leg_dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.ht_cal_leg_overdue { background: #ef9a9a; }
.ht_cal_leg_urgent { background: #ffb74d; }
.ht_cal_leg_pending { background: #f0ddb8; }
.ht_cal_leg_paid { background: #c8e6c9; }

/* 캘린더 반응형 */
@media screen and (max-width: 1024px) {
    .ht_cal_grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .ht_cal_grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .ht_cal_cell { min-height: 50px; padding: 6px 2px 4px; }
}

@media screen and (max-width: 400px) {
    .ht_cal_grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── 필터 ── */
.ht_filter_area {
    float: left;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: clamp(16px, calc(1.25vw + 12px), 32px);
    padding: 14px 18px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    box-sizing: border-box;
}

.ht_filter_row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    flex: 1;
}

.ht_filter_actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-end;
}

.ht_btn_excel { color: #2e7d32; border-color: #2e7d32; font-size: 12px; padding: 5px 12px; }
.ht_btn_excel:hover { background: #2e7d32; color: #fff; }
.ht_btn_print { color: #555; border-color: #aaa; font-size: 12px; padding: 5px 12px; }
.ht_btn_print:hover { background: #555; color: #fff; }

.ht_search_input {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 140px;
    outline: none;
    transition: border-color 0.2s;
}
.ht_search_input:focus { border-color: #999; }

.ht_month_select {
    padding: 5px 24px 5px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.ht_filter_group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ht_filter_group label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    margin-right: 4px;
    white-space: nowrap;
}

.ht_filter_btn {
    padding: 5px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #777;
    cursor: pointer;
    transition: all 0.2s;
}
.ht_filter_btn:hover { border-color: #999; color: #333; }
.ht_filter_btn.active {
    background: #555;
    color: #fff;
    border-color: #555;
}

/* ── 테이블 ── */
.ht_scroll_wrap { float: left; width: 100%; position: relative; }

.ht_add_area {
    float: left;
    width: 100%;
    margin-top: 12px;
    margin-bottom: clamp(16px, calc(1.25vw + 12px), 32px);
}
.ht_scroll_inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ht_scroll_inner::-webkit-scrollbar { display: none; }
.ht_scroll_inner .ht_table { min-width: 1100px; }

.ht_table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(13px, calc(0.23vw + 12.3px), 15px);
    table-layout: fixed;
}

.ht_table th,
.ht_table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    text-align: center;
}

.ht_table thead th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
    border-top: 2px solid #333;
    border-bottom: 1px solid #ccc;
    font-size: 13px;
}

.ht_table thead th small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
}

.ht_th_svc {
    background: #f0f4f8 !important;
    font-size: 12px !important;
}

.ht_td_name {
    text-align: left;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-right: 24px;
}

.ht_label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: #555;
    color: #fff;
    margin-right: 3px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.ht_td_date {
    font-weight: 500;
    color: #555;
}
.ht_date_warn { color: #e67e22; font-weight: 700; }
.ht_date_urgent { color: #e74c3c; font-weight: 700; }

/* 행 경고 (30일 이내) */
.ht_tr_warn { background: #fffaf0; }
.ht_tr_urgent { background: #fff5f5; animation: ht_row_blink 2s ease-in-out infinite; }
.ht_tr_overdue { background: #fff0f0; animation: ht_row_blink 1s ease-in-out infinite; }

@keyframes ht_row_blink {
    0%, 100% { background-color: inherit; }
    50% { background-color: #ffe0e0; }
}

.ht_tr_urgent:hover,
.ht_tr_overdue:hover { animation: none; }

/* 라벨 깜빡임 */
.ht_label_blink {
    background: #e67e22;
    animation: ht_label_pulse 1.5s ease-in-out infinite;
}

.ht_label_urgent {
    background: #e74c3c;
    animation: ht_label_pulse 1s ease-in-out infinite;
}

.ht_label_overdue {
    background: #c0392b;
    animation: ht_label_pulse 0.7s ease-in-out infinite;
}

@keyframes ht_label_pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.ht_td_svc { font-size: 14px; }

.ht_td_amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.ht_td_check {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.ht_td_total {
    font-weight: 700;
    color: #333;
}

.ht_th_sub {
    font-size: 11px !important;
    background: #f8f8f8 !important;
}

.ht_empty {
    text-align: center;
    padding: 40px 20px !important;
    color: #999;
    font-size: 15px;
}

/* 체크 아이콘 */
.ht_check_toggle { cursor: pointer; font-size: 16px; }
.ht_check_on { color: #27ae60; font-weight: 700; }
.ht_check_off { color: #ccc; }

/* 서비스 뱃지 */
.ht_badge {
    display: inline-block;
    width: 22px; height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.ht_badge_hosting { background: #3498db; }
.ht_badge_ssl { background: #27ae60; }
.ht_badge_domain { background: #e67e22; }
.ht_badge_off { color: #ddd; font-size: 14px; }

/* 메모 행 */
.ht_tr_note td {
    background: #fafafa;
    text-align: left;
    font-size: 12px;
    color: #888;
    padding: 4px 12px 6px;
    border-bottom: 1px solid #eee;
}
.ht_note_icon { color: #bbb; font-style: italic; }

/* 행 호버 */
.ht_clickable { cursor: pointer; transition: background-color 0.15s; }
.ht_clickable:hover { background-color: #f5f5f5 !important; }

/* 서비스 멈춤 (비활성) */
.ht_tr_stopped td {
    opacity: 0.35;
    text-decoration: line-through;
    background: #f9f9f9;
}
.ht_tr_stopped:hover td {
    opacity: 0.6;
}

/* 연계 등록 연도 체크 */
.ht_modal_year_checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ht_year_check {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    font-size: 13px;
}
.ht_year_current {
    background: #e8f0fe;
    border-color: #4285f4;
    font-weight: 700;
}

/* 모달 멈춤 체크 강조 */
.ht_modal_check_stop input:checked + * { color: #c44; }
.ht_modal_check_stop { color: #c44; }

/* 삭제 */
.ht_row_del_btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    border-radius: 50%;
    background: none;
    color: #bbb;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    display: none;
    z-index: 2;
    border: none; padding: 0;
}
.ht_row_del_btn:hover { color: #888; }
tr:hover .ht_row_del_btn { display: block; }

/* ── 요약 ── */
.ht_summary {
    float: left;
    width: 100%;
    margin-top: clamp(20px, calc(1.56vw + 15px), 40px);
}

.ht_sum_row {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
}

.ht_sum_item {
    flex: 1;
    padding: clamp(14px, calc(1.09vw + 10.5px), 28px) clamp(10px, calc(0.78vw + 7.5px), 20px);
    text-align: center;
    border-right: 1px solid #e0e0e0;
    background: #fff;
}
.ht_sum_item:last-child { border-right: none; }

.ht_sum_num {
    display: block;
    font-size: clamp(20px, calc(0.78vw + 17.5px), 30px);
    font-weight: 700;
    color: #333;
    font-variant-numeric: tabular-nums;
}
.ht_sum_green { color: #27ae60; }
.ht_sum_red { color: #e74c3c; }

.ht_sum_detail {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.ht_sum_lbl {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #999;
    margin-top: 4px;
}

.ht_sum_svc_row {
    border: none;
    background: none;
    justify-content: center;
    gap: 20px;
}

.ht_sum_svc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* ── 하단 저장 ── */
.ht_bottom_save {
    float: left;
    width: 100%;
    margin-top: clamp(30px, calc(2.34vw + 22.5px), 60px);
    text-align: center;
}
.ht_btn_save_big {
    display: inline-block;
    width: 100%;
    max-width: 400px;
    padding: 16px 40px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: #555;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.ht_btn_save_big:hover { background: #333; }

.ht_bottom_save {
    margin-bottom: clamp(80px, calc(6.25vw + 60px), 160px);
}

/* ── 모달 ── */
.ht_modal_overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2147483640;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ht_modal_box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    position: relative;
}
.ht_modal_box.is-dragging { position: fixed; margin: 0; }

.ht_modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    cursor: grab;
    user-select: none;
}
.ht_modal_header:active { cursor: grabbing; }

.ht_modal_title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.ht_modal_close {
    width: 28px; height: 28px;
    border: none; background: none;
    font-size: 20px; color: #999;
    cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.ht_modal_close:hover { background: #f0f0f0; color: #555; }

.ht_modal_body { padding: 20px; }

.ht_modal_field { margin-bottom: 14px; }
.ht_modal_field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}
.ht_modal_field input[type="text"],
.ht_modal_field textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.ht_modal_field textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.7;
}
.ht_modal_field input:focus,
.ht_modal_field textarea:focus { border-color: #999; }
.ht_modal_field input[data-type="number"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ht_modal_divider {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    padding: 10px 0 6px;
    margin-top: 6px;
    border-top: 1px dashed #ddd;
}

.ht_modal_checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.ht_modal_check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.ht_modal_check input[type="checkbox"] {
    width: 18px; height: 18px;
    cursor: pointer;
    accent-color: #555;
}

/* 모달 가로배열 */
.ht_modal_vat_row {
    display: flex;
    gap: 8px;
}
.ht_modal_f2 { flex: 1; }
.ht_modal_f3 { flex: 1; }

.ht_modal_sub_label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

/* VAT 태그 (테이블) */
.ht_vat_tag {
    display: inline-block;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 3px;
    vertical-align: middle;
    font-weight: 600;
}
.ht_vat_done { background: #c8e6c9; color: #2e7d32; }
.ht_vat_wait { background: #fff3e0; color: #e65100; }

.ht_modal_footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
}

/* ── 토스트 ── */
.ht_toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: #444;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.ht_toast.show { transform: translateX(-50%) translateY(0); }

/* ── 청구서 버튼 ── */
.ht_btn_receipt {
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.ht_btn_receipt:hover { background: #eee; }

/* ── 영수증/청구서 모달 ── */
.ht_receipt {
    position: relative;
    padding: 4px 0;
}

.ht_rcp_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.ht_rcp_type {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 8px;
    color: #333;
}

.ht_rcp_no {
    font-size: 12px;
    color: #999;
}

.ht_rcp_stamp {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 18px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 8px;
    transform: rotate(-12deg);
    opacity: 0.7;
}

.ht_rcp_stamp_paid {
    color: #e74c3c;
    border: 3px solid #e74c3c;
}

.ht_rcp_to { margin-bottom: 12px; }
.ht_rcp_to_name { font-size: 19px; font-weight: 700; color: #333; }
.ht_rcp_divider { border-top: 2px solid #333; margin: 14px 0; }

.ht_rcp_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.ht_rcp_table th {
    background: #f5f5f5;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

.ht_rcp_table td {
    padding: 8px 10px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

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

.ht_rcp_subtotal td {
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.ht_rcp_total td {
    font-size: 16px;
    font-weight: 800;
    border-top: 2px solid #333;
    color: #333;
    padding-top: 10px;
}

.ht_rcp_info {
    margin: 14px 0;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.ht_rcp_info_row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: #555;
}

.ht_rcp_memo {
    margin: 10px 0;
    font-size: 12px;
    color: #666;
}

.ht_rcp_memo pre {
    white-space: pre-wrap;
    margin-top: 4px;
    font-family: inherit;
    background: #fafafa;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ht_rcp_footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #555;
}

.ht_rcp_actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* ── 임박 알림 패널 ── */
.ht_alert_panel {
    position: fixed;
    bottom: 24px;
    right: 84px;
    width: 340px;
    max-height: 400px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 99999;
    overflow: hidden;
    transform: translateY(120%) scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.ht_alert_panel.ht_alert_show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ht_alert_header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #e74c3c;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    animation: ht_alert_header_pulse 2s ease-in-out infinite;
}

@keyframes ht_alert_header_pulse {
    0%, 100% { background: #e74c3c; }
    50% { background: #c0392b; }
}

.ht_alert_icon {
    font-size: 20px;
    animation: ht_alert_icon_shake 0.5s ease-in-out 0.5s 3;
}

@keyframes ht_alert_icon_shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.ht_alert_close {
    margin-left: auto;
    width: 26px; height: 26px;
    border: none; background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.ht_alert_close:hover { background: rgba(255,255,255,0.4); }

.ht_alert_body {
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
}

.ht_alert_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 13px;
}
.ht_alert_item:last-child { margin-bottom: 0; }

.ht_alert_item strong {
    font-weight: 700;
    color: #333;
    flex: 1;
    margin-right: 8px;
}

.ht_alert_item span {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ht_alert_overdue {
    background: #fff0f0;
    border-left: 4px solid #e74c3c;
}
.ht_alert_overdue span { color: #e74c3c; }

.ht_alert_urgent {
    background: #fff8f0;
    border-left: 4px solid #e67e22;
}
.ht_alert_urgent span { color: #e67e22; }

@media screen and (max-width: 480px) {
    .ht_alert_panel {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
    }
}

/* ── 반응형 ── */
@media screen and (max-width: 768px) {
    .ht_top_area {
        flex-direction: column;
        align-items: stretch;
    }
    .ht_admin_btns { justify-content: flex-end; }
    .ht_filter_area { flex-direction: column; }
    .ht_sum_row { flex-direction: column; }
    .ht_sum_item { border-right: none; border-bottom: 1px solid #e0e0e0; }
    .ht_sum_item:last-child { border-bottom: none; }
}

@media screen and (max-width: 480px) {
    .ht_table th,
    .ht_table td {
        padding: 8px 4px;
        font-size: 12px;
    }
}
