/* =============================================
   일정관리 - 좌우 분할 레이아웃
   ============================================= */

.app-layout {
    padding: 0 !important;
}
.main-content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

:root {
    --rc-radius: 10px;
    --rc-border: #e5e7eb;
    --rc-bg: #f4f6f9;
    --rc-white: #fff;
    --rc-accent: #4f6ef7;
    --rc-accent-light: #eef1ff;
    --rc-text: #1e2a3a;
    --rc-text-sub: #6b7a8d;
    --rc-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ── 분할 컨테이너 ── */
.rc-split {
    display: flex;
    gap: 0;
    height: 100vh;
    box-sizing: border-box;
    background: var(--rc-bg);
}

.rc-panel {
    background: var(--rc-white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rc-list-panel {
    flex: 45;
    min-width: 0;
    border-right: 1px solid var(--rc-border);
}

.rc-detail-panel {
    flex: 55;
    min-width: 0;
}

/* ── 패널 헤더 ── */
.rc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--rc-border);
}

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

.rc-panel-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── 버튼 ── */
.rc-btn {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    background: var(--rc-white);
    color: var(--rc-text);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .15s;
}
.rc-btn:hover {
    border-color: #bbb;
    background: #f8f9fb;
}
.rc-btn-primary {
    background: var(--rc-accent);
    color: #fff;
    border-color: var(--rc-accent);
}
.rc-btn-primary:hover {
    background: #3d5ce5;
    border-color: #3d5ce5;
}

.rc-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--rc-text);
    letter-spacing: -.3px;
}

.rc-count {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--rc-accent);
    background: var(--rc-accent-light);
    padding: 3px 10px;
    border-radius: 12px;
}

/* ── 필터 ── */
.rc-filter {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--rc-border);
}

.rc-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.rc-tag {
    padding: 4px 11px;
    border: 1px solid var(--rc-border);
    border-radius: 14px;
    background: var(--rc-white);
    color: var(--rc-text-sub);
    font-size: 12.5px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.rc-tag:hover {
    border-color: var(--rc-accent);
    color: var(--rc-accent);
}
.rc-tag.active {
    background: var(--rc-accent);
    color: #fff;
    border-color: var(--rc-accent);
}

.rc-filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.rc-select {
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    background: var(--rc-white);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    color: var(--rc-text);
    cursor: pointer;
}
.rc-select:focus {
    outline: none;
    border-color: var(--rc-accent);
}

.rc-search {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}
.rc-search input {
    height: 34px;
    width: 180px;
    padding: 0 10px 0 30px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    font-size: 13.5px;
    box-sizing: border-box;
}
.rc-search input:focus {
    outline: none;
    border-color: var(--rc-accent);
}
.rc-search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    color: #aab4c2;
    pointer-events: none;
}

/* ── 테이블 ── */
.rc-table-area {
    flex: 1;
    overflow: auto;
    position: relative;
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}
.rc-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
.rc-table thead th {
    padding: 10px 10px;
    background: #f8f9fb;
    font-weight: 600;
    font-size: 15px;
    color: #000;
    text-align: center;
    border-bottom: 1px solid var(--rc-border);
    letter-spacing: .3px;
}
.rc-table tbody td {
    padding: 9px 10px;
    height: 50px;
    box-sizing: border-box;
    text-align: center;
    color: var(--rc-text);
    border-bottom: 1px solid #e5e7eb;
}
.rc-table tbody tr {
    cursor: pointer;
    transition: background .1s;
}
.rc-table tbody tr:hover {
    background: var(--rc-accent-light);
}
.rc-table tbody tr.selected {
    background: var(--rc-accent-light);
    box-shadow: inset 3px 0 0 var(--rc-accent);
}
.rc-table .text-right { text-align: right !important; }
.rc-table tbody td.text-right { padding-right: 14px; font-variant-numeric: tabular-nums; }
.rc-table thead th.text-right { padding-right: 14px; }
/* 횟수 열 — 센터정렬 명시 + 숫자 폭 고정 */
.rc-table tbody td.td-count { text-align: center !important; padding-right: 10px; font-variant-numeric: tabular-nums; }
/* 등급(3)·횟수(4)·급여 계(5) 값 굵기 550 (요청) — 이름·뱃지 열은 유지 */
.rc-table tbody td:nth-child(3),
.rc-table tbody td:nth-child(4),
.rc-table tbody td:nth-child(5) { font-weight: 550; }

/* 상태 뱃지 */
.rc-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    background: #f0f0f0;
    color: #888;
}
.rc-status-badge.active {
    background: #e8fbe8;
    color: #1d8d3f;
}

/* 일정 유무 뱃지 */
.sch-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
}
.sch-badge.has {
    background: #e8f5e9;
    color: #2e7d32;
}
.sch-badge.none {
    background: #f0f0f0;
    color: #aaa;
}

/* ── 빈 상태 ── */
.rc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--rc-text-sub);
}
.rc-empty-icon {
    font-size: 38px;
    color: #d0d5dd;
    margin-bottom: 12px;
}
.rc-empty p {
    font-size: 13.5px;
}

/* ── 우측 상세 패널 ── */
.rc-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--rc-text-sub);
}
.rc-detail-empty-icon {
    font-size: 44px;
    color: #d0d5dd;
    margin-bottom: 14px;
}
.rc-detail-empty p {
    font-size: 14px;
}

/* ── 우측 상세 래퍼 ── */
.sch-detail-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ────────────────────────────────────────────────────────────
 *  수급자 정보 헤더 (recipient-management overview 통일 스타일)
 *  sch-hdr- 접두어
 * ──────────────────────────────────────────────────────────── */
.sch-hdr {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-bottom: 1px solid var(--rc-border, #e2e8f0);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
}

.sch-hdr-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.sch-hdr-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}
.sch-hdr-name {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.sch-hdr-meta {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* LTC 칩 */
.sch-hdr-ltc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: #64748b;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
    user-select: none;
    letter-spacing: 0.02em;
}
.sch-hdr-ltc:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #6366f1;
    transform: translateY(-1px);
}
.sch-hdr-ltc i { font-size: 10.5px; }
.sch-hdr-ltc-text { font-weight: 600; }
.sch-hdr-ltc-copy { font-size: 9.5px; opacity: 0.4; transition: opacity 0.15s; }
.sch-hdr-ltc:hover .sch-hdr-ltc-copy { opacity: 1; }
.sch-hdr-ltc.is-copied {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

/* 배지 */
.sch-hdr-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.sch-hdr-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid transparent;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}
.sch-hdr-badge--grade {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    border-color: #ddd6fe;
}
.sch-hdr-badge--status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #6ee7b7;
}
.sch-hdr-badge--status-active::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.sch-hdr-badge--status-hospital { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #991b1b; border-color: #fca5a5; }
.sch-hdr-badge--status-hold     { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; border-color: #fcd34d; }
.sch-hdr-badge--status-deceased,
.sch-hdr-badge--status-terminated,
.sch-hdr-badge--status-other_org { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }

/* 진행바 */
.sch-hdr-periods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sch-hdr-period-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(120px, auto) 80px;
    align-items: center;
    gap: 14px;
}
.sch-hdr-period-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #64748b;
}
.sch-hdr-period-range {
    font-variant-numeric: tabular-nums;
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sch-hdr-period-bar {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sch-hdr-period-bar-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.sch-hdr-period-bar-fill.is-warn  { background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); box-shadow: 0 0 8px rgba(245, 158, 11, 0.35); }
.sch-hdr-period-bar-fill.is-error { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.sch-hdr-period-rem {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    text-align: right;
}
.sch-hdr-period-rem.is-warn  { color: #d97706; }
.sch-hdr-period-rem.is-error { color: #ef4444; }

/* 본인부담 + 보호자 */
.sch-hdr-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}
.sch-hdr-money {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sch-hdr-money-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sch-hdr-foot-label {
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    margin-right: 2px;
}
.sch-hdr-foot-value {
    color: #1e293b;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 14.5px;
}
.sch-hdr-divider {
    color: #cbd5e1;
    font-weight: 400;
    margin: 0 2px;
}
.sch-hdr-guardian {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: 13px;
}
.sch-hdr-guardian > i {
    width: 22px; height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    font-size: 10.5px;
    flex-shrink: 0;
}
.sch-hdr-guardian span { font-weight: 500; }

@media (max-width: 768px) {
    .sch-hdr { padding: 14px; gap: 10px; }
    .sch-hdr-name { font-size: 18px; }
    .sch-hdr-meta { font-size: 12px; }
    .sch-hdr-period-row { grid-template-columns: 34px minmax(0, 1fr) 70px; gap: 8px; }
    .sch-hdr-period-bar { display: none; }
    .sch-hdr-foot { flex-direction: column; align-items: flex-start; }
}

/* ── (legacy — 다른 곳에서 쓸 수 있어 유지) 수급자 정보 헤더 ── */
.sch-detail-hero {
    background: linear-gradient(135deg, #f5f7ff 0%, #fdf2f8 100%);
    border-bottom: 1px solid var(--rc-border);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.sch-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(99,102,241,0.08), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(236,72,153,0.06), transparent 50%);
    pointer-events: none;
}
.sch-detail-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 18px;
    z-index: 1;
}

.sch-detail-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sch-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 23px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99,102,241,0.3), 0 2px 4px rgba(99,102,241,0.15);
    letter-spacing: -0.5px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.sch-avatar:hover {
    transform: translateY(-2px) scale(1.03);
}

.sch-detail-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sch-detail-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sch-detail-name {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.sch-detail-sub {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.sch-gender {
    font-weight: 600;
    color: var(--rc-accent, #6366f1);
}

.sch-detail-ltc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(226,232,240,0.6);
    transition: all 0.2s;
}
.sch-detail-ltc:hover {
    background: #fff;
    border-color: #c4b5fd;
    color: #6366f1;
}
.sch-ltc-icon {
    font-size: 13.5px;
    color: #94a3b8;
    transition: color 0.2s;
}
.sch-detail-ltc:hover .sch-ltc-icon { color: #6366f1; }
.sch-ltc-text { font-family: inherit; }

.sch-copyable { cursor: pointer; }
.sch-copy-icon {
    font-size: 10.5px;
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.15s;
}
.sch-copyable:hover .sch-copy-icon { opacity: 1; }

.sch-detail-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.sch-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    letter-spacing: -0.1px;
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.2);
    white-space: nowrap;
}


/* ── 급여 요약 ── */
.sch-finance {
    border-bottom: 1px solid var(--rc-border);
    flex-shrink: 0;
}

.sch-finance-top {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f1f3;
}

.sch-finance-summary {
    display: flex;
    gap: 12px;
}

.sch-fin-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8f9fb;
    border: 1px solid #eef0f3;
    border-radius: 6px;
}

.sch-fin-label {
    font-size: 11.5px;
    color: var(--rc-text-sub);
    font-weight: 500;
}

.sch-fin-value {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--rc-text);
    font-variant-numeric: tabular-nums;
}
.sch-fin-value.accent {
    color: #e65100;
}

/* 본인부담 아이템 */
.sch-fin-burden {
    background: #fff8e1 !important;
    border-color: #ffe082 !important;
}
.sch-fin-value.burden {
    color: #e65100;
}

.sch-finance-tables {
    display: flex;
    gap: 0;
}

.sch-fin-table {
    flex: 1;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 0;
    font-feature-settings: "tnum";
}

.sch-fin-table th,
.sch-fin-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.sch-fin-table thead th {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    font-weight: 700;
    font-size: 12.5px;
    color: #0f172a;
    letter-spacing: -0.005em;
}

.sch-fin-table tbody td {
    color: #1e293b;
    font-weight: 500;
}

.sch-fin-table tbody td:first-child {
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
}

.sch-fin-table tbody tr:hover td {
    background: #f8fafc;
}
.sch-fin-table tbody tr:hover td:first-child {
    background: #eef2ff;
}

.sch-fin-table tfoot td {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}

.sch-fin-table tfoot .total {
    color: #4338ca;
    font-weight: 800;
    letter-spacing: -0.01em;
}


/* ── 달력 ── */
.sch-cal-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.sch-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rc-border);
    flex-shrink: 0;
}

.sch-cal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--rc-text);
    min-width: 110px;
    text-align: center;
}

.sch-cal-header-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.sch-cal-action-btn {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    background: var(--rc-white);
    color: var(--rc-text-sub);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
    white-space: nowrap;
}
.sch-cal-action-btn:hover {
    border-color: var(--rc-accent);
    color: var(--rc-accent);
    background: var(--rc-accent-light);
}
/* ── 일정 추가 버튼 ── */
.sch-add-schedule-btn {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
    border-color: transparent !important;
}
.sch-add-schedule-btn:hover {
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.sch-alarm-btn {
    color: #f9a825;
    border-color: #ffe082;
}
.sch-alarm-btn:hover {
    background: #fff8e1;
    border-color: #ffc107;
    color: #f57f17;
}

.sch-cal-nav {
    width: 30px;
    height: 30px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    background: var(--rc-white);
    color: var(--rc-text-sub);
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.sch-cal-nav:hover {
    border-color: var(--rc-accent);
    color: var(--rc-accent);
    background: var(--rc-accent-light);
}

.sch-cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    flex: 1;
}

.sch-cal-table thead th {
    padding: 10px 4px;
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    border-bottom: 1px solid var(--rc-border);
    background: #f8f9fb;
    letter-spacing: -0.005em;
}
.sch-cal-table thead th.sun { color: #e53935; }
.sch-cal-table thead th.sat { color: #1e88e5; }

.sch-cal-table tbody td {
    border: 1px solid #e5e7eb;
    vertical-align: top;
    padding: 5px 6px;
    height: 78px;
    font-size: 13px;
    cursor: pointer;
    transition: background .1s;
}
.sch-cal-table tbody td:hover {
    background: #f5f7ff;
}
.sch-cal-table tbody td.empty {
    background: #fafbfc;
    cursor: default;
}
.sch-cal-table tbody td.today {
    background: #fffde7;
}

.sch-cal-day-num {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--rc-text);
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}
.sch-cal-day-num.sun { color: #e53935; }
.sch-cal-day-num.sat { color: #1e88e5; }

.sch-cal-day-content {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 캘린더 일정 이벤트 */
.sch-cal-event {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 4px;
    background: #e8f5e9;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sch-cal-ev-time {
    font-weight: 700;
    color: #2e7d32;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}
.sch-cal-ev-type {
    color: #4a7c4f;
    font-size: 11.5px;
    font-weight: 500;
}
.sch-cal-event.planned { background: #e3f2fd; }
.sch-cal-event.planned .sch-cal-ev-time { color: #1565c0; }
.sch-cal-event.planned .sch-cal-ev-type { color: #42a5f5; }
.sch-cal-event.absent { background: #ffebee; }
.sch-cal-event.absent .sch-cal-ev-time { color: #c62828; }
.sch-cal-event.absent .sch-cal-ev-type { color: #e57373; }
.sch-cal-event.late { background: #fff3e0; }
.sch-cal-event.late .sch-cal-ev-time { color: #e65100; }
.sch-cal-event.late .sch-cal-ev-type { color: #ff9800; }
.sch-cal-event.early { background: #fff8e1; }
.sch-cal-event.early .sch-cal-ev-time { color: #f57f17; }
.sch-cal-event.overtime { background: #ede7f6; }
.sch-cal-event.overtime .sch-cal-ev-time { color: #4527a0; }
.sch-cal-event.unplanned { background: #fce4ec; }
.sch-cal-event.unplanned .sch-cal-ev-time { color: #ad1457; }

.sch-cal-more {
    font-size: 9.5px;
    color: var(--rc-accent);
    font-weight: 600;
    padding-left: 3px;
}

.sch-cal-day.has-schedule {
    background: #fafffe;
}
.sch-cal-day.has-schedule:hover {
    background: #f0f7ff;
}

/* 일정 유무 뱃지 (목록용) */
.sch-list-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}
.sch-list-badge.has {
    background: #e8f5e9;
    color: #2e7d32;
}
.sch-list-badge.none {
    background: #f5f5f5;
    color: #bbb;
}

/* 등급 뱃지 */
.sch-grade-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    letter-spacing: -0.1px;
    box-shadow: 0 2px 8px rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.2);
    white-space: nowrap;
}

/* 이름 볼드 */
.td-name {
    font-weight: 700;
    color: var(--rc-text);
}
.td-birth {
    font-size: 12px;
    color: var(--rc-text-sub);
    white-space: nowrap;
}

/* 잔액 음수 */
.sch-fin-value.negative {
    color: #c62828 !important;
}

/* ── 알림 벨 (캘린더 날짜) ── */
.sch-alarm-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 3px;
    cursor: pointer;
    color: #f9a825;
    font-size: 10.5px;
    animation: schBellShake 2s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes schBellShake {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(8deg); }
    90% { transform: rotate(-8deg); }
    95% { transform: rotate(4deg); }
}

/* ── 알림 목록 오버레이 ── */
.sch-alarm-list-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sch-alarm-list {
    background: #fff;
    border-radius: 12px;
    width: 420px;
    max-height: 70vh;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sch-alarm-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: #fff8e1;
}
.sch-alarm-list-header strong {
    font-size: 16px;
    color: #e65100;
}
.sch-alarm-close {
    background: none;
    border: none;
    font-size: 23px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.sch-alarm-close:hover { color: #333; }

.sch-alarm-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
}
.sch-alarm-empty {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 13.5px;
}
.sch-alarm-item {
    padding: 10px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fafafa;
    transition: background .1s;
}
.sch-alarm-item:hover { background: #fff8e1; }

.sch-alarm-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sch-alarm-item-top strong {
    font-size: 13.5px;
    color: var(--rc-text);
}
.sch-alarm-sent-badge {
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}
.sch-alarm-item-meta {
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--rc-text-sub);
    margin-bottom: 4px;
}
.sch-alarm-item-meta i { margin-right: 3px; }
.sch-alarm-item-content {
    font-size: 12.5px;
    color: #555;
    margin-top: 4px;
    padding: 6px 8px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
}
.sch-alarm-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}
.sch-alarm-item-actions button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11.5px;
    color: #888;
    cursor: pointer;
    transition: all .15s;
}
.sch-alarm-item-actions button:hover {
    border-color: var(--rc-accent);
    color: var(--rc-accent);
}

/* ── 알림 폼 모달 ── */
.sch-alarm-form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sch-alarm-form {
    background: #fff;
    border-radius: 12px;
    width: 420px;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    overflow: hidden;
}
.sch-alarm-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: #fff8e1;
}
.sch-alarm-form-header strong {
    font-size: 16px;
    color: #e65100;
}
.sch-alarm-form-body {
    padding: 16px 18px;
}
.sch-alarm-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--rc-text-sub);
    margin-bottom: 4px;
    margin-top: 10px;
}
.sch-alarm-label:first-child { margin-top: 0; }
.sch-alarm-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    font-size: 13.5px;
    font-family: inherit;
    box-sizing: border-box;
}
.sch-alarm-input:focus {
    outline: none;
    border-color: var(--rc-accent);
}
.sch-alarm-staff-wrap {
    position: relative;
}
.sch-alarm-staff-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #e8eaf6;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 6px;
}
.sch-alarm-staff-clear {
    background: none;
    border: none;
    font-size: 17px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.sch-alarm-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #eee;
}
.sch-alarm-btn-cancel {
    padding: 8px 16px;
    border: 1px solid var(--rc-border);
    border-radius: 6px;
    background: #fff;
    color: var(--rc-text-sub);
    font-size: 13.5px;
    cursor: pointer;
}
.sch-alarm-btn-cancel:hover { background: #f5f5f5; }
.sch-alarm-btn-save {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #f9a825;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.sch-alarm-btn-save:hover { background: #f57f17; }

/* ── 일정 추가 모달 ── */
.sch-add-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(3px);
    z-index: 10000; display: none; align-items: center; justify-content: center; padding: 24px;
}
.sch-add-overlay.open { display: flex; }
.sch-add-modal {
    background: #fff; border-radius: 14px; width: 100%; max-width: 520px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18); animation: schAddIn 0.2s ease;
}
@keyframes schAddIn { from { opacity:0; transform: translateY(16px) scale(0.97); } to { opacity:1; transform: none; } }
.sch-add-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.sch-add-header h3 { font-size: 16px; font-weight: 700; color: #1e293b; margin: 0; }
.sch-add-header h3 i { color: #667eea; margin-right: 6px; }
.sch-add-close { width: 30px; height: 30px; border: none; background: none; font-size: 21px; color: #9ca3af; cursor: pointer; border-radius: 6px; }
.sch-add-close:hover { background: #f3f4f6; color: #374151; }
.sch-add-body { padding: 20px; }
.sch-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sch-add-field { display: flex; flex-direction: column; gap: 5px; }
.sch-add-field label { font-size: 12.5px; font-weight: 600; color: #475569; }
.sch-add-field label .req { color: #ef4444; }
.sch-add-input {
    padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13.5px; color: #1e293b; background: #fff; font-family: inherit; transition: border-color 0.15s;
}
.sch-add-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.08); }
textarea.sch-add-input { resize: vertical; }
.sch-add-footer {
    display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #e5e7eb;
}
.sch-add-btn {
    padding: 9px 18px; border: none; border-radius: 8px; font-size: 13.5px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-family: inherit; transition: all 0.15s;
}
.sch-add-btn--cancel { background: #f3f4f6; color: #6b7280; }
.sch-add-btn--cancel:hover { background: #e5e7eb; }
.sch-add-btn--save { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.sch-add-btn--save:hover { box-shadow: 0 3px 10px rgba(102,126,234,0.3); }

/* ── 일정 수정 모달 (달력 셀 클릭) ── */
.sch-edit-empty { padding: 26px 8px; text-align: center; color: #9ca3af; font-size: 13.5px; }
.sch-edit-list { display: flex; flex-direction: column; gap: 10px; }
.sch-edit-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fafbfc;
}
.sch-edit-item-info { min-width: 0; flex: 1; }
.sch-edit-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sch-edit-item-time { font-weight: 700; color: #1e293b; font-size: 14px; font-variant-numeric: tabular-nums; }
.sch-edit-item-type { color: #64748b; font-size: 13px; font-weight: 500; }
.sch-edit-item-visitor { margin-top: 4px; color: #475569; font-size: 12.5px; }
.sch-edit-item-visitor i { color: #94a3b8; margin-right: 3px; }
.sch-edit-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sch-edit-badge.is-done { background: #dcfce7; color: #166534; }
.sch-edit-badge.is-plan { background: #e3f2fd; color: #1565c0; }
.sch-edit-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sch-edit-btn {
    padding: 7px 12px; border: none; border-radius: 8px; font-size: 12.5px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; transition: all 0.15s;
}
.sch-edit-btn--edit { background: #eef2ff; color: #4f46e5; }
.sch-edit-btn--edit:hover { background: #e0e7ff; }
.sch-edit-btn--done { background: #22c55e; color: #fff; }
.sch-edit-btn--done:hover { background: #16a34a; }
.sch-edit-btn--del { background: #fee2e2; color: #b91c1c; }
.sch-edit-btn--del:hover { background: #fecaca; }
.sch-edit-note { font-size: 11.5px; color: #94a3b8; white-space: nowrap; }

/* 인라인 시간수정 폼 */
.sch-edit-item--editing { display: block; background: #fff; border-color: #c7d2fe; }
.sch-edit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sch-edit-form-grid label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 11.5px; font-weight: 600; color: #475569;
}
.sch-edit-form-grid input,
.sch-edit-form-grid select {
    padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px;
    font-size: 13px; color: #1e293b; background: #fff; font-family: inherit;
}
.sch-edit-form-grid input:focus,
.sch-edit-form-grid select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.08); }
.sch-edit-form-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.sch-edit-btn--save { background: #22c55e; color: #fff; }
.sch-edit-btn--save:hover { background: #16a34a; }
.sch-edit-btn--cancel { background: #f1f5f9; color: #64748b; }
.sch-edit-btn--cancel:hover { background: #e2e8f0; }

/* 일정이 있는 달력 셀은 클릭 가능 표시 */
.sch-cal-day.has-schedule { cursor: pointer; }

/* ── 모바일 반응형 ── */
@media (max-width: 768px) {
    /* 모바일 바 아래부터 풀화면 */
    .app-layout { padding-top: var(--mobile-bar-h) !important; }
    .main-content {
        height: calc(100dvh - var(--mobile-bar-h));
        overflow: hidden;
    }

    /* 리스트 풀화면 */
    .rc-split {
        display: block;
        height: 100%;
        overflow: hidden;
    }

    .rc-list-panel {
        height: 100%;
        max-height: none;
        border-right: none;
        border-bottom: none;
        display: flex;
        flex-direction: column;
    }

    /* 테이블 폰트 크기 축소 */
    .rc-table { font-size: 13px; }
    .rc-table thead th { font-size: 12px; }

    /* 등급(3)·횟수(4) 숨김 — 상태·이름·급여계·일정만 표시 */
    .rc-table th:nth-child(3),
    .rc-table td:nth-child(3),
    .rc-table th:nth-child(4),
    .rc-table td:nth-child(4) { display: none; }

    .rc-table { table-layout: fixed; width: 100%; }
    .rc-table th:nth-child(1), .rc-table td:nth-child(1) { width: 18%; text-align: center; }
    .rc-table th:nth-child(2), .rc-table td:nth-child(2) { width: auto; text-align: center; }
    .rc-table th:nth-child(5), .rc-table td:nth-child(5) { width: 28%; text-align: center; }
    .rc-table th:nth-child(6), .rc-table td:nth-child(6) { width: 18%; text-align: center; }

    /* 상세 패널: 풀스크린 모달 — flex 컬럼 (백바 고정 + 본문 스크롤) */
    .rc-detail-panel {
        position: fixed;
        inset: 0;
        z-index: 1100;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        background: var(--rc-white);
        display: flex;
        flex-direction: column;
    }
    .rc-detail-panel.mobile-open {
        transform: translateX(0);
    }
    .rc-detail-panel > .sch-detail-wrap {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .rc-detail-panel > .rc-detail-empty {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
    }

    /* 모바일 뒤로가기 + 닫기 바 */
    .sch-mobile-back {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 14px;
        background: #f8fafc;
        border-bottom: 1px solid var(--rc-border);
        position: sticky;
        top: 0;
        z-index: 1;
        flex-shrink: 0;
    }
    .sch-mobile-back button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }
    .sch-mobile-back-btn {
        display: flex;
        align-items: center;
        gap: 7px;
        color: #4f46e5;
        font-size: 14px;
        font-weight: 600;
    }
    .sch-mobile-close-btn {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        border-radius: 8px !important;
        border: 1px solid var(--rc-border) !important;
        background: #fff !important;
        color: #64748b;
        font-size: 14px;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .sch-mobile-close-btn:hover {
        background: #fef2f2 !important;
        color: #ef4444;
        border-color: #fecaca !important;
    }

    /* 월설정·이름검색만 표시, 나머지 필터 숨김 */
    #filterStatus,
    #filterGrade,
    #filterGroup { display: none !important; }

    .rc-filter-bar {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    #filterMonth {
        flex: 0 0 auto;
    }

    .rc-search {
        flex: 1;
        margin-left: 0;
    }
    .rc-search input {
        width: 100%;
    }

    /* ── 상세 패널: 급여 요약 컴팩트화 ── */
    .sch-finance-top { padding: 8px 10px; }
    .sch-finance-summary {
        flex-wrap: wrap;
        gap: 6px;
    }
    .sch-fin-item {
        flex: 1 1 calc(50% - 3px);
        min-width: 0;
        padding: 6px 10px;
        gap: 6px;
        justify-content: space-between;
        background: #f8f9fb;
        overflow: hidden;
    }
    .sch-fin-label {
        font-size: 10.5px;
        white-space: nowrap;
    }
    .sch-fin-value {
        font-size: 13px;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    /* ── 두 테이블 — 모바일 숨김 (사용자 요청) ── */
    .sch-finance-tables { display: none; }

    /* ── 모달 내부 콘텐츠가 자연 흐름으로 쌓이게 (스크롤은 .rc-detail-panel > .sch-detail-wrap 이 담당) ── */
    .sch-cal-area {
        flex: 0 0 auto;
        overflow: visible;
        min-height: 0;
    }

    /* ── 달력 헤더 정렬 ── */
    .sch-cal-header {
        gap: 6px;
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    .sch-cal-title {
        font-size: 14px;
        min-width: auto;
        flex: 1 1 auto;
    }
    .sch-cal-nav { width: 28px; height: 28px; }
    .sch-cal-header-actions {
        margin-left: 0;
        width: 100%;
        gap: 6px;
    }
    .sch-cal-header-actions .sch-cal-action-btn {
        flex: 1 1 0;
        justify-content: center;
        height: 30px;
        padding: 0 8px;
        font-size: 11.5px;
    }

    /* ── 달력 셀 컴팩트 ── */
    .sch-cal-table tbody td {
        height: 60px;
        padding: 3px 3px;
    }
    .sch-cal-day-num { font-size: 11.5px; margin-bottom: 1px; }
    .sch-cal-event {
        padding: 1px 2px;
        font-size: 9px;
        gap: 1px;
    }
    .sch-cal-ev-time, .sch-cal-ev-type { font-size: 9px; }
}

/* 데스크탑에서 뒤로가기 버튼 숨김 (모바일 @media 가 위에서 display:flex 로 오버라이드) */
@media (min-width: 769px) {
    .sch-mobile-back { display: none; }
}

/* ── 일정 추가/수정 모달 — 좁은 화면에서 입력칸이 모달 밖으로 밀려나던 것 ──
   grid item 의 기본 min-width:auto 때문에 time/number input 의 «내용 최소폭» 이
   1fr 트랙을 밀어내 오른쪽 칸이 모달을 뚫고 나갔다. */
.sch-add-field { min-width: 0; }
.sch-add-input { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 560px) {
    .sch-add-overlay { padding: 12px; }
    .sch-add-body    { padding: 16px; }
}
