/* ========================================
   그래가 웍스 — 업무 화면 스타일시트 (GE style.css 정리본)
   출처: globalecho_pro2 static/css/style.css (2026-12-01 복사, P1-1)
   정리한 것
   - 토큰(§1~§4)은 tokens.css 로 옮겼다 — 이 파일보다 «먼저» 싣는다
   - 죽은 셸 CSS(원본 302-799: Layout · Sidebar · Header)와 반응형 · 인쇄 절의 셸 잔재를 뺐다.
     셸은 shell.css 가 자급한다(base_mdi.html, P1-3)
   - rnd · teal · plum 램프 제외(tokens.css)
   싣는 곳: 업무 base(templates/base_app.html) · 로그인. 기존 HP base(base.html)에는 «싣지 않는다» —
   14px 루트 · h/p 여백 리셋 · .g-* 거터가 HP 화면 간격을 바꾼다(docs/analysis/02 §5.3, §8 #4).
   Bootstrap 5.3 CSS «다음에» 실어야 Bootstrap 클래스 재정의가 이긴다.
   ======================================== */

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a[onclick],
a:not([href]) {
    cursor: pointer;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.4;
}

p {
    margin: 0;
}

/* ========================================
   Grid System
   ======================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.row > * {
    padding-left: 12px;
    padding-right: 12px;
    width: 100%;
}

/* Column classes */
.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* Medium breakpoint (768px+) */
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-md-9 { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* Large breakpoint (992px+) */
@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
    .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-lg-9 { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* Row gap variants */
.g-0 { margin: 0; }
.g-0 > * { padding: 0; }
.g-1 { margin: -4px; }
.g-1 > * { padding: 4px; }
.g-2 { margin: -8px; }
.g-2 > * { padding: 8px; }
.g-3 { margin: -12px; }
.g-3 > * { padding: 12px; }
.g-4 { margin: -16px; }
.g-4 > * { padding: 16px; }
.g-5 { margin: -20px; }
.g-5 > * { padding: 20px; }


/* ========================================
   Cards - Clean Professional Style
   ======================================== */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow);
}

/* Content Card - 화면 무변경 기초 정의 (브라우저 기본값 동일) */
.content-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.card-header h3,
.card-header h5,
.card-header .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i,
.card-header h5 i,
.card-title i {
    color: var(--primary);
    font-size: 1.1rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

.card-body.p-0 {
    padding: 0 !important;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--gray-50);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* Card Variants */
.card-flat {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.card-flat:hover {
    box-shadow: none;
}

/* ========================================
   Buttons - Modern Professional Style
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:focus {
    outline: none;
}

.btn i {
    font-size: 1rem;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3), var(--focus-ring);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

.btn-secondary:focus {
    box-shadow: var(--focus-ring);
}

/* Success Button */
.btn-success {
    background: var(--gradient-success);
    color: white;
    border: none;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
    color: white;
}

/* Danger Button */
.btn-danger {
    background: var(--gradient-danger);
    color: white;
    border: none;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    color: white;
}

/* Outline Buttons */
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-sm i {
    font-size: 0.9rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Icon Button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius);
}

.btn-icon-sm {
    width: 30px;
    height: 30px;
    padding: 0;
}

/* White Buttons (for gradient headers) */
/* Formerly white pill on gradient banner; now the solid primary action on the light bar */
.btn-white {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: #fff;
}

/* Formerly white-on-gradient; now an outline button on the light header bar */
.btn-white-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-white-outline:hover {
    background: var(--gray-100);
    border-color: var(--border-color-dark);
    color: var(--primary);
}

/* ========================================
   Forms - Clean Professional Style
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label,
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-heading);
    font-size: 0.85rem;
}

.form-label.required::after,
label.required::after {
    content: ' *';
    color: var(--danger);
}

/* Input, Select, Textarea */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.5;
    border: 1.5px solid var(--border-input);
    border-radius: var(--border-radius);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:hover,
input:hover,
textarea:hover,
select:hover {
    border-color: var(--gray-400);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.form-control:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Select (Combo Box) */
.form-select,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:focus,
select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Textarea */
textarea {
    min-height: 100px;
    resize: vertical;
}

/* File Input */
input[type="file"] {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    padding: 6px 14px;
    margin-right: 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: var(--gradient-primary);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
    background: var(--gradient-primary-hover);
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
}

/* Form Control Sizes */
.form-control-sm {
    padding: 7px 12px;
    font-size: 0.85rem;
}

.form-control-lg {
    padding: 12px 16px;
    font-size: 1rem;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control,
.input-group input,
.input-group select {
    border-radius: 0;
    flex: 1;
}

.input-group .form-control:first-child,
.input-group input:first-child,
.input-group select:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control:last-child,
.input-group input:last-child,
.input-group select:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--gray-100);
    border: 1.5px solid var(--border-input);
    white-space: nowrap;
}

.input-group-text:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border-right: none;
}

.input-group-text:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    border-left: none;
}

/* Validation */
.is-invalid {
    border-color: var(--danger) !important;
}

.is-invalid:focus {
    box-shadow: var(--focus-ring-danger) !important;
}

.invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--danger);
}

.is-valid {
    border-color: var(--success) !important;
}

.is-valid:focus {
    box-shadow: var(--focus-ring-success) !important;
}

.valid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--success);
}

.form-text {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Form Sections - Clean Card Style
   ======================================== */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title,
h5.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-100);
}

.form-section-title i,
h5.form-section-title i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
}

.form-actions-right {
    justify-content: flex-end;
}

.form-actions-center {
    justify-content: center;
}

.form-actions-between {
    justify-content: space-between;
}

/* ========================================
   Tables - Professional Data Grid
   ======================================== */
.table-wrapper,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-radius: var(--border-radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 9px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--primary-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.table-striped tbody tr:nth-child(even):hover {
    background-color: var(--primary-50);
}

/* Table Cell Alignment */
.table .text-center { text-align: center; }
.table .text-right,
.table .text-end { text-align: right; }
.table .nowrap { white-space: nowrap; }

/* Table with Card wrapper */
.card .table th:first-child,
.card .table td:first-child {
    padding-left: 24px;
}

.card .table th:last-child,
.card .table td:last-child {
    padding-right: 24px;
}

/* Compact Table */
.table-compact th,
.table-compact td {
    padding: 10px 14px;
}

/* Clickable Row */
.table tbody tr[onclick],
.table tbody tr[style*="cursor: pointer"],
.table tbody tr[style*="cursor:pointer"] {
    cursor: pointer;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* Table Empty State */
.table-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.table-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.table-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   Badges - Status Indicators
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-dark);
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-dark);
}

/* ══════════════════════════════════════════════════════════════════════════
   오브젝트 상태 — `.st`
   레코드의 «상태» 를 나타내는 유일한 컴포넌트. 위 `.badge-*` 는 «분류(Tag)» 로만
   남기고, 상태는 전부 이쪽으로 옮긴다.

   왜 상자가 없는가 — 실물 아홉 곳을 촬영해 대조한 결과, 모든 상태를 진한 색으로
   채우는 곳은 하나도 없었다. SAP Fiori Object Status 는 명시적으로
   「semantically colored text-only option on its own」 을 권장하고,
   채운 판(inverted)은 「if the information is crucial for the user's actions」
   일 때만이라고 못박는다. Adobe Spectrum 은 「Color alone is not enough」 라
   낱말을 필수로 둔다.

   규칙
     ① 상태는 «낱말» 이다. 상자는 기본값이 아니다.
     ② 색은 «단계를 열거» 하지 않는다. «조치가 필요한가» 를 말한다.
     ③ 중립은 색이 없다. 목록의 대다수가 중립이라 목록이 조용해진다.
     ④ 조치가 필요한 둘(action·back)에만 아이콘을 단다 — 회색조·색약에서 그 둘이
        형태로 갈린다. 전부에 달면 그 효과가 사라진다.
     ⑤ 채운 판(`--solid`)은 화면당 하나 — 「이 문서의 지금 상태」.

   대비 실측(흰 바탕) — 중립 7.01 · 진행 7.04 · 완결 6.98 · 조치 6.98 ·
   되돌아옴 6.99 · 종료 4.61. 채운 판 위 흰 글자 4.59~4.61. 전건 WCAG AA.
   신규 색 0 — 전부 §1 램프의 11단(글자)과 9단(면)이다.
   ══════════════════════════════════════════════════════════════════════════ */
.st {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: inherit;
    white-space: nowrap;
    color: var(--st-neutral);
}
.st i {
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    flex: none;
}
.st--progress { color: var(--st-progress); }
.st--done     { color: var(--st-done); }
.st--action   { color: var(--st-action);   font-weight: var(--w-strong); }
.st--back     { color: var(--st-back);     font-weight: var(--w-strong); }

/* 종료 — 색을 하나도 안 늘리고 상태를 하나 더 만든다.
   ★ 명도 하락 + 취소선 «이중» 으로 건다. 취소선 단독은 글자 획과 겹치는 양이
     크기마다 달라 잉크 순증이 6.5~13.3% 를 오가는 추첨이다(실측). */
.st--void { color: var(--text-muted); }
.st--void > span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* 강조 — 화면당 하나. SAP inverted */
.st--solid {
    height: 20px;
    padding: 0 8px;
    border-radius: var(--border-radius-sm);
    background-color: var(--st-neutral-solid);
    color: var(--text-on-solid);
    font-weight: var(--w-strong);
}
.st--solid.st--progress { background-color: var(--st-progress-solid); color: var(--text-on-solid); }
.st--solid.st--done     { background-color: var(--st-done-solid);     color: var(--text-on-solid); }
.st--solid.st--action   { background-color: var(--st-action-solid);   color: var(--text-on-solid); }
.st--solid.st--back     { background-color: var(--st-back-solid);     color: var(--text-on-solid); }
.st--solid.st--void     { background-color: var(--neutral-8); color: var(--text-on-solid); }
.st--solid.st--void > span { text-decoration: none; }

/* 누를 수 있을 때만 — WCAG 2.2 표적 최소 24px */
.st--target {
    min-height: 24px;
    padding: 0 6px;
    margin: 0 -6px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}
.st--target:hover { background-color: var(--neutral-3); }

/* Badge Sizes */
.badge-sm {
    padding: 2px 8px;
    font-size: 0.7rem;
}

.badge-lg {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* ========================================
   Alerts - Notification Messages
   ======================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert span {
    flex: 1;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success-dark);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-info {
    background-color: var(--info-light);
    color: var(--info-dark);
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.alert-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: all var(--transition-fast);
    margin-left: auto;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
}

.messages {
    margin-bottom: 20px;
}

.messages .alert {
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Page Header - Professional Layout
   ======================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-description {
    color: var(--text-secondary);
    margin-top: 2px;
    font-size: 0.85rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Page Header — Slim light bar (flattened from former gradient banner) */
.page-header-gradient {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.page-header-gradient::before {
    display: none;
}

.page-header-gradient .page-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: none;
}

.page-header-gradient .page-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.page-header-gradient .page-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ========================================
   Stats Cards - Dashboard Metrics
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* !important: 다수 템플릿이 인라인 style="grid-template-columns:repeat(4,1fr)"를 하드코딩하므로 강제 오버라이드 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* ── stat-card 내부 — 정의가 «없던» 어휘 ─────────────────────────────────
   `.stat-icon` `.stat-value` `.stat-content` 와 색 수식어 4종
   (`.stat-warning` `.stat-info` `.stat-primary` `.stat-success`) 은
   ms_list · schedule_list 두 화면이 쓰는데 CSS 에 정의가 한 줄도 없었다.
   그래서 5장이 전부 같은 회색 덩어리로 그려졌다(2026-08-21 시각 확인).

   ★ `.stat-content` 안으로 한정한다. `.stat-label` 은 rnd 화면 12개가 자기
     `rnd.css` 정의로 쓰고 있어, 전역에 풀면 그쪽 글자를 말없이 바꾼다.
   ★ 색은 «숫자와 아이콘»에만 얹는다 — 배포된 대시보드 타일(`.dv-stat-c1`)이
     쓰는 방식이다. 카드 5장을 통째로 칠하면 전부가 동시에 소리를 질러
     「지금 봐야 할 칸」이 사라진다.
   ★ 글자는 10단을 쓴다. 9단은 흰 바탕에서 4.6:1 이라 겨우 걸치고,
     중성 9단은 3.2:1 로 아예 미달이다 (`scripts/check_contrast.py`). */
.stat-card .stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    border-radius: var(--border-radius-sm);
    background-color: var(--neutral-3);
    color: var(--neutral-11);
    font-size: 17px;
}
.stat-card .stat-content { display: block; }
.stat-content .stat-value {
    font-family: var(--font-num);
    font-size: 26px;
    font-weight: var(--w-head);
    line-height: 30px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}
.stat-content .stat-label {
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 17px;
    color: var(--text-muted);
}

/* 색 수식어 — 이름은 손대지 않는다. 어느 색이 어느 «성격»에 붙는지는
   상태 뱃지 기준안(§3) 판정 사항이라 여기서 앞서 정하지 않는다. */
.stat-warning .stat-icon { background-color: var(--exec-3);    color: var(--exec-10); }
.stat-info    .stat-icon { background-color: var(--collab-3);  color: var(--collab-10); }
.stat-primary .stat-icon { background-color: var(--accent-3);  color: var(--accent-10); }
.stat-success .stat-icon { background-color: var(--support-3); color: var(--support-10); }
.stat-warning .stat-value { color: var(--exec-10); }
.stat-info    .stat-value { color: var(--collab-10); }
.stat-primary .stat-value { color: var(--accent-10); }
.stat-success .stat-value { color: var(--support-10); }

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-card-change {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Filter Section - Search & Filters
   ======================================== */
.filter-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-group.flex-grow {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-input,
.filter-select {
    padding: 9px 14px;
    font-size: 0.9rem;
    border: 1.5px solid var(--border-input);
    border-radius: var(--border-radius);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    height: 40px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 38px;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    height: 40px;
}

.filter-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.filter-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35);
}

.filter-btn-secondary {
    background-color: var(--gray-100);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.filter-btn-secondary:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

/* Search Box */
.search-box {
    position: relative;
    flex: 1;
}

.search-box .filter-input {
    width: 100%;
    padding-left: 40px;
}

.search-box-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 8px;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-export-excel {
    background-color: #217346;
    color: white;
}

.btn-export-excel:hover {
    background-color: #1a5c38;
    color: white;
}

.btn-export-pdf {
    background-color: #D32F2F;
    color: white;
}

.btn-export-pdf:hover {
    background-color: #b71c1c;
    color: white;
}

/* ========================================
   Pagination - Modern Style
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.page-link:hover {
    color: var(--primary);
    background-color: var(--primary-50);
    border-color: var(--primary-200);
}

.page-item.active .page-link {
    color: white;
    background: var(--gradient-primary);
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: var(--gray-50);
    border-color: var(--border-color);
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Login Page - Professional Auth Screen
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, #1E293B 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.login-logo-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.login-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
}

/* ========================================
   Detail Modal - Professional Popup
   ======================================== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.detail-modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: var(--gradient-header);
    position: relative;
}

.detail-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
}

.detail-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.detail-modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.detail-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-muted);
    gap: 16px;
}

.detail-modal-loading i {
    font-size: 2rem;
    color: var(--primary);
}

/* Detail Section */
.detail-section {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-of-type {
    border-bottom: none;
}

.detail-section-title,
h4.detail-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-100);
}

.detail-section-title i {
    color: var(--primary);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.detail-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--gray-50);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-200);
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

/* Detail Actions */
.detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    background: var(--gray-50);
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

/* ========================================
   Dashboard Grid Layouts
   ======================================== */
.dashboard-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.dashboard-grid-2-1 {
    grid-template-columns: 2fr 1fr;
}

.dashboard-grid-1-1 {
    grid-template-columns: 1fr 1fr;
}

.dashboard-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .dashboard-grid-2-1,
    .dashboard-grid-1-1,
    .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   List Group
   ======================================== */
.list-group {
    display: flex;
    flex-direction: column;
}

.list-group-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    transition: background-color var(--transition-fast);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: var(--gray-50);
}

/* ========================================
   Utilities
   ======================================== */

/* Text */
.text-center { text-align: center; }
.text-right, .text-end { text-align: right; }
.text-left, .text-start { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* Font Weight */
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* Font Size */
.fs-sm { font-size: 0.85rem; }
.fs-base { font-size: 1rem; }
.fs-lg { font-size: 1.125rem; }
.fs-xl { font-size: 1.25rem; }
.small { font-size: 0.85rem; }

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 16px; }
.m-4 { margin: 24px; }
.m-5 { margin: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.p-5 { padding: 32px; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 16px; }
.pt-4 { padding-top: 24px; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 16px; }
.pb-4 { padding-bottom: 24px; }

.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }

.px-1 { padding-left: 4px; padding-right: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.px-4 { padding-left: 24px; padding-right: 24px; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-stretch { align-items: stretch; }

/* Gap */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.gap-5 { gap: 32px; }

/* Background */
.bg-white { background-color: white; }
.bg-light { background-color: var(--gray-50); }
.bg-transparent { background-color: transparent; }
.bg-primary-50 { background-color: var(--primary-50); }

/* Border */
.border { border: 1px solid var(--border-color); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-0 { border-radius: 0; }

/* Width & Height */
.w-100 { width: 100%; }
.w-auto { width: auto; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .page-header-gradient {
        padding: 10px 12px;
    }

    .page-header-gradient .page-title {
        font-size: 1rem;
    }

    /* 슬림 헤더 내부 d-flex(타이틀 | 액션) → 세로 스택 */
    .page-header-gradient .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-section {
        padding: 16px;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group,
    .filter-group.flex-grow,
    .search-box {
        width: 100%;
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-grid,
    .detail-grid-3,
    .detail-grid-4 {
        grid-template-columns: 1fr;
    }

    .detail-item.full-width {
        grid-column: span 1;
    }
}

/* ========================================
   Progress Bar
   ======================================== */
.progress {
    display: flex;
    height: 8px;
    overflow: hidden;
    background-color: var(--gray-200);
    border-radius: 4px;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
    white-space: nowrap;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    font-size: 0;
}

.progress-lg {
    height: 20px;
    border-radius: var(--border-radius-sm);
}

.progress-lg .progress-bar {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Progress Colors */
.progress-bar-success { background: var(--gradient-success); }
.progress-bar-warning { background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%); }
.progress-bar-danger { background: var(--gradient-danger); }

/* ========================================
   Table Row States
   ======================================== */
.table-row-danger {
    background-color: var(--danger-light) !important;
}

.table-row-danger:hover {
    background-color: #FECACA !important;
}

.table-row-warning {
    background-color: var(--warning-light) !important;
}

.table-row-success {
    background-color: var(--success-light) !important;
}

/* ========================================
   Button Groups
   ======================================== */
.btn-group {
    display: inline-flex;
    gap: 1px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.btn-group-sm .btn {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* ========================================
   Additional Utilities
   ======================================== */
.ms-1 { margin-left: 4px; }
.ms-2 { margin-left: 8px; }
.ms-3 { margin-left: 16px; }

.opacity-40 { opacity: 0.4; }
.opacity-60 { opacity: 0.6; }

.cursor-pointer { cursor: pointer; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========================================
   Print Styles — 셸 잔재(.sidebar · .header · .main-content)를 걷어낸 판
   ======================================== */
@media print {
    .page-actions,
    .page-header-actions,
    .filter-section,
    .btn,
    .pagination,
    .no-print {
        display: none !important;
    }

    .mdi-frame-content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ========================================
   그래가 추가 — 아이콘 회전(.ri-spin). GE 는 클래스만 쓰고 정의가 없었다
   ======================================== */
.ri-spin { display: inline-block; animation: g-spin 1s linear infinite; }
@keyframes g-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .ri-spin { animation-duration: 1ms; animation-iteration-count: 1; }
}

/* ========================================
   그래가 추가 — partials/empty_state.html · page_header.html (P1-2)
   ======================================== */
.page-header-text { min-width: 0; }
.page-title i { color: var(--text-muted); font-weight: 400; margin-right: 2px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 2.4rem; line-height: 1; color: var(--neutral-8); margin-bottom: 4px; }
.empty-state-title { margin: 0; font-size: 0.95rem; font-weight: var(--w-emph); color: var(--text-secondary); }
.empty-state-desc { margin: 0; font-size: 0.85rem; }
.empty-state-action { margin-top: 8px; }
tr.empty-state-row > td { padding: 0 !important; background: transparent; }
tr.empty-state-row:hover > td { background: transparent !important; }

/* ========================================
   그래가 추가 — 체크 상자 정렬 (GE 결함 보정)
   GE .form-check 는 flex(gap 10px · 왼쪽 여백 0)인데 Bootstrap 의 float · 음수 왼쪽 여백(-1.5em, 스위치 -2.5em)이
   그대로 남아 상자가 칸 밖으로 빠지고 인라인 항목끼리 겹쳤다. 이 파일은 Bootstrap 뒤에 실리므로 같은 특이도로 이긴다
   ======================================== */
.form-check { padding-left: 0; }
.form-check .form-check-input { float: none; margin: 0; flex: none; }
.form-check-inline { display: inline-flex; margin-right: 1rem; }
