/* SY.N ERP 공통 스타일 (색상·글꼴의 기본값은 Components/Layout/ErpTheme.cs) */

html, body {
    font-family: Pretendard, 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', system-ui, sans-serif;
}

/* 상단바: 흰 배경 + 아래쪽 얇은 선 */
.erp-appbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.erp-brand {
    letter-spacing: 0.02em;
}

/* 사이드바 메뉴 */
.erp-nav .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(59, 130, 246, 0.18);
    color: #FFFFFF;
}

.erp-nav .mud-nav-link-disabled, .erp-nav .mud-nav-link-disabled * {
    color: #7C8AA0 !important; /* 어두운 사이드바에서도 보이도록 (아직 만들지 않은 메뉴) */
}

.erp-stage-chip {
    color: #94A3B8 !important;
    border-color: #475569 !important;
    font-size: 0.7rem !important;
    height: 20px !important;
}

/* 상단바 사용자 메뉴의 로그아웃 버튼(폼 버튼을 메뉴 항목처럼 보이게) */
.erp-logout-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 6px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.erp-logout-button:hover {
    background-color: var(--mud-palette-action-default-hover);
}

/* ── 계정 화면(로그인·비밀번호 변경 등) ─────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
    color: #1E293B;
}

.auth-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1D4ED8;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: #64748B;
    margin-bottom: 20px;
}

.auth-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 14px 0 6px;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    outline: none;
}

.auth-input:focus {
    border-color: #1D4ED8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.auth-button {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    background: #1D4ED8;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.auth-button:hover {
    background: #1E40AF;
}

.auth-alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-alert.error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.auth-alert.success { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.auth-alert.info { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

.auth-hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #64748B;
}

.auth-footnote {
    margin-top: 22px;
    font-size: 0.78rem;
    color: #64748B;
    line-height: 1.6;
}

.auth-links {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.auth-links a { color: #1D4ED8; text-decoration: none; }
.auth-inline-form { margin: 0; margin-left: auto; }

.auth-link-button {
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.auth-shell .validation-message {
    font-size: 0.8rem;
    margin-top: 4px;
}

/* 오류 안내 띠 (Blazor 기본) */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* 입력값 검증 표시 (계정 화면용) */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* 대시보드 */
.erp-stat-card { height: 100%; }
.erp-kv-table th { width: 96px; text-align: left; color: var(--mud-palette-text-secondary); font-weight: 600; vertical-align: top; }


/* 서식 있는 본문 보기 (공지·회의록 등) */
.erp-content { line-height: 1.7; word-break: keep-all; overflow-x: auto; }
.erp-content p { margin: 0 0 0.6rem; }
.erp-content ul { list-style: disc; margin: 0 0 0.8rem 1.5rem; }
.erp-content ol { list-style: decimal; margin: 0 0 0.8rem 1.5rem; }
.erp-content table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.erp-content th, .erp-content td { border: 1px solid #D5DBE3; padding: 6px 10px; vertical-align: top; }
.erp-content th { background: #F4F6F9; text-align: left; font-weight: 600; }
.erp-content img { max-width: 100%; height: auto; }
.erp-content blockquote { border-left: 3px solid #CBD5E1; background: #F8FAFC; padding: 0.6rem 1rem; margin: 0.8rem 0; color: #374151; }
.erp-content { color: #1F2937; font-size: 0.92rem; }
.erp-content h1, .erp-content h2, .erp-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.2rem 0 0.5rem; color: #111827; }
.erp-content h4, .erp-content h5 { font-size: 0.95rem; font-weight: 700; margin: 1rem 0 0.4rem; color: #111827; }
.erp-editor-wrap .jodit-container { font-family: inherit; }

/* 공용 달력 */
.erp-calendar .fc { font-size: 0.85rem; }
.erp-calendar .fc .fc-toolbar-title { font-size: 1.2rem; font-weight: 700; }
.erp-calendar .fc .fc-day-sun .fc-daygrid-day-number, .erp-calendar .fc .fc-col-header-cell.fc-day-sun { color: #DC2626; }
.erp-calendar .fc .fc-day-sat .fc-daygrid-day-number, .erp-calendar .fc .fc-col-header-cell.fc-day-sat { color: #2563EB; }
.erp-calendar .fc .fc-event { cursor: pointer; }

/* ── 그룹웨어식 입력·보기 표 (FormTable / FormRow / FormSection) ── */
.erp-form { background: #fff; border: 1px solid #D5DBE3; border-radius: 4px; margin-bottom: 16px; }
.erp-form-title { padding: 10px 14px; font-weight: 700; border-bottom: 1px solid #D5DBE3; background: #F7F9FB; }
.erp-form-grid { display: grid; grid-template-columns: 1fr 1fr; }
.erp-form-row { grid-column: span 2; display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid #E5E9EF; min-height: 44px; }
.erp-form-row.half { grid-column: span 1; }
.erp-form-grid > .erp-form-row:last-child { border-bottom: none; }
.erp-form-label { background: #F4F6F9; color: #374151; font-weight: 600; font-size: 0.85rem; padding: 10px 12px; display: flex; align-items: center; border-right: 1px solid #E5E9EF; }
.erp-form-field { padding: 6px 10px; display: flex; align-items: center; min-width: 0; font-size: 0.9rem; }
.erp-form-field > * { width: 100%; }
.erp-form-field .mud-input-control { margin-top: 0 !important; }
.erp-required { color: #DC2626; margin-left: 2px; }
@media (max-width: 760px) {
    .erp-form-grid { grid-template-columns: 1fr; }
    .erp-form-row, .erp-form-row.half { grid-column: span 1; grid-template-columns: 1fr; }
    .erp-form-label { border-right: none; padding: 6px 10px; }
}

.erp-section { margin-bottom: 18px; }
.erp-section-head { display: flex; align-items: center; border-bottom: 2px solid #334155; padding-bottom: 6px; margin-bottom: 10px; }
.erp-section-title { font-weight: 700; font-size: 0.95rem; color: #1E293B; flex: 1; }
.erp-section-body { font-size: 0.9rem; }

/* 문서 보기 머리말 */
.erp-doc-head { border-bottom: 1px solid #D5DBE3; padding-bottom: 12px; margin-bottom: 16px; }
.erp-doc-title { font-size: 1.25rem; font-weight: 700; color: #111827; }
.erp-doc-meta { color: #6B7280; font-size: 0.85rem; margin-top: 4px; }
.erp-numbered { margin: 0; padding-left: 1.4rem; }
.erp-numbered li { padding: 3px 0; }
.erp-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.erp-table th { background: #F4F6F9; font-weight: 600; color: #374151; text-align: left; }
.erp-table th, .erp-table td { border: 1px solid #E0E5EC; padding: 6px 8px; vertical-align: middle; }
.erp-overdue { color: #DC2626; font-weight: 600; }

.erp-tag { display: inline-block; font-size: 0.75rem; color: #475569; border: 1px solid #CBD5E1; border-radius: 3px; padding: 1px 6px; background: #F8FAFC; white-space: nowrap; }


.erp-priority { white-space: nowrap; display: inline-block; font-size: 0.72rem; font-weight: 600; border-radius: 3px; padding: 0 5px; margin-right: 6px; border: 1px solid; vertical-align: middle; line-height: 1.5; }
.erp-priority.normal { color: #6B7280; border-color: #D1D5DB; }
.erp-priority.important { color: #B45309; border-color: #F59E0B; }
.erp-priority.urgent { color: #fff; background: #DC2626; border-color: #DC2626; }


/* 번호 목록 입력 */
.erp-linelist-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.erp-linelist-no { width: 22px; text-align: right; color: #6B7280; font-size: 0.85rem; }


/* 회의록 안건 블록 */
.erp-agenda { border-top: 1px solid #D5DBE3; }
.erp-agenda-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #FAFBFC; border-bottom: 1px solid #E5E9EF; }
.erp-agenda-no { font-weight: 700; white-space: nowrap; color: #1E293B; min-width: 52px; }


.erp-thumb { object-fit: cover; border: 1px solid #D5DBE3; border-radius: 4px; cursor: zoom-in; background: #F4F6F9; }
.erp-row-inactive td { color: #9CA3AF !important; }


/* 진행 단계 요약 카드(목록 상단) */
.erp-summary { display: flex; flex-wrap: wrap; border: 1px solid #D5DBE3; border-radius: 4px; background: #fff; }
.erp-summary-item { flex: 1; min-width: 100px; padding: 8px 12px; border-right: 1px solid #E5E9EF; cursor: pointer; }
.erp-summary-item:last-child { border-right: none; }
.erp-summary-item.active { background: #EFF4FB; box-shadow: inset 0 -2px 0 #1D4ED8; }
.erp-summary-label { font-size: 0.78rem; color: #6B7280; }
.erp-summary-value { font-size: 1.15rem; font-weight: 700; color: #111827; }

/* 진행 단계 표시(상세) */
.erp-steps { display: flex; border: 1px solid #D5DBE3; border-radius: 4px; overflow: hidden; }
.erp-step { flex: 1; padding: 8px 10px; background: #F9FAFB; border-right: 1px solid #E5E9EF; text-align: center; }
.erp-step:last-child { border-right: none; }
.erp-step.done { background: #EFF4FB; }
.erp-step-name { font-size: 0.8rem; font-weight: 600; color: #374151; }
.erp-step.done .erp-step-name { color: #1D4ED8; }
.erp-step-date { font-size: 0.78rem; color: #6B7280; }

/* 상태 표시 */
.erp-status { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 3px; padding: 1px 6px; border: 1px solid; white-space: nowrap; }
.erp-status.wait { color: #6B7280; border-color: #D1D5DB; }
.erp-status.progress { color: #1D4ED8; border-color: #93C5FD; background: #EFF6FF; }
.erp-status.done { color: #374151; border-color: #D1D5DB; background: #F3F4F6; }

/* 진행률 막대 */
.erp-progress { height: 6px; background: #E5E9EF; border-radius: 3px; overflow: hidden; }
.erp-progress-bar { height: 100%; background: #3B82F6; }


/* 유지보수 긴급도 */
.erp-urgency { display: inline-block; min-width: 22px; text-align: center; font-size: 0.75rem; font-weight: 700; border-radius: 3px; padding: 0 5px; border: 1px solid; }
.erp-urgency.high { color: #fff; background: #DC2626; border-color: #DC2626; }
.erp-urgency.mid { color: #B45309; border-color: #F59E0B; }
.erp-urgency.low { color: #6B7280; border-color: #D1D5DB; }


/* 순위 표(통계) */
.erp-rank { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.erp-rank td { padding: 3px 4px; vertical-align: middle; }
.erp-rank-no { width: 24px; color: #9CA3AF; text-align: right; }
.erp-rank-name { width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.erp-rank-bar div { height: 12px; background: #2a78d6; border-radius: 0 4px 4px 0; min-width: 2px; }
.erp-rank-value { width: 90px; text-align: right; white-space: nowrap; }
.erp-rank-sub { color: #6B7280; font-size: 0.75rem; }


/* 한글이 좁은 칸에서 한 글자씩 줄바꿈되어 세로로 보이는 현상 방지 (전 화면 공통) */
.mud-table-cell, .erp-table th, .erp-table td, .erp-form-label, .erp-form-field, .erp-summary-label { word-break: keep-all; }
.mud-table-head .mud-table-cell, .erp-table thead th { white-space: nowrap; }
.erp-form-label { white-space: nowrap; }
.erp-form-field .mud-radio-group, .erp-form-field .mud-radio-group > div { display: flex; flex-wrap: wrap; column-gap: 4px; }
.mud-radio, .mud-checkbox, .mud-button-root, .erp-status, .erp-urgency { white-space: nowrap; flex-shrink: 0; }
.erp-scroll-x { overflow-x: auto; }
.erp-scroll-x > table { min-width: 720px; }
/* 그래프: 축 글자·범례가 아래 표와 겹치지 않도록 자리 확보 */
.erp-chart-box { height: 340px; padding-bottom: 24px; overflow: hidden; }
.erp-chart-box svg { overflow: visible; }

/* 전자결재 결재란 (화면) */
.erp-stamp { border-collapse: collapse; font-size: 0.8rem; background: #fff; }
.erp-stamp th, .erp-stamp td { border: 1px solid #9CA3AF; text-align: center; padding: 3px 6px; min-width: 76px; }
/* '결재' 칸: 세로쓰기(writing-mode)는 표 칸에서 잘릴 수 있어 글자를 한 자씩 쌓음 */
.erp-stamp .erp-stamp-side { min-width: 28px; width: 28px; padding: 4px 2px; background: #F4F6F9; color: #374151; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.erp-stamp .erp-stamp-side span { display: block; }
.erp-scroll-x > table.erp-stamp { min-width: 0; }
.erp-stamp th { background: #F4F6F9; font-weight: 600; white-space: nowrap; color: #374151; }
.erp-stamp .erp-stamp-sign { height: 44px; font-weight: 700; white-space: nowrap; }
.erp-stamp .erp-stamp-sign.approved { color: #1D4ED8; }
.erp-stamp .erp-stamp-sign.rejected { color: #B91C1C; }
.erp-stamp .erp-stamp-sign.pending { color: #B45309; font-weight: 600; }
.erp-stamp .erp-stamp-sign.waiting { color: #9CA3AF; font-weight: 400; }
.erp-stamp .erp-stamp-date { font-size: 0.72rem; color: #6B7280; white-space: nowrap; }
.erp-line-list { border: 1px solid #E0E5EC; border-radius: 4px; }
.erp-line-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid #EEF1F5; }
.erp-line-item:last-child { border-bottom: none; }
.erp-line-no { width: 22px; color: #6B7280; font-size: 0.8rem; text-align: right; }
/* 메뉴 옆 건수, 알림함 */
.erp-nav-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: #DC2626; color: #fff; font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 18px; }
.erp-noti-list { max-height: 420px; overflow-y: auto; }
.erp-noti-item { max-width: 360px; white-space: normal; word-break: keep-all; }
.erp-noti-item .erp-noti-msg { font-size: 0.85rem; color: #111827; font-weight: 600; }
.erp-noti-item.read .erp-noti-msg { color: #6B7280; font-weight: 400; }
.erp-noti-item .erp-noti-time { font-size: 0.72rem; color: #9CA3AF; }
/* 카드 목록 (표준 양식) */
.erp-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.erp-card { background: #fff; border: 1px solid #D5DBE3; border-radius: 4px; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.erp-card:hover { border-color: #93C5FD; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.erp-card-thumb { height: 140px; background: #F4F6F9; display: flex; align-items: center; justify-content: center; color: #9CA3AF; font-size: 0.8rem; border-bottom: 1px solid #E5E9EF; }
.erp-card-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.erp-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; word-break: keep-all; }
.erp-card-title { font-weight: 700; color: #111827; }
.erp-card-desc { font-size: 0.82rem; color: #4B5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.erp-card-meta { font-size: 0.75rem; color: #9CA3AF; }
/* 좁은 칸 줄바꿈 방지 추가 (표 머리글, 계정·알림 버튼) */
.mud-simple-table th { white-space: nowrap; }
.erp-account-button { text-transform: none !important; font-weight: 500 !important; }
.erp-bell { position: relative; background: none; border: none; cursor: pointer; color: inherit; padding: 8px; border-radius: 50%; display: inline-flex; align-items: center; }
.erp-bell:hover { background: rgba(0,0,0,0.06); }
.erp-bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #DC2626; color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center; }
/* 숫자 칸의 위·아래 화살표가 칸을 넘지 않도록 숨김 (값은 직접 입력) */
.erp-table .mud-input-numeric-spin { display: none; }
/* 목록 표: 한 줄 표시(넓으면 가로 스크롤), 제목·증상 같은 긴 글 칸만 줄바꿈 */
.mud-table-root .mud-table-body .mud-table-cell, .mud-table-root .mud-table-head .mud-table-cell { white-space: nowrap; }
.mud-table-root .mud-table-body .mud-table-cell.erp-wrap { white-space: normal; min-width: 200px; word-break: keep-all; }
/* 결재 본문 표: 항목 이름(기안 목적·세부 내용 등)은 한 줄 */
.erp-approval-body > tbody > tr > th { white-space: nowrap; }
/* 가입 신청 화면 */
.auth-required { color: #DC2626; }
.auth-field-hint { margin-top: 4px; font-size: 0.76rem; color: #64748B; }
.auth-subtitle { word-break: keep-all; }
/* 프로젝트 타임라인 (간트): 왼쪽 프로젝트 이름 칸은 고정, 오른쪽 기간은 가로 스크롤 */
.tl-wrap { overflow-x: auto; border: 1px solid #D5DBE3; border-radius: 4px; background: #fff; }
.tl-grid { position: relative; }
.tl-row { display: flex; border-bottom: 1px solid #EEF1F5; min-height: 40px; }
.tl-row:last-child { border-bottom: none; }
.tl-label { width: 240px; min-width: 240px; padding: 4px 8px; box-sizing: border-box; background: #fff; border-right: 1px solid #D5DBE3; overflow: hidden; }
.tl-sticky { position: sticky; left: 0; z-index: 3; }
.tl-name { display: block; font-size: 0.85rem; font-weight: 600; color: #111827; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name:hover { text-decoration: underline; }
.tl-sub { font-size: 0.74rem; color: #6B7280; white-space: nowrap; }
.tl-track { position: relative; flex: none; }
.tl-head { min-height: 44px; background: #F4F6F9; position: sticky; top: 0; z-index: 4; }
.tl-head .tl-label { background: #F4F6F9; font-size: 0.8rem; font-weight: 600; color: #374151; display: flex; align-items: center; }
.tl-month { position: absolute; top: 0; height: 22px; line-height: 22px; font-size: 0.75rem; font-weight: 600; color: #374151; border-left: 1px solid #D5DBE3; padding-left: 4px; box-sizing: border-box; white-space: nowrap; overflow: hidden; }
.tl-day, .tl-week { position: absolute; top: 22px; height: 22px; line-height: 22px; font-size: 0.68rem; color: #6B7280; text-align: center; border-left: 1px solid #E5E9EF; box-sizing: border-box; white-space: nowrap; }
.tl-week { text-align: left; padding-left: 2px; }
.tl-day.sat { color: #1D4ED8; }
.tl-day.holiday { color: #DC2626; background: #FEF2F2; }
.tl-off { position: absolute; top: 0; bottom: 0; background: #F8FAFC; }
.tl-bar { position: absolute; top: 12px; height: 16px; border-radius: 3px; overflow: hidden; box-sizing: border-box; }
.tl-bar.ready { background: #E5E7EB; border: 1px solid #9CA3AF; }
.tl-bar.progress { background: #DBEAFE; border: 1px solid #3B82F6; }
.tl-bar.done { background: #DCFCE7; border: 1px solid #16A34A; }
.tl-bar.overdue { border: 2px solid #DC2626; }
.tl-bar-fill { height: 100%; background: rgba(30, 64, 175, 0.35); }
.tl-bar.done .tl-bar-fill { background: rgba(22, 101, 52, 0.35); }
.tl-bar.ready .tl-bar-fill { background: rgba(75, 85, 99, 0.3); }
.tl-ms { position: absolute; top: 14px; width: 12px; height: 12px; transform: rotate(45deg); background: #fff; border: 2px solid #374151; box-sizing: border-box; z-index: 2; }
.tl-ms.done { background: #374151; }
.tl-ms.late { background: #fff; border-color: #DC2626; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #DC2626; z-index: 1; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.78rem; color: #4B5563; align-items: center; word-break: keep-all; }
.tl-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tl-key { position: static; display: inline-block; width: 28px; height: 12px; }
.tl-ms-key { display: inline-block; width: 10px; height: 10px; transform: rotate(45deg); border: 2px solid #374151; background: #fff; }
.tl-ms-key.done { background: #374151; }
.tl-ms-key.late { border-color: #DC2626; }
.tl-today-key { display: inline-block; width: 0; height: 14px; border-left: 2px solid #DC2626; }
@media (max-width: 600px) { .tl-label { width: 140px; min-width: 140px; } }
/* 목록 표 위 검색·필터 줄: 좁은 화면에서 두 줄로 넘어가면 높이를 늘림 (고정 높이라 위 요약 칸과 겹치던 문제) */
.mud-table .mud-table-toolbar { height: auto !important; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
/* 엑셀 가져오기 */
.erp-status.error { color: #B91C1C; border-color: #FCA5A5; background: #FEF2F2; }
.erp-help { font-size: 0.82rem; color: #4B5563; line-height: 1.7; word-break: keep-all; }
.erp-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 8px; }
/* 재정 보고서 표 */
.erp-report-title { font-weight: 700; color: #111827; margin: 16px 0 6px; }
.erp-report-table td.num, .erp-report-table th.num { text-align: right; white-space: nowrap; }
.erp-report-table tfoot th { background: #F4F6F9; }

/* 휴대폰 앱 설치 화면 (10단계) */
.erp-app-info { border-collapse: collapse; font-size: 0.9rem; }
.erp-app-info th { text-align: left; font-weight: 600; color: #475569; padding: 3px 16px 3px 0; white-space: nowrap; vertical-align: top; }
.erp-app-info td { padding: 3px 0; }
.erp-howto { margin: 4px 0 0 0; padding-left: 20px; word-break: keep-all; line-height: 1.7; }
.erp-app-warn { color: #B45309; word-break: keep-all; }


/* ── 10-4 휴대폰 화면 점검 (2026-11-18) ───────────────────────────── */
@media (max-width: 600px) {
    /* 목록 표(MudDataGrid)의 휴대폰 카드 모양: 한 건씩 구분선, 항목 이름은 왼쪽 고정 폭, 값은 바로 옆에서 줄바꿈 */
    .mud-xs-table .mud-table-body .mud-table-row .mud-table-cell {
        justify-content: flex-start;
        align-items: baseline;
        flex-wrap: wrap; /* 버튼 여러 개(입고·출고·이력·수정)가 카드 밖으로 나가지 않도록 */
        white-space: normal !important;
        word-break: keep-all;
        overflow-wrap: break-word;
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        padding: 3px 12px;
    }
    .mud-xs-table .mud-table-body .mud-table-row .mud-table-cell::before {
        flex: 0 0 84px;
        color: #64748B;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 8px;
    }
    .mud-xs-table .mud-table-body .mud-table-row .mud-table-cell:first-child { border-top: 6px solid #EEF1F5; padding-top: 10px; }
    .mud-xs-table .mud-table-body .mud-table-row .mud-table-cell:last-child { padding-bottom: 10px; border-bottom: none; }
    .mud-xs-table .mud-table-body { border-top: none; }

    /* 카드 머리글(제목 + 보조 설명 + 버튼): 좁으면 설명을 다음 줄로 */
    .mud-paper > .d-flex.align-center:first-child { flex-wrap: wrap; row-gap: 2px; }
    .mud-paper > .d-flex.align-center:first-child > .mud-typography-h6 { white-space: nowrap; }

    /* 대시보드 최근 변경 이력 */
    /* 대시보드 최근 변경 이력: 한 건을 두 줄(시간·사람·구분 / 내용)로 */
    .erp-recent-audit tr { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #E5E9EF; padding: 4px 0; }
    .erp-recent-audit td { white-space: nowrap; border-bottom: none !important; padding: 2px 8px 2px 0 !important; }
    .erp-recent-audit td:last-child { flex: 1 0 100%; white-space: normal; word-break: keep-all; }

    /* 달력 머리줄: 제목을 윗줄 전체로, 이동·보기 버튼은 아랫줄 양끝. 글자 세로 쪼개짐 방지 */
    .erp-calendar .fc .fc-header-toolbar { flex-wrap: wrap; row-gap: 8px; }
    .erp-calendar .fc .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) { order: -1; flex: 1 0 100%; text-align: center; }
    .erp-calendar .fc .fc-toolbar-title { font-size: 1.1rem; white-space: nowrap; }
    .erp-calendar .fc .fc-button { white-space: nowrap; padding: 4px 10px; }

    /* 발주 진행 단계 줄: 5칸이 한 줄에 들어가도록 여백·글자 축소, 단계 이름·날짜 줄바꿈 금지 */
    .erp-step { padding: 6px 2px; min-width: 0; }
    .erp-step-name { font-size: 0.72rem; white-space: nowrap; }
    .erp-step-date { font-size: 0.66rem; white-space: nowrap; letter-spacing: -0.02em; }

    /* 요약 칸: 큰 금액이 칸을 넘지 않도록 글자 크기 축소 */
    .erp-summary-item { min-width: 96px; padding: 8px 10px; }
    .erp-summary-value { font-size: 1rem; white-space: nowrap; }
}

/* 역할·권한 표: 메뉴 이름이 한 글자씩 쌓이지 않도록 가로 스크롤 */
.erp-perm-table .mud-table-container { overflow-x: auto; }
.erp-perm-table table { min-width: 620px; }
.erp-perm-table th, .erp-perm-table td { white-space: nowrap; }

/* ── 휴대폰 전용 설정 (2026-11-19 사용자 요청: 글자·팝업 조금 작게, 상단 제목 정렬) ── */
@media (max-width: 600px) {
    /* 전체 글자 기준 크기 16px → 15px (MudBlazor 글자·여백이 rem 단위라 함께 줄어듦) */
    html { font-size: 15px; }
    .mud-typography-h5 { font-size: 1.3rem; }
    .mud-typography-h6 { font-size: 1.08rem; }

    /* 상단바: 메뉴 버튼을 본문 왼쪽 여백(16px)에 맞추고, 제목·알림·계정을 세로 가운데 정렬 */
    .erp-appbar .mud-toolbar { padding-left: 4px; padding-right: 4px; align-items: center; min-height: 48px; }
    .erp-appbar .mud-icon-button.mud-icon-button-edge-start { margin-left: 0; padding: 8px; }
    .erp-brand { margin-left: 2px !important; font-size: 1.05rem !important; line-height: 1 !important; white-space: nowrap; }
    .erp-account-button { padding: 4px 6px !important; min-width: 0 !important; font-size: 0.85rem !important; }
    .erp-account-button .mud-button-icon-start { margin-right: 2px; }
    .erp-account-button .mud-button-icon-end { margin-left: 0; }
    .erp-bell { padding: 6px; }

    /* 대화상자(팝업): 화면 폭에 맞추고 여백·제목 축소 */
    .mud-dialog { margin: 8px !important; width: calc(100% - 16px) !important; max-width: calc(100% - 16px) !important; max-height: calc(100% - 16px); }
    .mud-dialog .mud-dialog-title { padding: 12px 16px 8px; }
    .mud-dialog .mud-dialog-title .mud-typography-h6 { font-size: 1rem; }
    .mud-dialog .mud-dialog-content { padding: 4px 16px; }
    .mud-dialog .mud-dialog-actions { padding: 8px 12px; }

    /* 버튼·입력 칸 약간 축소 */
    .mud-button-root.mud-button { padding-left: 10px; padding-right: 10px; }
    .mud-input > input.mud-input-root, .mud-select-input { font-size: 0.95rem; }
}
