@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* (주)퍼스트스마트 인트라넷 — 컴팩트 ERP / Government24 스타일 가이드 */

:root {
    --bg-page: #f0f2f5;
    --sidebar-bg: #3c434a;
    --sidebar-text: #dcdcde;
    --sidebar-hover-text: #ffffff;
    --sidebar-active: #3498db;
    --business-accent: #3d5a9e;
    --business-accent-soft: rgba(61, 90, 158, 0.14);
    --business-accent-strong: #243a6e;
    --surface: #ffffff;
    --border-panel: #ccd0d4;
    --border-soft: #e0e0e0;
    --text: #2c3338;
    --muted: #646970;
    --primary: #3498db;
    --primary-dark: #2980b9;
    --danger: #d63638;
    --danger-bg: #fcf0f1;
    --stripe: #f6f7f7;
    --radius: 2px;
    --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg-page);
    letter-spacing: -0.01em;
}

body, .widget, button, input, select, textarea {
    font-family: 'Pretendard', sans-serif !important;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ----- 로그인 ----- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-page);
}

.login-container {
    width: min(400px, 100%);
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.login-container h1 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.subtitle {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.error-msg {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--danger-bg);
    border: 1px solid #f0b8b9;
    color: var(--danger);
    font-size: 13px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.form-group input,
.form-input,
.form-control,
.form-textarea,
.form-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    box-sizing: border-box;
}

.form-textarea {
    min-height: 160px;
    resize: vertical;
}

.form-group input:focus,
.form-input:focus,
.form-control:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.35);
}

/* 읽기 전용·비활성 폼 (수정 불가 필드) */
input[readonly],
input:disabled,
select:disabled,
textarea[readonly],
.form-input[readonly],
.form-input:disabled,
.form-control[readonly],
.form-control:disabled,
.form-textarea[readonly],
.form-textarea:disabled,
.form-select:disabled {
    background-color: #f3f4f6 !important;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
}

input[readonly]:hover,
input:disabled:hover,
select:disabled:hover,
textarea[readonly]:hover,
.form-input[readonly]:hover,
.form-input:disabled:hover,
.form-control[readonly]:hover,
.form-control:disabled:hover,
.form-textarea[readonly]:hover,
.form-select:disabled:hover {
    cursor: not-allowed;
}

input[readonly]:focus,
input:disabled:focus,
select:disabled:focus,
textarea[readonly]:focus,
.form-input[readonly]:focus,
.form-input:disabled:focus,
.form-control[readonly]:focus,
.form-control:disabled:focus,
.form-textarea[readonly]:focus,
.form-select:disabled:focus {
    border-color: var(--border-panel);
    box-shadow: none;
}

.btn,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 6px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
}

.btn:hover,
.btn-login:hover {
    background: var(--primary-dark);
}

.btn-login {
    width: 100%;
    margin-top: 6px;
}

.btn-secondary {
    background: #f6f7f7;
    color: var(--text);
    border-color: var(--border-panel);
}

.btn-secondary:hover {
    background: #eaeaea;
}

.btn-danger {
    background: #c92a2a;
    border-color: #c92a2a;
}

.btn-danger:hover {
    background: #a61e1e;
}

.btn-success {
    background: #2f9e44;
    border-color: #2f9e44;
}

.btn-success:hover {
    background: #2b8a3e;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-outline-secondary {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #334155;
}

.btn-outline-primary {
    background: #fff;
    color: #2563eb;
    border-color: #93c5fd;
}

.btn-outline-primary:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #60a5fa;
}

.btn-outline-danger {
    background: #fff;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-outline-danger:hover {
    background: #fef2f2;
    color: #991b1b;
    border-color: #f87171;
}

.btn-topbar {
    padding: 4px 10px;
    font-size: 12px;
}

.footer-text {
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

/* ----- 앱 레이아웃 ----- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: relative;
    width: 220px;
    flex-shrink: 0;
    padding: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
}

/* 통합 알림 위젯: 뷰포트 좌하단 고정 · 닫힘 컴팩트 사각형, 펼침 320px 규격 통일 (layout_start / layout_end) */
#alert-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: fit-content;
    max-width: min(calc(100vw - 40px), 320px);
    z-index: 1050;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
    pointer-events: auto;
    box-sizing: border-box;
}

.fs-alert-widget-wrap {
    width: 160px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    transition: width 0.2s ease, max-width 0.2s ease;
}

.fs-alert-widget-wrap.is-expanded {
    width: 320px;
    max-width: min(calc(100vw - 40px), 320px);
}

.fs-alert-widget-wrap .fs-alert-widget-card {
    border-radius: 8px;
    background: transparent;
}

.fs-alert-widget-header {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    margin: 0;
    border: none;
    user-select: none;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.fs-alert-widget-header__left,
.fs-alert-widget-header__right {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.fs-alert-widget-header__right {
    flex-shrink: 0;
}

.fs-alert-widget-wrap.is-expanded .fs-alert-widget-header {
    border-radius: 0;
}

.fs-alert-widget-header__icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.95;
}

.fs-alert-widget-header__title {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.fs-alert-widget-header__badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.fs-alert-widget-header__chevron {
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.fs-alert-widget-header--khkim {
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.95), rgba(255, 214, 102, 0.92));
    color: #1a1a1a;
    border-bottom: 1px solid transparent;
}

.fs-alert-widget-wrap.is-expanded .fs-alert-widget-header--khkim {
    border-bottom-color: rgba(220, 53, 69, 0.3);
}

.fs-alert-widget-header--project {
    background: linear-gradient(180deg, #0d6efd, #0a58ca);
    color: #fff;
    border-bottom: 1px solid transparent;
}

.fs-alert-widget-wrap.is-expanded .fs-alert-widget-header--project {
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

.fs-alert-widget-body {
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.45;
}

.fs-alert-widget-body--khkim {
    background: rgba(255, 248, 220, 0.97);
}

.fs-alert-widget-body--project {
    background: #f8f9fa;
}

.fs-alert-widget-body .fw-bold {
    font-size: 15px;
}

.fs-alert-widget-body #fs-project-alert-list a,
.fs-alert-widget-body #fs-project-alert-list .text-dark {
    font-size: 14px;
}

.fs-alert-widget-body #fs-project-alert-list .font-monospace {
    font-size: 13px;
}

/* CS 계정 가승인(대기) · khkim CS 알림 줄 */
.cs-user-row--pending td {
    background-color: rgba(255, 193, 7, 0.22) !important;
}

.fs-khkim-cs-pending-item {
    border-left: 4px solid #ffc107;
    padding-left: 10px !important;
    margin-left: 0;
    background: rgba(255, 248, 220, 0.65);
    border-radius: 6px;
}

#fs-khkim-open-alert-list,
#fs-project-alert-list {
    max-height: 400px;
    overflow-y: auto;
}
#fs-khkim-open-alert-list li:last-child,
#fs-project-alert-list li:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
#fs-khkim-alert-header:focus-visible,
#fs-project-alert-header:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.sidebar-brand {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-link {
    display: block;
}

.logo-img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(1.08);
}

.sidebar-nav {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

.sidebar-link__label {
    position: relative;
    display: inline-block;
}

.sidebar-link__label--with-dot {
    padding-right: 10px;
}

.notification-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-left: 3px;
    vertical-align: middle;
}

/* LNB 알림점 (공지·업무보고·시안·프로젝트) — 텍스트 바로 우측, 고정 gap */
.sidebar-link .nav-item-wrapper {
    position: relative !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex: 1;
    min-width: 0;
    gap: 8px !important;
}

.nav-item-wrapper {
    position: relative !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
}

/* 사이드바·테이블 공통 알림 점: 고정 5×5, transform/scale 금지로 크리스프 유지 */
.red-dot-badge,
.menu-badge {
    display: inline-block;
    width: 5px;
    height: 5px;
    min-width: 5px;
    min-height: 5px;
    max-width: 5px;
    max-height: 5px;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    background-color: #ef4444;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 3px;
    margin-bottom: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.sidebar-link .nav-item-wrapper .red-dot-badge,
.sidebar-link .nav-item-wrapper .menu-badge {
    margin-left: 0;
}

.sidebar-link.is-active .red-dot-badge,
.sidebar-link.is-active .menu-badge {
    background-color: #fca5a5;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.sidebar-link:hover {
    color: var(--sidebar-hover-text);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.is-active {
    color: #fff;
    background: var(--sidebar-active);
    border-left-color: rgba(255, 255, 255, 0.35);
}

.sidebar-group {
    padding: 4px 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.sidebar-group-label {
    padding: 10px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sidebar-group-label__icon {
    opacity: 0.9;
    font-size: 0.95em;
}

.sidebar-group--business .sidebar-link.is-active {
    background: var(--business-accent);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 40px;
    padding: 0 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-panel);
}

.topbar-left {
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.topbar-link:hover {
    text-decoration: underline;
}

.topbar-clock {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    user-select: none;
}

.topbar-greeting {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.app-content {
    flex: 1;
    padding: 10px 12px 14px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* 레거시 헤더 클래스 (일부 페이지에서 유지) */
.app-header {
    display: none;
}

.content-card {
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.content-card--narrow {
    max-width: 720px;
    margin: 0 auto;
}

.content-card + .content-card {
    margin-top: 10px;
}

/* 비즈니스: 상단 요약 배너 · 카드 보드 */
.app-content--business {
    --local-accent: var(--business-accent);
    background: #f8fafc;
}

.summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
}

.summary-stat {
    flex: 1 1 160px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    border-left: 3px solid var(--business-accent);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.summary-stat__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--business-accent-soft);
    color: var(--business-accent-strong);
    font-size: 16px;
}

.summary-stat__value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.summary-stat__label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-panel);
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.alert-banner--critical {
    background: var(--danger-bg);
    border-left-color: var(--danger);
}

.alert-banner__title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
}

.alert-banner__list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text);
}

.alert-banner__list li {
    margin: 2px 0;
}

.badge-urgent {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 2px;
    background: #fee2e2;
    color: #b91c1c;
}

.badge-soon {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
    background: #fef3c7;
    color: #b45309;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.biz-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    border-top: 3px solid var(--business-accent);
    transition: box-shadow 0.15s ease;
}

.biz-card:hover {
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.08);
}

.biz-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.biz-card__meta {
    font-size: 12px;
    color: var(--muted);
}

.biz-card__progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.biz-card__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--business-accent), #5b7fd4);
    border-radius: 3px;
}

.biz-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.status-pill {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
    background: #f3f4f6;
    color: var(--muted);
}

.status-pill--prepare {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-pill--in_progress {
    background: var(--business-accent-soft);
    color: var(--business-accent-strong);
}

.status-pill--done {
    background: #ecfdf5;
    color: #047857;
}

.status-pill--hold {
    background: #fef3c7;
    color: #b45309;
}

.table-wrap {
    overflow-x: auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

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

.page-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.page-lead {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.board-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* ----- 테이블: 헤더 무채색 + 줄무늬 ----- */
.board-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--border-soft);
}

.board-table thead th {
    padding: 6px 8px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid var(--border-panel);
    text-align: center;
}

.board-table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-soft);
    text-align: center;
    vertical-align: middle;
}

.board-table--striped tbody tr:nth-child(even) {
    background: var(--stripe);
}

.board-table--striped tbody tr:nth-child(odd) {
    background: var(--surface);
}

.board-table tbody tr:hover td {
    background: rgba(52, 152, 219, 0.06);
}

.board-table td.title-col {
    text-align: left;
}

.board-table td.title-col a {
    color: var(--text);
    font-weight: 600;
}

.board-table td.title-col a:hover {
    color: var(--primary);
}

.empty-row {
    color: var(--muted);
    text-align: center;
}

.user-filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.form-inline-input {
    padding: 5px 8px;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 140px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ----- 전사 폼 표준: 섹션 제목 / 필드 라벨 ----- */
.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.form-section-title:first-child {
    margin-top: 0;
}

form.contract-form > .form-section-title:first-of-type,
form > input[type="hidden"] + .form-section-title {
    margin-top: 0;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
}

.form-buttons {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.notice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.notice-meta-item {
    background: #fafafa;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    padding: 6px 8px;
}

.notice-meta-label {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 2px;
}

.notice-meta-value {
    font-size: 13px;
    font-weight: 600;
}

.notice-content {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.notice-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notice-actions-right {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.notice-actions-right form {
    margin: 0;
}

.user-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.user-card {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    padding: 10px;
    background: var(--surface);
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
}

.user-meta,
.user-contact {
    font-size: 12px;
    color: var(--muted);
}

.user-dept {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.badge-role {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    background: #eaeaea;
    color: var(--text);
}

.badge-role.admin {
    background: #d5e8f7;
    color: #1d5a8a;
}

.user-card-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 20px 8px;
}

.org-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 10px;
}

.org-tree-pro {
    list-style: none;
    margin: 0;
    padding-left: 14px;
    border-left: 1px dashed var(--border-panel);
}

.org-tree-item {
    margin: 8px 0;
}

.org-card-btn {
    border: 1px solid var(--border-panel);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.org-card-btn:hover,
.org-card-btn.is-active {
    border-color: var(--primary);
    background: #f0f8fd;
}

.org-card-manager {
    margin-top: 4px;
    margin-left: 2px;
    color: var(--muted);
    font-size: 11px;
}

.manager-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 2px;
    background: #fff3cd;
    color: #856404;
    font-size: 10px;
    font-weight: 700;
    margin-right: 4px;
}

.manager-badge.manager-empty {
    background: #eaeaea;
    color: var(--muted);
}

.org-members-panel {
    border: 1px solid var(--border-panel);
    background: var(--surface);
    padding: 10px;
    border-radius: var(--radius);
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.org-members-panel.is-open {
    opacity: 1;
}

.org-members-header h3 {
    margin: 0;
    font-size: 14px;
}

.org-members-header p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.org-members-list {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.profile-card {
    display: flex;
    gap: 8px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 6px 8px;
    background: #fafafa;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name {
    font-size: 13px;
    font-weight: 700;
}

.profile-meta {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.attendance-card {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    background: #fafafa;
    padding: 10px;
}

.attendance-card h3 {
    margin: 0 0 6px;
    font-size: 13px;
}

.attendance-card p {
    margin: 4px 0;
    font-size: 12px;
    color: var(--text);
}

.attendance-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.clock-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: var(--radius);
    background: #e8f4fc;
    color: #1d5a8a;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bee0f7;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
}

.status-present {
    background: #e7f5e9;
    color: #1e6b2e;
}

.status-late {
    background: #fff8e6;
    color: #946200;
}

.status-early {
    background: #fff0e0;
    color: #a14c00;
}

.status-absent {
    background: #fde8e8;
    color: #a40000;
}

.status-leave {
    background: #e8f4fc;
    color: #1d5a8a;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.summary-card {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    background: #fafafa;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-card strong {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.summary-card span {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.dept-form-grid {
    display: grid;
    gap: 10px;
}

/* ----- 마이페이지 ----- */
.mypage-dashboard {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.35fr);
    gap: 12px;
    align-items: start;
}

.mypage-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.mypage-dashboard-side {
    min-width: 0;
}

.mypage-attendance-panel {
    min-height: 200px;
}

.mypage-attendance-table-wrap {
    max-height: min(70vh, 640px);
    overflow: auto;
}

.mypage-summary {
    margin-bottom: 10px;
}

.mypage-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mypage-section-title i {
    color: var(--primary);
    font-size: 15px;
}

.mypage-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mypage-stat-badge {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    padding: 8px 12px;
    min-width: 120px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mypage-stat-late {
    border-left: 3px solid #f0a500;
}

.mypage-stat-leave {
    border-left: 3px solid var(--primary);
}

.mypage-stat-muted {
    border-left: 3px solid #8c8f94;
}

.mypage-stat-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.mypage-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.mypage-card {
    margin-bottom: 10px;
}

.mypage-profile-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mypage-avatar-box {
    flex-shrink: 0;
}

.mypage-avatar-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border-panel);
    display: block;
}

.mypage-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    border: 1px solid var(--border-panel);
}

.profile-hint {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--muted);
}

/* ----- 공지사항 (B2B 스타일) ----- */
.notice-list-card .notice-table-wrap {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    overflow: hidden;
}

.notice-board-table thead th {
    background: #f3f4f6 !important;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
}

.notice-board-table tbody td {
    text-align: left;
    padding: 10px 12px;
    vertical-align: middle;
}

.notice-board-table tbody tr:hover td {
    background: rgba(52, 152, 219, 0.07) !important;
}

.notice-board-table tbody tr.notice-row--important td {
    background: #fafbfc;
}

.notice-board-table tbody tr.notice-row--important:hover td {
    background: rgba(239, 68, 68, 0.06) !important;
}

.notice-num {
    width: 64px;
    text-align: center !important;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.notice-title-cell {
    min-width: 0;
}

.notice-title-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.notice-title-link:hover {
    color: var(--primary);
}

.notice-title-text {
    word-break: break-word;
}

.notice-clip {
    font-size: 14px;
    line-height: 1;
    opacity: 0.85;
}

.notice-list-meta-head {
    white-space: nowrap;
    text-align: right !important;
    width: 280px;
}

.notice-list-meta {
    text-align: right !important;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.notice-meta-sep {
    margin: 0 4px;
    opacity: 0.5;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    vertical-align: middle;
}

.badge--must {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.notice-view-card {
    position: relative;
}

.notice-view-actions-top {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notice-inline-form {
    display: inline;
    margin: 0;
}

.notice-view-head {
    padding-right: 180px;
    margin-bottom: 0;
}

.notice-view-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    color: var(--text);
}

.notice-view-meta-line {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.notice-meta-dot {
    opacity: 0.5;
}

.notice-view-divider {
    height: 1px;
    background: var(--border-panel);
    margin: 16px 0 20px;
}

.notice-prose {
    padding: 8px 4px 20px;
    line-height: 1.75;
    font-size: 14px;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.notice-prose p {
    margin: 0 0 12px;
}

.notice-prose img {
    max-width: 100%;
    height: auto;
}

.notice-prose table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 13px;
}

.notice-prose th,
.notice-prose td {
    border: 1px solid var(--border-panel);
    padding: 6px 8px;
}

.notice-attach-panel {
    margin-top: 8px;
    padding: 12px 14px;
    background: #f3f4f6;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.notice-attach-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}

.notice-attach-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notice-attach-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}

.notice-attach-item:last-child {
    border-bottom: none;
}

.notice-attach-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.notice-attach-link:hover {
    text-decoration: underline;
}

.notice-attach-size {
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
}

.notice-view-footer-actions {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.notice-editor-card .note-editor.note-frame {
    border-color: var(--border-panel);
}

.notice-pin-row {
    margin-bottom: 4px;
}

.notice-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.notice-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.notice-toggle-ui {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #d1d5db;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.notice-toggle-ui::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.notice-toggle input:checked + .notice-toggle-ui {
    background: var(--primary);
}

.notice-toggle input:checked + .notice-toggle-ui::after {
    transform: translateX(18px);
}

.notice-toggle-label {
    color: var(--text);
}

.notice-existing-files .form-label {
    margin-bottom: 6px;
}

.notice-existing-list {
    list-style: none;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    background: var(--surface);
}

.notice-existing-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}

.notice-existing-item:last-child {
    border-bottom: none;
}

.notice-delete-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #b91c1c;
    cursor: pointer;
}

.notice-existing-name {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.notice-existing-size {
    font-size: 11px;
    color: var(--muted);
}

@media (max-width: 960px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px;
    }

    .sidebar-link {
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-link.is-active {
        border-bottom-color: #fff;
    }

    .org-layout {
        grid-template-columns: 1fr;
    }

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

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notice-meta {
        grid-template-columns: 1fr;
    }

    .notice-view-head {
        padding-right: 0;
    }

    .notice-view-actions-top {
        position: static;
        margin-bottom: 12px;
        justify-content: flex-start;
    }

    .notice-list-meta-head,
    .notice-list-meta {
        white-space: normal;
        width: auto;
        text-align: left !important;
    }

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


/* ----- 조직도 모던 개편 ----- */
.org-layout-modern {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
}

.org-tree-panel-modern,
.org-members-panel-modern {
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: 12px;
    padding: 14px;
}

.org-tree-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.org-tree-title {
    margin: 0;
}

.org-total-badge {
    background: #e8f1ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.org-tree-modern {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.org-tree-item-modern {
    list-style: none;
}

.org-tree-tab {
    width: 100%;
    border: 1px solid var(--border-panel);
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: all .18s ease;
}

.org-tree-tab:hover {
    border-color: #93c5fd;
    background: #eef5ff;
}

.org-tree-tab.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.org-tree-tab-title {
    font-weight: 700;
    font-size: 13px;
}

.org-tree-tab-count {
    font-size: 12px;
    opacity: .9;
}

.org-tree-manager {
    margin-top: 6px;
    margin-left: 4px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.org-tree-manager i {
    color: #d97706;
}

.org-tree-manager-empty {
    opacity: .8;
}

.org-members-header-modern h3 {
    margin: 0;
    font-size: 18px;
}

.org-members-header-modern p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.org-members-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.org-profile-card {
    background: #fff;
    border: 1px solid var(--border-panel);
    border-radius: 12px;
    padding: 14px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.org-profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.org-profile-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.org-profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-panel);
    background: #eaf1ff;
}

.org-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 18px;
    font-weight: 700;
}

.org-profile-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.org-profile-position {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.org-profile-body {
    display: grid;
    gap: 7px;
    font-size: 12px;
}

.org-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
}

.org-contact-item i {
    width: 14px;
    text-align: center;
    color: #2563eb;
}

@media (max-width: 1080px) {
    .org-layout-modern {
        grid-template-columns: 1fr;
    }
}

.org-profile-headline {
    min-width: 0;
    flex: 1;
}

/* ----- 거래처 관리: 조직도 UI 통일 ----- */
.customer-org-page-bg {
    background: #f4f5f7;
    margin: -10px -12px -14px;
    padding: 12px 12px 28px;
    min-height: calc(100vh - 120px);
    box-sizing: border-box;
}

/* draft_form: 사이드바 겹침/여백 보정 + 풀 와이드 */
body.page-draft-form .app-content {
    padding-left: 0;
    padding-right: 0;
}

body.page-draft-form .customer-org-page-bg {
    margin: 0;
    padding: 12px 16px 28px;
}

body.page-draft-form .customer-form-org-card {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* draft_form: 상단 4필드 수직 중앙 정렬 */
body.page-draft-form .host-form-row-4 {
    align-items: center;
}

.customer-detail-page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.customer-detail-org-layout {
    align-items: stretch;
}

.customer-detail-sidebar .customer-org-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px 4px;
}

.customer-org-identity-text {
    margin-top: 12px;
    width: 100%;
}

.customer-org-identity-text .org-profile-name {
    font-size: 15px;
    line-height: 1.35;
    word-break: keep-all;
}

.customer-org-identity-text .org-profile-position {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.customer-detail-main {
    min-width: 0;
}

.customer-org-info-card .org-profile-body {
    gap: 9px;
}

.customer-org-section-heading {
    margin: 22px 0 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.customer-org-section-heading:first-of-type {
    margin-top: 4px;
}

.customer-org-contact-grid {
    margin-bottom: 4px;
}

.customer-org-empty {
    margin: 0 0 8px;
    font-size: 13px;
}

.customer-org-memo-card {
    padding: 16px;
}

.customer-org-memo-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.customer-org-memo-entry {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.customer-org-memo-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.customer-org-memo-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.customer-org-memo-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 거래처 상세: 등록(거래처 등록) 폼과 동일 스킨 */
.customer-form-org-card .customer-detail-view {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.customer-form-org-card .customer-detail-view .customer-saas-card {
    background: #f8fafc;
    box-shadow: none;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
}

.customer-form-org-card .customer-detail-view .customer-saas-card:last-child {
    margin-bottom: 0;
}

.customer-detail-static {
    min-height: 0;
    padding: 10px 12px;
    font-size: 13px;
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.customer-detail-static--mono {
    font-variant-numeric: tabular-nums;
}

.customer-detail-link {
    color: #2563eb;
    text-decoration: none;
}

.customer-detail-link:hover {
    text-decoration: underline;
}

.customer-saas-contact-card--readonly {
    padding-right: 16px;
}

.customer-detail-view .customer-saas-memo-history {
    margin-bottom: 16px;
}

.customer-detail-memo-form {
    margin: 0;
}

.customer-detail-memo-actions {
    margin-top: 12px;
}

/* 거래처 상세: 한 화면 밀도(스크롤 최소화) */
.customer-org-page-bg--detail-compact {
    padding-top: 8px;
    padding-bottom: 16px;
    min-height: auto;
}

.page-head--detail-tight {
    margin-bottom: 10px;
}

.customer-detail-view--compact .customer-detail-bento {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

@media (max-width: 1024px) {
    .customer-detail-view--compact .customer-detail-bento {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1400px) {
    .customer-detail-view--compact .customer-detail-bento {
        gap: 16px;
        grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    }
}

.customer-detail-view--compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-form-org-card .customer-detail-view--compact .customer-saas-card {
    margin-bottom: 0;
}

.customer-detail-view--compact .customer-saas-card-title--compact {
    margin: 0 0 8px;
    font-size: 0.65rem;
}

.customer-detail-dense-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
    align-items: start;
}

.customer-detail-dense-grid .form-row {
    gap: 2px;
    min-width: 0;
}

.customer-detail-dense-grid .form-label {
    font-size: 11px;
}

.customer-detail-dense-grid .customer-form-full {
    grid-column: 1 / -1;
}

.customer-detail-dense-grid .customer-detail-span-2 {
    grid-column: span 2;
}

@media (max-width: 720px) {
    .customer-detail-dense-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-dense-grid .customer-detail-span-2 {
        grid-column: span 1;
    }
}

.customer-detail-view--compact .customer-detail-static {
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 6px;
    min-height: 1.35em;
}

.customer-detail-view--compact .customer-detail-static:empty::before {
    content: '\00a0';
}

.customer-detail-contacts-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.customer-detail-contact-section {
    min-width: 0;
}

.customer-detail-contact-heading {
    margin: 0 0 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.customer-detail-contact-person--sep {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8eef0;
}

.customer-detail-memo-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 12px;
    align-items: start;
}

@media (min-width: 1200px) {
    .customer-detail-memo-split {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .customer-detail-memo-split {
        grid-template-columns: 1fr;
    }
}

.customer-saas-memo-history--scroll {
    max-height: min(200px, 28vh);
    overflow-y: auto;
    padding-right: 4px;
    margin: 0;
}

.customer-saas-memo-pill--compact {
    padding: 8px 10px;
    margin-bottom: 6px;
}

.customer-saas-memo-pill--compact:last-child {
    margin-bottom: 0;
}

.customer-saas-memo-pill--compact .customer-saas-memo-meta {
    margin-bottom: 4px;
    font-size: 0.7rem;
}

.customer-saas-memo-pill--compact .customer-saas-memo-body {
    font-size: 0.8125rem;
    line-height: 1.4;
}

.customer-saas-memo-pill-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.customer-saas-memo-pill-head .customer-saas-memo-meta {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.customer-saas-memo-pill--compact .customer-saas-memo-pill-head .customer-saas-memo-meta {
    margin-bottom: 0;
}

.customer-memo-inline-form {
    display: inline-flex;
    margin: 0;
    flex-shrink: 0;
}

.customer-memo-delete-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.customer-memo-delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.customer-detail-memo-textarea {
    min-height: 52px;
    resize: vertical;
}

.customer-detail-view--compact .customer-detail-memo-actions {
    margin-top: 8px;
}

.customer-form-org-card .customer-detail-view--compact .customer-saas-card {
    padding: 12px 14px;
}

/* 호스트 관리 */
.host-form-inner {
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.host-form-inner .customer-saas-card {
    margin: 0;
}

.host-form-inner .customer-saas-card-title {
    margin: 0 0 7px;
    font-size: 0.84rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: none;
    letter-spacing: -0.01em;
}

.host-form-inner .customer-saas-subsection-title {
    margin: 0 0 6px;
    font-size: 0.76rem;
    color: #334155;
}

.host-form-inner .form-input {
    padding: 6px 9px;
    min-height: 30px;
}

.host-form-inner .form-textarea {
    padding: 7px 9px;
    min-height: 100px;
}

.host-loc-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.5fr) auto;
    gap: 10px 12px;
    align-items: end;
}

.host-location-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.host-location-card {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.host-location-card-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.host-location-card-ip {
    margin: 0 0 6px;
    font-size: 12px;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
}

.host-location-card-memo {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
    word-break: break-word;
}

.host-location-card-actions {
    margin-top: 10px;
}

.customer-saas-pill--go {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.customer-saas-pill--go:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.host-list-link-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
}

.host-list-link-text {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
}

.host-list-link-text--action {
    color: #1d4ed8;
    text-decoration: none;
}

.host-list-link-text--action:hover {
    text-decoration: underline;
}

.host-copy-text {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #1f2937;
    font: inherit;
    cursor: pointer;
    font-weight: 400;
    text-decoration: none;
    text-align: left;
}

.host-copy-text:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.fs-copy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10050;
    max-width: min(90vw, 360px);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.fs-copy-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.fs-copy-toast--success {
    background: #0f172a;
    color: #f8fafc;
}

.fs-copy-toast--error {
    background: #b91c1c;
    color: #fef2f2;
}

.host-homepage-cell {
    text-align: left !important;
}

.host-homepage-cell .host-list-link-cell {
    justify-content: space-between;
}

.host-homepage-cell .host-list-link-text {
    max-width: calc(100% - 44px);
}

.customer-saas-pill--go-mini {
    padding: 0.03rem 0.18rem;
    font-size: 0.5rem;
    min-height: 12px;
    line-height: 1;
}

/* ----- 업무보고 (Work Report) ----- */
.wr-detail-shell {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    padding: 30px;
}

/* Summernote 통합: 업무보고 작성/상세 화면 타이포 통일 */
.report-section-title {
    margin: 0 0 15px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #495057;
    border-bottom: 1px dashed #ced4da;
    padding-bottom: 10px;
    letter-spacing: -0.01em;
}

.wr-detail-head {
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.wr-detail-title-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.wr-detail-title {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.35;
    color: var(--text);
    min-width: 0;
    word-break: break-word;
}

.wr-detail-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.wr-badge-date {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.wr-detail-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 13px;
    color: #334155;
}

.wr-detail-meta-muted {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.wr-section {
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wr-section:last-child {
    margin-bottom: 0;
}

.wr-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

.wr-section-desc {
    margin: -4px 0 12px;
    font-size: 12px;
    color: var(--muted);
}

.wr-section-body {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.wr-comment-form {
    margin-top: 12px;
}

.wr-comment-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wr-comment-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 12px;
}

.wr-comment-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.wr-comment-body {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.wr-table th,
.wr-table td {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

.wr-table {
    table-layout: fixed;
}

.wr-table thead th,
.wr-table tbody td {
    text-align: left;
    vertical-align: middle;
}

.wr-col-date {
    width: 132px;
}

.wr-col-title {
    width: auto;
}

.wr-col-author {
    width: 124px;
}

.wr-col-dept {
    width: 112px;
}

.wr-col-status {
    width: 190px;
}

.wr-td-title {
    min-width: 280px;
    word-break: break-word;
}

.wr-badge-reviewed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 26px;
    min-width: 62px;
    padding: 0 10px;
    line-height: 1;
    border-radius: 6px;
    box-sizing: border-box;
    font-weight: 700;
}

.wr-badge-pending {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 26px;
    min-width: 62px;
    padding: 0 10px;
    line-height: 1;
    border-radius: 6px;
    box-sizing: border-box;
    font-weight: 700;
}

.wr-badge-comment {
    background: #e0f2fe;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 26px;
    min-width: 62px;
    padding: 0 10px;
    line-height: 1;
    border-radius: 6px;
    box-sizing: border-box;
    font-weight: 700;
}

.wr-muted {
    color: var(--muted);
}

.wr-badge-icon {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.wr-badge-icon--pending {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.wr-badge-icon--reviewed {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.wr-badge-icon--comment {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.18);
}

.wr-list-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.wr-list-search-panel {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

/* 업무보고 목록: 필터 황금비 그리드 (기간 : 부서 : 피드백 : 검색 : 버튼) */
.search-filter-row {
    display: grid !important;
    grid-template-columns: minmax(280px, 2.5fr) 1fr 1fr 2fr auto !important;
    gap: 16px !important;
    align-items: end !important;
    width: 100% !important;
}

.search-filter-row input[type="text"],
.search-filter-row input[type="search"],
.search-filter-row select {
    width: 100% !important;
}

.wr-search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wr-search-field .form-input,
.wr-search-field .form-control {
    width: 100%;
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.wr-search-field--actions {
    justify-self: start;
}

.wr-search-submit-btn {
    white-space: nowrap;
}

.wr-search-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    margin: 0;
}

.wr-search-label--spacer {
    visibility: hidden;
    user-select: none;
    font-size: 11px;
    line-height: 1.2;
    min-height: 1.2em;
}

.wr-date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: center;
}

.wr-date-sep {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.wr-view-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.wr-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wr-view-tab:hover {
    color: #334155;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wr-view-tab.is-active {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #eff6ff;
}

/* ----- 시안 관리 (design_drafts) ----- */
.draft-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.draft-list-panel {
    padding-bottom: 20px;
}

.draft-search-panel {
    margin-bottom: 16px !important;
}

.draft-filter-row.search-filter-row {
    grid-template-columns: minmax(220px, 2.5fr) minmax(140px, 1.2fr) auto !important;
    gap: 16px !important;
}

.draft-list-empty {
    margin: 16px 0;
}

.draft-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.draft-card {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.draft-card__thumb {
    width: 112px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.draft-card__thumb-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draft-card__thumb-inner--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.draft-card__thumb-inner--empty {
    color: #94a3b8;
    font-size: 1.5rem;
}

.draft-card__thumb-inner--pdf {
    flex-direction: column;
    gap: 4px;
    color: #b91c1c;
    font-size: 1.75rem;
    font-weight: 700;
}

.draft-card__thumb-inner--pdf span {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.draft-card__thumb-inner--file {
    color: #64748b;
    font-size: 1.5rem;
}

.draft-card__main {
    min-width: 0;
}

.draft-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 6px;
}

.draft-card__project {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3b82f6;
}

.draft-card__ver {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 999px;
}

.draft-card__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.draft-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.draft-card__date {
    font-size: 0.8rem;
    color: #64748b;
}

.draft-card__link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
}

.draft-card__link:hover {
    text-decoration: underline;
}

.draft-card__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.draft-inline-del {
    margin: 0;
    padding: 0;
    display: inline;
    vertical-align: baseline;
}

.draft-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.draft-badge--review {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.draft-badge--change {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.draft-badge--ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* 시안 등록·목록: 본문 좌우 여백 축소, 폼 카드 풀폭 */
body.page-draft-form .app-content,
body.page-draft-list .app-content {
    padding-left: 0;
    padding-right: 0;
}

.draft-page-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

@media (min-width: 992px) {
    .draft-page-inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}

body.page-draft-form .content-card--draft {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    border-color: #e6ebf2;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

form.draft-form--intranet .draft-form__actions.form-buttons {
    margin-top: 20px;
}

.draft-page-main-title {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

/* ---- draft_form: 최신 ERP 스타일(상단 1줄 + 첨부 목록 정렬) ---- */
body.page-draft-form .content-card--draft {
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.page-draft-form .draft-erp-input,
body.page-draft-form .draft-erp-input:focus {
    font-size: 14px;
}

.draft-erp-topbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #fff;
    overflow-x: auto;
}

.draft-erp-topfield {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.draft-erp-toplabel {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.draft-erp-topcontrol {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.draft-erp-input {
    height: 38px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding-left: 12px;
    padding-right: 12px;
    background: #fff;
    color: #111827;
}

.draft-erp-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.draft-erp-btn {
    height: 38px;
    border-radius: 10px;
}

.draft-erp-domain-radios {
    display: flex;
    align-items: center;
    gap: 14px;
}

.draft-erp-rowgrid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(260px, 1.2fr) 44px;
    gap: 14px;
    align-items: start;
}

.draft-erp-field .form-label {
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #374151;
}

.draft-erp-rowactions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 22px; /* labels(6px) + input(38px) 근사로 아이콘 중앙 정렬 */
}

.draft-row-remove--icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.draft-upload-panel__add {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

.draft-erp-form-actions {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.draft-dropzone__ui--compact {
    min-height: 118px;
    padding: 14px 12px;
}

/* draft_form: col-sm-* (Bootstrap 미포함 시) */
.draft-form--intranet .row {
    display: flex;
    flex-wrap: wrap;
    --draft-row-gutter: 8px;
    margin-left: calc(var(--draft-row-gutter) * -0.5);
    margin-right: calc(var(--draft-row-gutter) * -0.5);
}

.draft-form--intranet .row > [class*="col-"] {
    padding-left: calc(var(--draft-row-gutter) * 0.5);
    padding-right: calc(var(--draft-row-gutter) * 0.5);
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 576px) {
    .draft-form--intranet .row > .col-sm-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .draft-form--intranet .row > .col-sm-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .draft-form--intranet .row > .col-sm-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .draft-form--intranet .text-sm-end {
        text-align: right;
    }
}

@media (min-width: 768px) {
    .draft-form--intranet .row > .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .draft-form--intranet .row > .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .draft-form--intranet .row > .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
}

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

.draft-form--intranet .pt-3 {
    padding-top: 1rem;
}

.draft-form--intranet .mt-4 {
    margin-top: 1.5rem;
}

.draft-form--intranet .mb-2 {
    margin-bottom: 0.5rem;
}

.draft-form--intranet .my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.draft-form--intranet .px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.draft-form--intranet .border-top {
    border-top: 1px solid var(--border-soft, #e8ecf1);
}

.draft-form--intranet .min-w-0 {
    min-width: 0;
}

.draft-form--intranet .gap-2 {
    gap: 8px;
}

.draft-form--intranet .gap-3 {
    gap: 12px;
}

.draft-form--intranet .flex-shrink-0 {
    flex-shrink: 0;
}

.draft-form--intranet .align-items-stretch {
    align-items: stretch;
}

.draft-form--intranet .align-items-center {
    align-items: center;
}

.draft-form--intranet .align-items-start {
    align-items: flex-start;
}

.draft-form--intranet .form-check.mb-0 {
    margin-bottom: 0;
}

/* 시안 등록 상단: 고정 라벨 너비 + 수평 정렬 */
.draft-form-top-fields {
    margin-bottom: 0;
}

.draft-hfield {
    width: 100%;
    min-width: 0;
    min-height: 38px;
}

.draft-hfield__label {
    flex: 0 0 112px;
    max-width: 112px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
    line-height: 1.3;
}

.draft-hfield__control {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.draft-hfield__control .form-select,
.draft-hfield__control .form-control {
    height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.draft-hfield--domain .draft-form-domain-radios {
    min-height: 36px;
}

.draft-hfield--domain .form-check-label {
    line-height: 1.35;
}

form.draft-form--intranet .draft-form-section-upload {
    margin: 20px 0 12px;
    font-size: 0.95rem;
    color: #1f2937;
}

/* 시안 첨부 패널 (계약 카드와 동일한 테두리 톤) */
.draft-upload-panel {
    border: 1px solid #eee;
    border-radius: var(--radius);
    background: var(--surface);
    padding: 16px 16px 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.draft-upload-panel__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid var(--border-soft, #e8ecf1);
}

/* 시안 등록: 반복 행 (패널 내부) */
.draft-upload-panel .draft-item-row--box {
    position: relative;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.draft-upload-panel .draft-item-row--box:last-child {
    margin-bottom: 0;
}

.draft-item-row__inner {
    align-items: stretch;
    gap: 14px 14px;
}

.draft-item-fields {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 132px;
}

.draft-item-input {
    min-height: 38px;
}

.draft-item-row--box .draft-dropzone__ui--compact {
    min-height: 110px;
    padding: 12px 12px;
}

.draft-item-row--box .draft-dropzone__icon {
    font-size: 1.65rem;
}

.draft-item-row--box .draft-dropzone__text {
    font-size: 0.85rem;
    line-height: 1.35;
}

.draft-row-remove--floating {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    font-size: 0.75rem;
}

.draft-form__actions .btn {
    min-width: 96px;
}

.draft-form__actions .btn:not(.btn-secondary) {
    background: var(--business-accent, #2563eb);
    border-color: var(--business-accent, #2563eb);
    color: #fff;
}

.draft-form__actions .btn:not(.btn-secondary):hover {
    filter: brightness(0.96);
}

@media (min-width: 576px) {
    .draft-form--intranet .pt-sm-2 {
        padding-top: 0.5rem;
    }

    .draft-form--intranet .pt-sm-1 {
        padding-top: 0.25rem;
    }
}

.draft-list-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 1.5rem;
}

.draft-list-page-head h4.mb-0 {
    margin-bottom: 0;
}

.draft-list-page-head .btn-primary {
    white-space: nowrap;
}

.draft-list-page-head .me-1 {
    margin-right: 0.35rem;
}

.draft-list-filter-card .flex-grow-1 {
    flex: 1 1 auto;
}

.draft-list-filter-card .flex-sm-grow-0 {
    flex-grow: 1;
}

@media (min-width: 576px) {
    .draft-list-filter-card .flex-sm-grow-0 {
        flex-grow: 0;
    }
}

.draft-list-filter-card .w-auto {
    width: auto;
}

.draft-list-filter-card .card-body {
    padding: 10px 14px;
}

.draft-list-filter-card .card-body.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.draft-list-filter-card .draft-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    padding: 0;
    margin: 0;
    border: 0;
}

.draft-list-filter-card .draft-list-toolbar .form-select {
    min-width: 160px;
    max-width: 320px;
    flex: 1 1 160px;
}

.draft-list-filter-card .draft-list-toolbar .btn {
    flex-shrink: 0;
}

.btn-dark {
    background: #2c3338;
    color: #fff;
    border: 1px solid #1d2327;
}

.btn-dark:hover {
    background: #1d2327;
    color: #fff;
}

/* Minimal Bootstrap-like utilities used in draft pages */
.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-end {
    justify-content: flex-end;
}

.align-items-center {
    align-items: center;
}

.text-nowrap {
    white-space: nowrap;
}

.w-auto {
    width: auto;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.me-1 {
    margin-right: 0.25rem;
}

.draft-list-flat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--border-soft);
}

.draft-list-flat-table thead th {
    padding: 8px 10px;
    font-weight: 600;
    font-size: 12px;
    background: #f6f7f7;
    border-bottom: 1px solid var(--border-panel);
    vertical-align: middle;
    text-align: center;
}

.draft-list-flat-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    text-align: center;
}

.draft-list-flat-table tbody tr:hover td {
    background: rgba(52, 152, 219, 0.06);
}

/* 공통: 테이블 지브라 스트라이프 */
.draft-list-flat-table tbody tr:nth-child(even),
.agency-project-table tbody tr:nth-child(even),
.board-table--striped tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.draft-list-flat-table tbody tr:nth-child(odd),
.agency-project-table tbody tr:nth-child(odd),
.board-table--striped tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.draft-list-flat-table .draft-list-col-project,
.draft-list-flat-table .draft-list-col-title,
.draft-list-flat-table th.draft-list-col-project,
.draft-list-flat-table th.draft-list-col-title {
    text-align: left;
}

.draft-list-flat-table .draft-list-col-project {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draft-list-flat-table .draft-list-col-num {
    width: 48px;
    white-space: nowrap;
}

.draft-list-actions-inner {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.draft-list-sub-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: #e8ecf1;
    border-radius: 999px;
    vertical-align: middle;
}

.draft-list-table-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.draft-list-col-actions {
    text-align: right;
}

.draft-upload-container--boxed {
    margin-top: 4px;
    padding: 16px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: #f8fafc;
}

.draft-bulk-zone {
    margin-bottom: 12px;
}

.draft-bulk-zone__label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.draft-bulk-zone__help {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

.draft-bulk-dropzone {
    padding: 10px 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.draft-bulk-dropzone:hover {
    border-color: #94a3b8;
}

.draft-bulk-dropzone.is-dragover {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.draft-intranet-table thead th {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.draft-intranet-table__row-project td {
    background: #f1f5f9;
    font-weight: 600;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.draft-intranet-table__row-draft td {
    vertical-align: middle;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8ecf1;
}

.draft-intranet-table__row-project + .draft-intranet-table__row-draft td {
    box-shadow: inset 0 1px 0 #dbe2ea;
}

.draft-intranet-table__cell-sub {
    min-width: 0;
}

.draft-intranet-table__cell-sub--nested {
    padding-left: 2rem !important;
    position: relative;
}

.draft-intranet-table__cell-sub--nested::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 2px #e2e8f0;
    pointer-events: none;
}

.draft-intranet-table__draft-title {
    font-weight: 600;
    color: #1e293b;
}

.draft-intranet-table__subtag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 6px;
    vertical-align: middle;
}

.draft-intranet-table__num {
    text-align: center;
    white-space: nowrap;
    width: 100px;
}

.draft-intranet-table__act {
    width: 1%;
    max-width: min(420px, 48vw);
    vertical-align: middle;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.draft-intranet-table__act-row {
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
}

.draft-intranet-table__act .draft-intranet-table__act-row .btn {
    flex-shrink: 0;
}

.draft-inline-del--table {
    display: inline-flex !important;
    margin: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.draft-inline-del--table .btn {
    flex-shrink: 0;
}

.draft-list-toolbar {
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-soft, #e8ecf1);
}

.draft-list-toolbar__row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

@media (min-width: 576px) {
    .draft-list-toolbar__row {
        flex-wrap: nowrap !important;
        align-items: flex-end !important;
    }

    .draft-list-toolbar__row > [class*="col-"] {
        width: auto;
        max-width: none;
    }

    .draft-list-toolbar__row .form-select {
        min-width: 160px;
        max-width: 280px;
    }
}

.draft-list-panel.card {
    padding: 12px 14px 14px;
}

.draft-list-panel .draft-list-toolbar {
    margin-left: 0;
    margin-right: 0;
}

.draft-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.draft-form--intranet .draft-form-field-row .form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text, #334155);
}

.draft-form--intranet .col-form-label {
    padding-top: 0;
}

@media (min-width: 768px) {
    .draft-form--intranet .draft-form-field-row .col-form-label {
        text-align: right;
        padding-right: 0.5rem;
    }
}

.draft-form-section-rule {
    border: 0;
    border-top: 1px solid var(--border-soft, #e8ecf1);
    opacity: 1;
}

.draft-form-domain-radios .form-check-label {
    font-size: 0.875rem;
    cursor: pointer;
}

.draft-upload-block {
    margin-top: 0;
}

.draft-form-alert {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius, 6px);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
}

.draft-required-star {
    color: #dc2626;
    font-weight: 700;
}

.draft-project-code-row__input {
    min-width: 0;
    max-width: 360px;
}

.draft-code-feedback {
    margin: 6px 0 0;
    font-size: 12px;
    min-height: 1.25em;
    line-height: 1.4;
}

.draft-code-feedback.is-ok {
    color: #15803d;
}

.draft-code-feedback.is-bad {
    color: #b91c1c;
}

.draft-link-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.draft-link-input-group__domain {
    flex: 0 0 auto;
    max-width: 250px;
    width: 100%;
    min-width: min(250px, 100%);
}

.draft-link-input-group--domain-only .draft-link-input-group__domain {
    max-width: min(420px, 100%);
}

.draft-link-readonly-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.draft-link-readonly-wrap__input {
    flex: 1 1 220px;
    min-width: 0;
    background: #f8fafc !important;
    color: #334155 !important;
    cursor: default;
}

.draft-link-copy-btn {
    flex-shrink: 0;
    align-self: stretch;
}

.draft-link-hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
}

.border-dashed {
    border-style: dashed !important;
}

.draft-form-actions {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.draft-dropzone {
    position: relative;
    border-radius: 12px;
}

.draft-dropzone__input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.draft-dropzone__ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    padding: 20px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.draft-dropzone__ui:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.draft-dropzone.is-dragover .draft-dropzone__ui {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.draft-dropzone__icon {
    font-size: 2rem;
    color: #64748b;
}

.draft-dropzone__text {
    font-size: 0.9rem;
    color: #475569;
    text-align: center;
}

.draft-dropzone__hint {
    font-size: 0.75rem;
    color: #94a3b8;
}

.draft-dropzone__filename {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1d4ed8;
    max-width: 100%;
    text-align: center;
    word-break: break-all;
}

.draft-current-file {
    margin: 10px 0 4px;
    font-size: 0.85rem;
    color: #64748b;
}

.draft-remove-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.draft-upload-container,
.draft-upload-container--boxed {
    margin-top: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.draft-upload-head {
    display: none;
}

.draft-upload-hint {
    display: none;
}

.draft-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.draft-item-row {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 80px;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.draft-item-row--compact {
    display: block;
    padding: 6px 8px;
    margin-bottom: 0;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    background: #f8fafc;
    box-shadow: none;
}

.draft-form--intranet .draft-item-row.border-bottom.border-light {
    border-bottom: 1px solid #e8ecf1;
}

.draft-item-row--compact + .draft-item-row--compact {
    margin-top: 4px;
}

.draft-item-row--compact .draft-item-file.form-control {
    padding: 0.28rem 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.draft-item-row--with-path {
    grid-template-columns: 1.35fr 1.35fr 1fr 2.2fr 72px;
}

.draft-item-row__path {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.draft-item-row__path input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.draft-item-row__sub,
.draft-item-row__name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.draft-item-row__file {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.draft-item-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.draft-item-row--compact .form-label.small {
    line-height: 1.2;
}

.draft-item-row__sub input[type="text"],
.draft-item-row__name input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.draft-item-row__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    padding: 0;
}

.draft-row-remove--icon {
    width: 36px;
    min-width: 36px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.draft-row-remove--icon .fa-trash-can {
    pointer-events: none;
}

@media (max-width: 1100px) {
    .draft-item-row:not(.draft-item-row--compact) {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .draft-item-row--with-path .draft-item-row__path {
        grid-column: 1 / -1;
    }

    .draft-item-row:not(.draft-item-row--compact) .draft-item-row__file {
        grid-column: 1 / -1;
    }

    .draft-item-row__actions {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 720px) {
    .draft-item-row:not(.draft-item-row--compact) {
        grid-template-columns: 1fr;
    }

    .draft-item-row:not(.draft-item-row--compact) .draft-item-row__file {
        grid-column: auto;
    }

    .draft-item-row:not(.draft-item-row--compact) .draft-item-row__actions {
        grid-column: auto;
        justify-self: end;
    }

    .draft-add-row-btn {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .draft-card {
        grid-template-columns: 96px 1fr;
    }

    .draft-card__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
    }

    .draft-card__thumb {
        width: 96px;
        height: 72px;
    }
}

@media (max-width: 720px) {
    .draft-filter-row.search-filter-row {
        grid-template-columns: 1fr !important;
    }

    .draft-card {
        grid-template-columns: 1fr;
    }

    .draft-card__thumb {
        width: 100%;
        height: 140px;
        max-width: 100%;
    }
}

/* 프로젝트 그룹핑 시안 목록 */
.draft-group-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    background: var(--surface);
}

.draft-group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.draft-group-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--text);
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-panel);
    white-space: nowrap;
}

.draft-group-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.draft-group-row {
    background-color: #f8fafc;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.draft-group-row:hover {
    background-color: #f1f5f9;
}

.draft-group-row td {
    font-weight: 600;
}

.draft-group-row.draft-tree-row-depth1 {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.draft-group-row.draft-tree-row-depth1:hover {
    background: #e2e8f0;
}

.draft-group-row.draft-tree-row-depth1 td {
    color: #0f172a;
    font-weight: 600;
    border-bottom-color: #e2e8f0;
}

.draft-group-row.draft-tree-row-depth1 time {
    color: #475569;
    font-weight: 500;
}

.draft-group-row.draft-tree-row-depth1 .draft-group-toggle {
    border-color: #cbd5e1;
    color: #334155;
    background: #fff;
}

.draft-group-row.draft-tree-row-depth1 .draft-group-toggle:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.draft-tree-nested {
    padding: 0 0 12px;
    background: #fff;
}

.draft-tree-colhead {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 1.2fr);
    gap: 12px 16px;
    align-items: center;
    padding: 8px 16px 8px 14px;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}

.draft-tree-colhead__cell--actions {
    text-align: right;
}

.draft-tree-sub-block {
    margin-bottom: 8px;
}

.draft-tree-sub-block:last-child {
    margin-bottom: 0;
}

.draft-tree-depth2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 4px 12px 4px 14px;
    margin: 0;
    background: #f8fafc;
    border-left: 2px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.draft-tree-depth2__branch {
    color: #94a3b8;
    font-weight: 600;
    user-select: none;
}

.draft-tree-depth2__name {
    flex: 1 1 auto;
    min-width: 0;
    color: #475569;
}

.draft-tree-depth2__count {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.draft-tree-items {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-left: 2px solid #e8eef4;
}

.draft-tree-item {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 1.2fr);
    gap: 12px 16px;
    align-items: center;
    padding: 10px 14px 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.draft-tree-item:last-child {
    border-bottom: none;
}

.draft-tree-item__cell {
    min-width: 0;
}

.draft-tree-item__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
}

.draft-tree-item__name {
    font-weight: 600;
    color: #0f172a;
}

.draft-tree-item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 6px;
}

.draft-tree-action-sep {
    color: #cbd5e1;
    font-weight: 400;
    user-select: none;
}

.draft-link {
    display: inline;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}

.draft-link:hover {
    text-decoration: underline;
}

.draft-link--primary {
    color: #2563eb;
}

.draft-link--primary:hover {
    color: #1d4ed8;
}

.draft-link--muted {
    color: #64748b;
}

.draft-link--muted:hover {
    color: #334155;
}

.draft-link--danger {
    color: #b91c1c;
}

.draft-link--danger:hover {
    color: #991b1b;
}

.draft-link--btn {
    vertical-align: baseline;
}

.draft-link-placeholder {
    color: #cbd5e1;
    font-size: 12px;
}

@media (max-width: 900px) {
    .draft-tree-colhead,
    .draft-tree-item {
        grid-template-columns: 1fr 1fr;
    }

    .draft-tree-colhead__cell--actions,
    .draft-tree-item__actions {
        grid-column: 1 / -1;
        text-align: left;
        justify-content: flex-start;
    }
}

.draft-group-expand-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border-panel);
    background: #fff;
}

.draft-group-expand-row .draft-sub-table-wrap {
    padding: 0 0 8px;
}

.draft-sub-table {
    width: 100%;
    margin: 0;
    background: #ffffff;
    border-left: 3px solid #3b82f6;
}

.draft-sub-table th,
.draft-sub-table td {
    padding: 8px 16px;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.9rem;
    text-align: left;
    vertical-align: middle;
}

.draft-sub-table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

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

.draft-sub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.draft-sub-version {
    margin-left: 6px;
    font-size: 0.85em;
    font-weight: 500;
    color: #64748b;
}

.badge-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
}

.badge-status--review {
    background: #fef9c3;
    color: #854d0e;
}

.badge-status--change {
    background: #ffe4e6;
    color: #9f1239;
}

.badge-status--ok {
    background: #d1fae5;
    color: #065f46;
}

.draft-group-manage {
    white-space: nowrap;
}

.draft-group-toggle .fa-chevron-down {
    transition: transform 0.2s ease;
}

.draft-group-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.wr-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.wr-sort-link:hover {
    text-decoration: underline;
}

.wr-sort-icon {
    color: #64748b;
    font-size: 11px;
}

.wr-list-bottom {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.wr-list-page-size-form {
    justify-self: end;
}

@media (max-width: 720px) {
    .wr-detail-shell {
        padding: 18px;
    }
    .wr-detail-title-row {
        flex-direction: column;
        align-items: stretch;
    }
    .wr-detail-badges {
        justify-content: flex-start;
    }
    .wr-td-title {
        min-width: 0;
    }

    .wr-col-date,
    .wr-col-author,
    .wr-col-dept,
    .wr-col-status {
        width: auto;
    }

    .search-filter-row {
        grid-template-columns: 1fr !important;
    }

    .wr-search-field--actions {
        justify-self: stretch;
    }

    .wr-search-submit-btn {
        width: 100%;
    }

    .wr-view-tabs {
        justify-content: center;
    }

    .wr-list-bottom {
        grid-template-columns: 1fr;
    }

    .wr-list-page-size-form {
        justify-self: center;
    }
}

.host-form-row-4 {
    display: grid;
    /* 기본 호스트 폼: 호스트명·IP 축소, 홈페이지 주소 확대 — IP는 IPv6·긴 값 대비 폭 확보 */
    grid-template-columns: minmax(0, 0.68fr) minmax(140px, 0.58fr) minmax(0, 0.88fr) minmax(0, 1.96fr);
    gap: 10px 14px;
    align-items: end;
}

.host-form-row-5 {
    display: grid;
    /* 관리자 주소 확대, 관리자/마스터 아이디 축소 */
    grid-template-columns: minmax(0, 2.15fr) minmax(88px, 0.48fr) minmax(0, 0.82fr) minmax(88px, 0.48fr) minmax(0, 0.82fr);
    gap: 10px 12px;
    align-items: end;
}

@media (max-width: 1100px) {
    .host-form-row-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .host-loc-add-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------------------------------------------------------------------
 * Draft form 전용 레이아웃 튜닝
 * ------------------------------------------------------------------ */

body.page-draft-form .app-content {
    /* 메인 컨텐츠가 좌측 사이드바 위로 겹치지 않도록 여백 확보 */
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden;
}

body.page-draft-form .customer-org-page-bg {
    margin: 0;
    padding: 12px 16px 28px;
    width: 100%;
    box-sizing: border-box;
}

body.page-draft-form .customer-form-org-card {
    max-width: none;
    width: 100%;
}

body.page-draft-form .customer-form-org-card.customer-form-org-card--detail-wide {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.page-draft-form .customer-form-org-card.customer-form-org-card--detail-wide.content-card {
    padding-left: 12px;
    padding-right: 12px;
}

/* draft_form: 사이드바 침범/오버플로 방지(가로 스크롤/음수 마진 이슈) */
body.page-draft-form .app-main,
body.page-draft-form .app-content,
body.page-draft-form .customer-org-page-bg {
    overflow-x: hidden;
}

body.page-draft-form .host-form-row-4 {
    /* 시안 폼 상단 4개 필드를 완전 균등 분할 */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: center;
}

body.page-draft-form .customer-form-sticky-bar {
    /* 버튼 바가 좌측 사이드바/화면 밖으로 삐져나가지 않게 강제 */
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    box-sizing: border-box;
}

body.page-draft-form .customer-form-sticky-inner {
    /* 버튼 바 내부도 메인 컨텐츠 폭에 꽉 붙여 배치 */
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

/* draft_form: 상단 4필드 라벨 고정 폭 → 간격/정렬 통일 */
body.page-draft-form .host-form-row-4 .draft-erp-topfield {
    min-width: 0;
}

body.page-draft-form .host-form-row-4 .draft-erp-topfield .form-label {
    margin: 0;
    flex: 0 0 100px;
    max-width: 100px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    line-height: 1.2;
}

body.page-draft-form .host-form-row-4 .draft-erp-topcontrol {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

/* draft_form: 입력 박스 폭/높이 키우기 */
body.page-draft-form .draft-erp-input {
    height: 42px;
    font-size: 14px;
    border-radius: 10px;
}

/* draft_form: 시안 첨부 3칸을 한 줄로 더 넓게 */
body.page-draft-form .draft-dropzone__ui--compact {
    width: 100%;
    min-height: 38px;
    padding: 6px 12px;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
}

body.page-draft-form .draft-dropzone__ui--compact .draft-dropzone__text {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

body.page-draft-form .draft-dropzone__ui--compact .draft-dropzone__icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

body.page-draft-form .draft-dropzone__ui--compact .draft-dropzone__filename {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.page-draft-form .draft-attach-cell {
    /* no-op: legacy, 첨부 행은 Bootstrap row/col로만 정렬 */
}

body.page-draft-form .draft-attach-cell--drop {
    gap: 8px;
}

body.page-draft-form .draft-attach-label {
    margin: 0;
    flex: 0 0 78px;
    max-width: 78px;
    font-size: 12.5px;
    font-weight: 800;
    color: #374151;
    line-height: 1.2;
    white-space: nowrap;
}

body.page-draft-form .draft-attach-cell .form-control.draft-erp-input {
    height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
}

body.page-draft-form .draft-attach-cell--drop .draft-dropzone {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-draft-form .draft-current-file-block {
    margin-left: calc(78px + 8px);
}

/* draft_form: + 시안 추가 버튼을 첨부 행 리스트 바로 아래 우측에 */
body.page-draft-form .draft-upload-panel__add {
    margin-top: 8px;
    justify-content: flex-end;
}

/* draft_form: 프로젝트 ID 중복체크 결과(테두리 빨강/초록) */
body.page-draft-form .draft-erp-input.is-bad {
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
}

body.page-draft-form .draft-erp-input.is-ok {
    border-color: #15803d !important;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.10) !important;
}

/* draft_form: 상태·시안 도메인 — Bootstrap 드롭다운 화살표 (전역 .form-select 규칙 보완) */
body.page-draft-form select.form-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 16 16'%3e%3cpath fill='none' stroke='%2364748b' 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 0.65rem center;
    background-size: 14px 10px;
    padding-right: 2rem;
}

@media (max-width: 900px) {
    .host-form-row-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .host-form-row-4,
    .host-form-row-5,
    .host-loc-add-grid {
        grid-template-columns: 1fr;
    }
}

.host-loc-admin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.host-loc-edit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.host-loc-sort-input {
    width: 5rem;
    flex-shrink: 0;
}

.host-loc-label-input {
    flex: 1 1 12rem;
    min-width: 8rem;
}

.host-loc-delete-form {
    flex-shrink: 0;
}

.host-loc-admin-cell {
    vertical-align: middle;
    padding-top: 10px;
    padding-bottom: 10px;
}

.host-loc-admin-table tr.host-loc-row-focus td {
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
}

.host-conn-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.host-cred-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.host-cred-block {
    position: relative;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.host-cred-grid {
    display: grid;
    gap: 7px 10px;
}

.host-cred-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.host-cred-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-cred-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.host-copy-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.host-copy-inline .form-input {
    cursor: copy;
    padding-right: 10px;
}

.host-info-textarea {
    min-height: 210px;
    line-height: 1.55;
}

.host-info-textarea--edit {
    min-height: 315px;
}

@media (max-width: 1200px) {
    .host-cred-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .host-cred-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.host-conn-block {
    position: relative;
    padding: 14px 14px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.host-conn-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-items: start;
}

.host-conn-value-row {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .host-conn-grid {
        grid-template-columns: 1fr;
    }

    .host-cred-grid-4,
    .host-cred-grid-2,
    .host-cred-grid-5 {
        grid-template-columns: 1fr;
    }
}

.customer-list-panel {
    padding: 0;
}

.customer-list-panel-inner {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.customer-list-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 16px;
    padding: 0 2px;
}

.customer-list-search-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 360px;
    min-width: 260px;
}

.customer-list-page-size-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.customer-list-count-badge {
    flex-shrink: 0;
}

.customer-list-search-input {
    flex: 1 1 220px;
    min-width: 160px;
    max-width: 100%;
}

.customer-list-search-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.customer-list-page-size-select {
    width: auto;
    min-width: 110px;
}

.customer-list-bottom-controls {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.customer-list-page-size-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-org-search-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.customer-org-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border-panel);
    border-radius: 10px;
    font-size: 13px;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-org-search-input:focus {
    outline: none;
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.customer-org-table-outer {
    margin-top: 0;
    border-radius: 10px;
    overflow: hidden;
}

.customer-form-org-card {
    max-width: min(960px, 100%);
    margin: 0 auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.customer-form-org-card .org-members-panel-modern {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.customer-form-org-card .customer-saas-card {
    background: #f8fafc;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

/* 거래처 상세: 메인 영역 가로 최대(등록 폼 960px 한도 해제) */
.customer-form-org-card.customer-form-org-card--detail-wide {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.customer-form-org-card.customer-form-org-card--detail-wide.content-card {
    padding: 12px 8px 16px;
}

.customer-form-org-card.customer-form-org-card--detail-wide .customer-detail-view .customer-saas-card {
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

@media (max-width: 1080px) {
    .customer-list-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-list-search-group,
    .customer-list-page-size-group {
        width: 100%;
        margin-left: 0;
    }

    .customer-list-page-size-group {
        justify-content: flex-start;
    }

    .customer-list-search-btn {
        width: 100%;
    }

    .customer-list-bottom-controls {
        justify-content: flex-start;
    }
}

/* ----- 사내 게시판 공통 탭 ----- */
.board-tabs {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-panel);
    background: var(--surface);
    padding: 0 2px;
}

.board-tabs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.board-tabs-item {
    margin: 0;
}

.board-tab {
    display: inline-block;
    padding: 10px 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}

.board-tab:hover {
    color: var(--primary);
}

.board-tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.board-sub-card {
    margin-top: 0;
}

.board-privacy-hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--muted);
}

.badge--replied {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.suggestion-view-card .suggestion-view-head {
    margin-bottom: 0;
}

.suggestion-body-plain {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text);
    word-break: break-word;
}

.suggestion-reply-block {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
}

.suggestion-reply-heading {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.suggestion-reply-body {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text);
}

.suggestion-replied-at {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.suggestion-no-reply {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.suggestion-reply-form {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-panel);
}

.program-board-table .program-url-cell {
    max-width: 420px;
    word-break: break-all;
    font-size: 12px;
    color: var(--muted);
}

.program-board-table .program-col-go {
    width: 100px;
    text-align: center !important;
}

.program-go-cell {
    text-align: center !important;
    vertical-align: middle;
}

/* ----- 근태 (사원 주소록과 동일: app-content > .content-card.card) ----- */
.attendance-page {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* 주소록과 동일: page-head 아래 간격 10px (전역 .page-head와 동일) */
.attendance-page > .page-head {
    margin-bottom: 10px;
}

.attendance-page > .board-title {
    margin: 8px 0 8px;
}

.att-calendar-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}

.att-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.att-today-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin: 0;
    padding: 12px 22px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0ea5e9 100%);
    border-radius: 999px;
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.att-today-pill-label {
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1e3a8a;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.att-today-pill-date {
    font-size: 18px;
}

.att-today-pill-wd {
    font-weight: 700;
    opacity: 0.95;
}

.att-month-nav-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.att-month-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: background .15s ease, color .15s ease, transform .12s ease;
}

.att-month-nav-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.att-hero-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.3fr) minmax(180px, 1fr);
    gap: 16px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-panel);
}

.att-hero-left,
.att-hero-center,
.att-hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.att-hero-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.att-hero-clock {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1.1;
}

.att-hero-center {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.att-hero-form {
    margin: 0;
}

.att-pill {
    min-width: 140px;
    min-height: 52px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
}

.att-pill:disabled {
    cursor: not-allowed;
}

.att-pill--active-blue {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.att-pill--active-blue:hover:not(:disabled) {
    transform: translateY(-1px);
}

.att-pill--done-orange {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}

.att-pill--out.att-pill--active-blue {
    background: linear-gradient(180deg, #4d6bb0 0%, var(--business-accent) 100%);
    box-shadow: 0 6px 20px rgba(36, 58, 110, 0.35);
}

.att-pill--disabled-gray {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    opacity: 0.85;
}

.att-hero-status {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.att-hero-sub {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.att-kpi-grid--personal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
}

.att-list-table,
.att-user-table,
.att-monitor-table {
    width: 100%;
    table-layout: auto;
}

.att-list-table .att-col-date {
    width: 4.5%;
    white-space: nowrap;
}

.att-list-table .att-col-wd {
    width: 5%;
}

.att-list-table .att-col-time {
    width: 7%;
}

.att-list-table .att-col-work {
    min-width: 120px;
}

.att-list-table .att-col-name {
    min-width: 88px;
}

.att-list-table .att-col-dept {
    min-width: 100px;
}

.att-list-table .att-col-pos {
    width: 8%;
}

.att-list-table .att-col-status {
    width: 8%;
}

.att-list-table .att-col-ip {
    min-width: 96px;
    font-size: 12px;
}

.att-tr-late {
    background: rgba(254, 226, 226, 0.45) !important;
}

.att-tr-late:hover td {
    background: rgba(254, 202, 202, 0.5) !important;
}

/* 관리자 실시간 패널: 주소록 카드 안에서 전폭 그리드 */
.att-admin-monitor {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
    padding: 12px;
    background: #f6f7f7;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.att-kpi-grid--monitor {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px;
}

/* 날짜 네비게이션 컨테이너 가로 정렬 */
.attendance-top-nav { display: flex !important; flex-direction: row !important; justify-content: center !important; align-items: center !important; gap: 16px !important; margin-bottom: 24px !important; }

/* 촌스러운 오늘 버튼 모던하게 변경 */
.btn-today-nav { background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #334155 !important; padding: 6px 16px !important; border-radius: 8px !important; font-weight: 600 !important; font-size: 0.95rem !important; box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; transition: all 0.2s ease !important; text-decoration: none !important; }
.btn-today-nav:hover { background: #f8fafc !important; color: #0f172a !important; border-color: #94a3b8 !important; }

/* 월 이동 텍스트/버튼 깔끔하게 */
.month-nav-wrapper { display: flex !important; align-items: center !important; gap: 12px !important; font-size: 1.1rem !important; font-weight: 700 !important; color: #1e293b !important; }

.modern-date-nav { display: flex; align-items: center; gap: 12px; }
.btn-today { padding: 6px 14px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; color: #334155; font-weight: 600; font-size: 0.9rem; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: all 0.2s; }
.btn-today:hover { background: #f8fafc; border-color: #cbd5e1; }
.date-arrows { display: flex; align-items: center; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.btn-arrow { padding: 6px 12px; color: #64748b; text-decoration: none; font-weight: bold; background: #f8fafc; transition: background 0.2s; }
.btn-arrow:hover { background: #e2e8f0; color: #0f172a; }
/* 출근 모니터 등: native date 제거 후에도 클래스가 남아 있을 수 있음 — 투명 금지 */
.date-picker-input {
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
    outline: none;
    border-radius: 6px;
    box-sizing: border-box;
    min-height: 38px;
}

/* KPI 4개 한 줄 정렬 강제 */
.att-kpi-grid--monitor {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.att-kpi-card--monitor {
    min-height: 96px;
    padding: 14px 16px;
    background: var(--surface) !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border-panel) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.att-filter-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.att-filter-num {
    max-width: 100px;
}

@media (max-width: 960px) {
    .att-hero-card {
        grid-template-columns: 1fr;
    }

    .att-hero-center {
        justify-content: flex-start;
    }
}

/* ----- 근태 레거시 보조 클래스 ----- */
.att-page-head {
    align-items: center;
}

.att-flash-msg {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid #c3d9ed;
    background: #f0f6fc;
    color: #1e4d7a;
    font-size: 13px;
}

.att-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.att-summary-card,
.att-action-card,
.att-today-card,
.att-month-card,
.att-admin-hero,
.att-admin-month-card,
.att-user-detail-card {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    margin-bottom: 16px;
}

.att-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.att-kpi-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.att-kpi-card {
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 14px 16px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.att-kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: none;
    letter-spacing: -0.02em;
}

.att-kpi-value {
    font-size: 26px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.1;
}

.att-kpi-value small {
    font-size: 13px;
    font-weight: 700;
    margin-left: 2px;
    color: var(--muted);
}

.att-kpi-hint {
    font-size: 11px;
    color: var(--muted);
}

.att-kpi--in .att-kpi-value { color: #1d4ed8; }
.att-kpi--miss .att-kpi-value { color: #b45309; }
.att-kpi--late .att-kpi-value { color: #b91c1c; }
.att-kpi--hours .att-kpi-value { color: var(--business-accent-strong); }

.att-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
}

.att-digital-clock-wrap {
    flex: 1 1 240px;
    min-width: 220px;
    padding: 12px 16px;
    background: #0f172a;
    border-radius: 8px;
    color: #e2e8f0;
}

.att-digital-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}

.att-digital-clock {
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.att-big-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.att-btn {
    min-width: 120px;
    min-height: 56px;
    font-size: 16px !important;
    font-weight: 800 !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.att-btn-in {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}

.att-btn-out {
    background: var(--business-accent-strong) !important;
    border-color: var(--business-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(36, 58, 110, 0.35);
}

.att-btn:disabled,
.att-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed !important;
    box-shadow: none !important;
    filter: grayscale(0.2);
}

.att-action-hint {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.att-today-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 16px;
    font-size: 13px;
}

.att-today-grid .att-muted {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
}

.att-today-ip {
    grid-column: 1 / -1;
}

.att-time-late {
    color: #b91c1c !important;
    font-weight: 700;
}

.att-month-table .att-time-late {
    font-weight: 700;
}

/* 관리자 실시간 패널 */
.att-admin-hero {
    margin-bottom: 16px;
}

.att-admin-hero-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.att-admin-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.att-admin-title i {
    margin-right: 8px;
    color: var(--primary);
}

.att-admin-date {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.att-subsection-title {
    margin: 18px 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.att-monitor-table-wrap {
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    overflow: auto;
}

.att-monitor-table tbody tr.att-row--ok:hover td {
    background: rgba(52, 152, 219, 0.06) !important;
}

.att-monitor-table tbody tr.att-row--late td {
    background: rgba(254, 226, 226, 0.35);
}

.att-monitor-table tbody tr.att-row--absent td {
    background: rgba(254, 243, 199, 0.45);
}

.att-status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
}

.att-name-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.att-name-link:hover {
    color: var(--primary-dark);
}

.att-user-meta {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
}

/* ----- 관리자 근태 대시보드 (전사 요약 + 2열) ----- */
.att-admin-dashboard {
    max-width: 100%;
}

/* 근태 메뉴: 출퇴근 히어로 제거 시에도 본문·탑바 정렬 유지 */
.att-attendance-admin-home {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.att-admin-home-actions {
    margin: 0 0 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #fff 55%);
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
}

.att-admin-home-lead {
    margin: 0 0 12px;
    font-size: 13px;
    color: #0f172a;
    line-height: 1.5;
}

.att-admin-home-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.att-admin-home-btn-primary {
    background: #0ea5e9 !important;
    border-color: #0284c7 !important;
    color: #fff !important;
    font-weight: 800 !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
}

.att-admin-home-btn-primary:hover {
    background: #0284c7 !important;
}

/* 사원 주소록: 일반 사원은 사번·아이디·권한 컬럼 숨김 시에도 표 폭 유지 */
.addressbook-table {
    width: 100%;
    table-layout: auto;
}

.addressbook-table--compact .title-col {
    min-width: 120px;
}

.addressbook-table th,
.addressbook-table td {
    vertical-align: middle;
}

.addressbook-table .col-num {
    width: 3rem;
    white-space: nowrap;
}

/* ----- 거래처 관리: B2B SaaS 스타일 ----- */
.customer-saas-page {
    max-width: min(1400px, 100%);
    margin: 0 auto;
    padding: 4px 0 32px;
    box-sizing: border-box;
}

.customer-saas-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.customer-saas-list-heading {
    min-width: 0;
}

.customer-saas-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.customer-saas-title--detail {
    font-size: 1.35rem;
}

.customer-saas-subtitle {
    margin: 6px 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.customer-saas-count {
    font-weight: 700;
    color: #0f172a;
}

.customer-saas-list-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.customer-saas-btn-primary {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid #1d4ed8;
    color: #fff !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.customer-saas-btn-primary:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.customer-saas-toolbar {
    margin-bottom: 16px;
}

.customer-saas-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 520px;
}

.customer-saas-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-saas-search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.customer-saas-search-submit {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

.customer-saas-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.875rem;
    font-weight: 600;
}

.customer-saas-alert--success {
    background: #ecfdf5;
    color: #047857;
}

.customer-list-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.customer-list-page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.customer-saas-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.customer-saas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.customer-saas-table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #334155;
    background: #eef2f7;
    border: none;
    border-bottom: 1px solid #dbe3ee;
}

.customer-saas-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease;
}

.customer-saas-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.customer-saas-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.customer-saas-tr:hover td {
    background: #f8fafc;
}

.customer-saas-tr:last-child td {
    border-bottom: none;
}

.customer-saas-th-num,
.customer-saas-td-num {
    width: 3.5rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
}

.customer-saas-link-name {
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: none;
}

.customer-saas-link-name:hover {
    text-decoration: underline;
}

.customer-saas-td-mono {
    font-variant-numeric: tabular-nums;
    font-size: 0.86rem;
    color: #0f172a;
}

.customer-saas-td-addr {
    max-width: 280px;
    min-width: 120px;
    line-height: 1.45;
    color: #475569;
}

.customer-saas-th-actions,
.customer-saas-td-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.customer-list-panel-inner .customer-saas-table tbody td {
    padding: 10px 12px;
}

.customer-saas-row-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.customer-saas-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.customer-saas-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.customer-saas-pill--danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.customer-saas-pill--danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.customer-saas-pill--copy-mini {
    padding: 0.06rem 0.18rem;
    font-size: 0.5rem;
    line-height: 1;
    min-height: 14px;
    margin-left: 0;
}

.host-copy-inline .customer-saas-pill--copy-mini { border-radius: 5px; }

.customer-saas-inline-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.customer-saas-td-actions .customer-saas-pill {
    flex-shrink: 0;
}

.customer-saas-empty {
    padding: 48px 24px !important;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.customer-saas-pagination {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.customer-saas-page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.customer-saas-page-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.customer-saas-page-link.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.customer-saas-page-link.is-disabled {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: default;
    pointer-events: none;
}

/* 상세: 전체 배경 */
.customer-saas-detail-wrap {
    background: #f4f5f7;
    margin: -10px -12px -14px;
    padding: 20px 16px 40px;
    min-height: calc(100vh - 120px);
    box-sizing: border-box;
}

.customer-saas-detail {
    padding-top: 4px;
}

.customer-saas-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.customer-saas-detail-kicker {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.customer-saas-detail-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-saas-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.customer-saas-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 28px rgba(15, 23, 42, 0.06);
}

.customer-saas-card--main {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.customer-saas-card--full {
    grid-column: 1 / -1;
}

.customer-saas-card-title {
    margin: 0 0 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
}

.customer-saas-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.customer-saas-dl--compact {
    gap: 10px;
}

.customer-saas-field {
    display: grid;
    gap: 4px;
}

.customer-saas-field--full {
    grid-column: 1 / -1;
}

.customer-saas-field dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-saas-field-icon {
    font-size: 0.875rem;
    opacity: 0.85;
}

.customer-saas-field dd {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
}

.customer-saas-value-mono {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.customer-saas-muted {
    margin: 0;
    font-size: 0.875rem;
    color: #94a3b8;
}

.customer-saas-contact-block--sep {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.customer-saas-memo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.customer-saas-memo-item {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.customer-saas-memo-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.customer-saas-memo-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.customer-saas-memo-user {
    color: #64748b;
}

.customer-saas-memo-body {
    font-size: 0.875rem;
    color: #1e293b;
    white-space: pre-wrap;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .customer-saas-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
    .customer-saas-card--main {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .customer-saas-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* 등록/수정 폼 */
.customer-saas-form-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.customer-saas-form-lead {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: #64748b;
    max-width: 42rem;
}

.customer-saas-form-inner {
    position: relative;
    padding-bottom: 8px;
}

.customer-saas-form-scroll {
    padding-bottom: 100px;
}

.customer-saas-card-desc {
    margin: -8px 0 16px;
    font-size: 0.8125rem;
    color: #64748b;
}

.customer-saas-subsection-title {
    margin: 20px 0 12px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-saas-subsection-title:first-of-type {
    margin-top: 0;
}

.customer-saas-mini-btn {
    margin-left: auto;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.customer-saas-mini-btn:hover {
    background: #dbeafe;
}

.customer-saas-contacts-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-saas-contact-card {
    position: relative;
    padding: 16px 16px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
}

.customer-saas-contact-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.3rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
}

.customer-saas-contact-remove:hover {
    background: #fef2f2;
}

.customer-billing-sync-card {
    margin: 20px 0;
    padding: 16px 18px;
    border-radius: 10px;
    border: 2px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.customer-billing-sync-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.customer-billing-sync-label input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.customer-billing-sync-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-billing-sync-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e40af;
}

.customer-billing-sync-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.customer-saas-memo-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.customer-saas-memo-pill {
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.customer-saas-memo-pill .customer-saas-memo-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.customer-saas-memo-pill .customer-saas-memo-body {
    font-size: 0.875rem;
    color: #334155;
    white-space: pre-wrap;
}

.customer-form-sticky-bar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 0 -8px -8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.customer-form-sticky-inner {
    max-width: min(1400px, 100%);
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.customer-form-page {
    max-width: none;
}

.customer-saas-card .form-input,
.customer-saas-card .form-textarea {
    border-radius: 8px !important;
    border-color: #e2e8f0 !important;
}

.customer-saas-card .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.customer-clean-form .required {
    color: #d63638;
}

.customer-clean-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.customer-clean-form .form-input,
.customer-clean-form .form-textarea {
    border-radius: 6px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border-panel) !important;
}

.customer-clean-form .form-textarea {
    padding: 10px 12px !important;
}

.customer-clean-form .form-input:focus,
.customer-clean-form .form-textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18) !important;
}

.customer-clean-form .form-buttons .btn-secondary {
    background: #f6f7f7;
    color: var(--text);
    border-color: var(--border-panel);
}

.customer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

/* 고객사 폼: 최신 게시판 글쓰기 느낌 */
.customer-form-editor-card {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.customer-form-write-form .required {
    color: #d63638;
}

.customer-form-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.customer-form-full {
    grid-column: 1 / -1;
}

.customer-save-btn {
    background: var(--primary);
    border-color: var(--primary-dark);
    padding: 8px 16px;
    font-size: 14px;
    transition: box-shadow 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

.customer-save-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 6px 20px rgba(36, 58, 110, 0.32);
}

/* CS 유지보수·계정관리 — 프리미엄 로열 블루 톤 (cs_center 팔레트와 정렬) */
.page-cs-ticket-admin .btn.btn-primary {
    background: linear-gradient(180deg, #4d6bb0 0%, var(--business-accent) 100%);
    border-color: var(--business-accent-strong);
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(36, 58, 110, 0.35);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.page-cs-ticket-admin .btn.btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 7px 22px rgba(36, 58, 110, 0.45);
    color: #fff;
}

.page-cs-ticket-admin .btn.btn-primary:active {
    transform: translateY(1px);
}

.page-cs-ticket-admin .cs-ticket-stat-done {
    border-left: 4px solid var(--business-accent-strong) !important;
}

.page-cs-ticket-admin .cs-ticket-stat-done .cs-ticket-stat-done-value {
    color: var(--business-accent-strong) !important;
}

.page-cs-ticket-admin .badge.bg-success {
    background: linear-gradient(180deg, #4d6bb0 0%, var(--business-accent) 100%) !important;
    color: #fff !important;
    font-weight: 600;
}

.page-cs-user-admin .btn.btn-success {
    background: linear-gradient(180deg, #4d6bb0 0%, var(--business-accent) 100%);
    border-color: var(--business-accent-strong);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(36, 58, 110, 0.3);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.page-cs-user-admin .btn.btn-success:hover {
    filter: brightness(1.08);
    box-shadow: 0 5px 18px rgba(36, 58, 110, 0.4);
    color: #fff;
}

.customer-cancel-btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* focus/rounded 적용(기존 customer-clean-form 확장) */
.customer-form-write-form .form-input,
.customer-form-write-form .form-textarea {
    border-radius: 6px !important;
    padding: 10px 12px !important;
}

.customer-form-write-form .form-row {
    gap: 6px;
}

.customer-form-write-form .form-label {
    margin: 0;
}

.customer-form-grid-2col {
    gap: 12px 16px;
}

.customer-form-full {
    grid-column: 1 / -1;
}

@media (max-width: 960px) {
    .customer-form-grid-2col {
        grid-template-columns: 1fr;
    }
}

.customer-form-col {
    min-width: 0;
}

.customer-form-col--full {
    grid-column: 1 / -1;
}

.customer-form-section {
    border: 1px solid var(--border-panel);
    border-radius: 12px;
    background: #fff;
    padding: 14px 14px 12px;
    margin-bottom: 14px;
}

.customer-form-section-title {
    font-weight: 900;
    font-size: 13px;
    color: var(--text);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.customer-zip-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.customer-zip-row .form-input {
    flex: 1;
}

.customer-checkline {
    margin: 0 0 12px;
}

.customer-checkline-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.customer-checkline-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* 상세 페이지 */
.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.customer-detail-card {
    background: #fff;
    border: 1px solid var(--border-panel);
    border-radius: 12px;
    padding: 14px 14px 12px;
}

.customer-detail-title {
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text);
}

.customer-detail-row {
    margin: 0 0 10px;
    display: grid;
    gap: 4px;
}

.customer-detail-row strong {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.customer-detail-row span {
    color: var(--text);
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 960px) {
    .customer-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .customer-form-grid {
        grid-template-columns: 1fr;
    }
}

.att-company-month {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
}

.att-company-month-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.att-company-month-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.att-dash-month-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.att-dash-select {
    width: auto;
    min-width: 100px;
    max-width: 140px;
}

.att-kpi-grid--company-dash {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.att-kpi-value--long {
    font-size: 20px;
    line-height: 1.2;
}

.att-dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 16px;
    align-items: start;
    margin: 0 0 20px;
}

.att-dash-main {
    min-width: 0;
}

.att-dash-layout--full {
    grid-template-columns: minmax(0, 1fr);
}

.att-dash-main--full {
    width: 100%;
}

.att-dash-aside {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.att-dash-aside-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.att-dash-aside-empty {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.att-dash-aside-note {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.att-top-late-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.att-top-late-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.att-top-late-item:last-child {
    border-bottom: none;
}

.att-top-late-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.att-top-late-rank {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    width: 1.25rem;
}

.att-top-late-cnt {
    margin-left: auto;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #b91c1c;
}

.att-top-late-bar {
    height: 4px;
    margin-top: 6px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.att-top-late-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

.att-top-late-dept {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.att-monitor-filters {
    justify-content: flex-end;
    margin-bottom: 10px;
}

.att-monitor-select {
    width: auto;
    min-width: 130px;
    max-width: 180px;
}

.att-monitor-table .att-monitor-col-name {
    width: 13%;
}

.att-monitor-table .att-monitor-col-dept {
    width: 12%;
}

.att-monitor-table .att-monitor-col-worktype {
    width: 11%;
}

.att-monitor-table .att-monitor-col-time {
    width: 10%;
}

.att-monitor-table .att-monitor-col-work {
    width: 14%;
    min-width: 120px;
}

.att-monitor-table .att-monitor-col-status {
    width: 10%;
}

.att-monitor-table .att-monitor-col-remark {
    width: 20%;
    max-width: 280px;
}

.att-badge--worktype-office {
    background: #e0f2fe;
    color: #075985;
}

.att-badge--worktype-remote {
    background: #ede9fe;
    color: #5b21b6;
}

.att-monitor-remark {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
}

.att-late-warn {
    display: inline-block;
    margin-left: 6px;
    color: #b45309;
    font-size: 13px;
    vertical-align: middle;
}

.att-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.att-badge--ok {
    background: #dbeafe;
    color: #1e40af;
}

.att-badge--late {
    background: #fee2e2;
    color: #991b1b;
}

.att-badge--absent {
    background: #fef3c7;
    color: #92400e;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.att-kpi-grid--user-report {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 18px;
}

.att-cal-wrap {
    margin: 0 0 20px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    overflow: auto;
}

.att-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
}

.att-cal-wd {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.att-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.att-cal-cell {
    min-height: 72px;
    padding: 6px 6px 8px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    font-size: 11px;
}

.att-cal-cell--pad {
    background: transparent;
    border: none;
    min-height: 0;
}

.att-cal-cell--weekend {
    background: #f1f5f9;
}

.att-cal-daynum {
    display: block;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.att-cal-inout {
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.35;
}

.att-cal-sep {
    margin: 0 2px;
    opacity: 0.6;
}

.att-cal-miss,
.att-cal-empty {
    color: var(--muted);
    font-size: 10px;
}

.att-cal-badge {
    display: inline-block;
    margin-top: 4px;
}

@media (max-width: 900px) {
    .att-kpi-grid,
    .att-kpi-grid--compact,
    .att-kpi-grid--personal,
    .att-kpi-grid--monitor,
    .att-kpi-grid--company-dash,
    .att-kpi-grid--user-report {
        grid-template-columns: 1fr;
    }

    .att-kpi-grid--monitor {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .att-dash-layout {
        grid-template-columns: 1fr;
    }

    .att-monitor-filters {
        justify-content: flex-start;
    }

    .att-monitor-select {
        min-width: 110px;
    }

    .att-action-row {
        flex-direction: column;
    }

    .att-big-actions {
        width: 100%;
        justify-content: stretch;
    }

    .att-btn {
        flex: 1;
    }
}

@media (max-width: 1200px) {
    .att-dash-layout {
        grid-template-columns: 1fr;
    }
}

/* ----- 대시보드 (B2B SaaS 스타일, .dash-page 범위) ----- */
.dash-page {
    font-size: 15px;
    line-height: 1.55;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dash-page .summary-strip {
    gap: 12px;
    margin-bottom: 14px;
}

.dash-page .summary-stat {
    padding: 16px 18px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    gap: 12px;
    border-left-width: 3px;
    border-left-color: var(--business-accent);
}

.dash-page .summary-stat__icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 10px;
}

.dash-page .summary-stat__value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}

.dash-page .summary-stat__label {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: -0.01em;
}

.dash-page .alert-banner {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    gap: 10px;
}

.dash-page .alert-banner--critical {
    border-color: #fce8e8;
}

.dash-page .alert-banner__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.dash-page .alert-banner__list {
    font-size: 0.875rem;
    line-height: 1.5;
    padding-left: 1.15rem;
}

.dash-page .alert-banner__list li {
    margin: 4px 0;
}

.dash-page .badge-urgent,
.dash-page .badge-soon {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
}

.dash-flash {
    margin: 0 0 12px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #c3e6cb;
    background: #d4edda;
    color: #155724;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.dash-hub-intro {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.55;
}

.dash-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 1100px) {
    .dash-hub-grid {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--primary);
    min-width: 0;
}

.dash-card--att {
    border-top-color: #2563eb;
}

.dash-card--notice {
    border-top-color: #7c3aed;
}

.dash-card--wr {
    border-top-color: var(--business-accent);
}

.dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

/* 대시보드 카드/섹션 헤더 우측: pill 바로가기 */
.dash-shortcut-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.dash-card-shortcuts.dash-shortcut-group {
    justify-content: flex-end;
}

/* 대시보드 위젯 상단 바로가기 링크 */
.widget-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-decoration: none !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: none !important;
}

.widget-link-btn:hover {
    color: #3b82f6 !important;
    background: #eff6ff !important;
}

.widget-link-btn i {
    font-size: 0.75rem !important;
    margin-top: 1px !important;
}

.dash-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}

.dash-card-title i {
    opacity: 0.88;
    font-size: 1em;
}

.dash-mini-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.dash-mini-list li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 0.875rem;
    line-height: 1.45;
}

.dash-mini-list li:last-child {
    border-bottom: none;
}

.dash-mini-link {
    display: block;
    font-weight: 700;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.dash-mini-link:hover {
    color: var(--primary);
}

.dash-mini-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

.dash-mini-empty {
    padding: 10px 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.dash-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2px;
}

.dash-kpi {
    flex: 1 1 100px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

.dash-kpi--wide {
    flex: 1 1 100%;
}

.dash-kpi-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.dash-kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.dash-kpi-value--warn {
    color: #c05621;
}

.dash-kpi-hint {
    font-size: 0.8125rem;
    color: var(--muted);
}

/* 대시보드 근태 위젯 2x2 그리드 */
.dashboard-attendance-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.dashboard-stat-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.dashboard-stat-title {
    font-size: 0.85rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.dashboard-stat-value {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    line-height: 1 !important;
}

.dashboard-stat-value span.total-count {
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.dashboard-stat-value.dashboard-stat-value--warn {
    color: #c05621 !important;
}

.dash-card-actions,
.dash-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dash-card-actions {
    margin-top: 6px;
}

.dash-att-employee {
    text-align: center;
}

.dash-att-clock-wrap {
    margin-bottom: 10px;
}

.dash-att-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.dash-att-clock {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    color: #2563eb;
    line-height: 1.1;
}

.dash-att-status {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.dash-att-meta {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.dash-att-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-inline-form {
    margin: 0;
}

.dash-att-btn {
    min-width: 96px;
    padding: 9px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    line-height: 1.3;
}

.dash-quick-form {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.dash-quick-label {
    margin: 0 0 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.dash-quick-hint {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.8125rem;
}

.dash-stack-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-stack-form .form-input,
.dash-stack-form .form-textarea {
    font-size: 0.875rem;
    line-height: 1.5;
}

.dash-quick-textarea {
    min-height: 80px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
}

.dash-wr-ta {
    min-height: 72px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    line-height: 1.5;
}

.dash-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.dash-programs-block {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.dash-subsection-title {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
}

.dash-subsection-title i {
    color: #7c3aed;
}

.dash-mini-list--programs {
    max-height: 200px;
}

.dash-mini-empty--tight {
    padding: 8px 0 12px;
    margin: 0;
}

.dash-wr-save {
    align-self: flex-start;
    margin-top: 2px;
    padding: 8px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    min-width: 88px;
}

.dash-wr-saved .dash-wr-saved-msg {
    margin: 0 0 12px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--muted);
}

.dash-wr-saved-actions {
    justify-content: flex-start;
}

.dash-page .content-card.dash-updates {
    margin-top: 2px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    background: var(--surface);
}

.dash-updates {
    margin-top: 0;
}

.dash-updates-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.dash-updates-lead {
    margin: 0 0 6px;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.55;
}

.dash-updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.dash-update-col {
    min-width: 0;
}

.dash-update-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.dash-update-heading {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
}

.dash-feed-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.dash-feed-list li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 0.875rem;
    line-height: 1.45;
}

.dash-feed-list li:last-child {
    border-bottom: none;
}

.dash-feed-list a {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.dash-feed-list a:hover {
    color: var(--primary);
}

.dash-feed-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ----- 계약 모듈 (그리드 폼 · 스케줄 테이블) ----- */
.content-card--contract {
    max-width: min(1100px, 100%);
    margin: 0 auto;
}

.content-card--draft {
    max-width: min(1100px, 100%);
    margin: 0 auto;
}

.contract-form__grid {
    display: grid;
    gap: 10px 14px;
    margin-bottom: 4px;
}

.contract-form__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-form__grid--1 {
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 900px) {
    .contract-form__grid--3 {
        grid-template-columns: 1fr;
    }
}

.contract-form__field--span2 {
    grid-column: span 2;
}

.contract-form__field--span3 {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .contract-form__field--span2 {
        grid-column: span 1;
    }
}

.contract-form__hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
}

.contract-status-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    padding: 6px 0;
}

.contract-status-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
}

.contract-status-option input {
    margin: 0;
}

.contract-contacts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

@media (max-width: 720px) {
    .contract-contacts {
        grid-template-columns: 1fr;
    }
}

.contract-contact-card {
    padding: 12px 14px;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fafbfc 0%, var(--surface) 100%);
}

.contract-contact-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

/* 타이포는 .form-label 과 병용 */
.contract-contact-card__title {
    margin: 0 0 8px;
}

.contract-contact-card__head .contract-contact-card__title.form-label {
    margin-bottom: 0;
}

.contract-copy-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}

.contract-ai-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 720px) {
    .contract-ai-row {
        grid-template-columns: 1fr;
    }
}

.contract-ai-row__col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.contract-ai-row__col > .form-label {
    flex-shrink: 0;
}

.contract-ai-row__textarea {
    min-height: 140px;
    flex: 1;
}

.contract-ai-row__after {
    flex-shrink: 0;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contract-ai-row__col .contract-history-list {
    margin-top: 8px;
}

.btn-ai--block {
    align-self: stretch;
    width: 100%;
    justify-content: center;
    text-align: center;
}

.btn-ai {
    align-self: flex-start;
    background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #5b21b6;
    color: #fff;
}

.btn-ai:hover {
    background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%);
}

.contract-history-list {
    margin: 0;
    padding: 0 0 0 16px;
    font-size: 12px;
    color: var(--muted);
    max-height: 160px;
    overflow-y: auto;
}

.contract-history-list li {
    margin: 6px 0;
    list-style: disc;
}

.contract-history-list time {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.contract-schedule-wrap {
    margin-bottom: 8px;
}

.contract-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--border-panel);
}

.contract-schedule-table th,
.contract-schedule-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

.contract-schedule-table th {
    text-align: left;
    font-weight: 700;
    background: var(--stripe);
    color: var(--text);
}

.contract-schedule-table__col-idx {
    width: 3rem;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    vertical-align: middle;
}

.schedule-row-num {
    display: inline-block;
    min-width: 1.25em;
}

.contract-schedule-table__col-content {
    width: 28%;
}

.contract-schedule-table__col-date {
    width: 16%;
}

.contract-schedule-table__col-amount {
    width: 18%;
}

.contract-schedule-table__col-action {
    width: 90px;
    text-align: center;
}

.contract-schedule-table td .form-input {
    margin: 0;
}

.contract-add-row {
    margin-top: 4px;
}

.contract-form__actions {
    margin-top: 20px;
    justify-content: flex-end;
}

.client-autocomplete {
    position: relative;
}

.client-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.client-suggestions__item {
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}

.client-suggestions__item:hover,
.client-suggestions__item:focus {
    background: var(--stripe);
}

.contract-form__field--client {
    min-width: 0;
}

.contract-form__dates-strip {
    grid-column: 1 / -1;
    width: 100%;
}

.contract-form__grid--dates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    width: 100%;
}

.contract-form__field--smart-date {
    min-width: 0;
}

.smart-date-shell {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: var(--surface);
    /* overflow: hidden 이면 일부 브라우저에서 date 피커·히트 영역이 깨질 수 있음 */
    overflow: visible;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.smart-date-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.35);
}

.smart-date {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 9px 12px;
    font-size: 13px;
    font-family: var(--font);
    background: transparent;
    color: var(--text);
    line-height: 1.4;
}

.smart-date::placeholder {
    color: #9ca3af;
}

.smart-date:focus {
    outline: none;
}

.smart-date-picker-trigger {
    position: relative;
    z-index: 2;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    border-left: 1px solid #e5e7eb;
}

.smart-date-picker-trigger:hover {
    background: #eef2f7;
}

.smart-date-native {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    opacity: 0.001;
    cursor: pointer;
    font-size: 18px;
}

.smart-date-icon {
    pointer-events: none;
    color: #6b7280;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 720px) {
    .contract-form__grid--dates {
        grid-template-columns: 1fr;
    }
}

/* ----- 계약 관리: 슬림 통계 대시보드 (1단) + 테이블 ----- */
.content-card.card.contract-dashboard-slim {
    padding: 6px 10px !important;
    margin-bottom: 16px;
}

.content-card.contract-dashboard-slim + .content-card.customer-list-panel {
    margin-top: 0;
}

.contract-dashboard-one-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.contract-dashboard-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.contract-dashboard-vr {
    width: 1px;
    align-self: stretch;
    min-height: 2.75rem;
    background: #e2e8f0;
    flex-shrink: 0;
    margin: 0 2px;
}

@media (max-width: 900px) {
    .contract-dashboard-vr {
        width: 100%;
        height: 1px;
        min-height: 0;
        align-self: auto;
        margin: 2px 0;
    }
}

/* 계약 관리: 요약 카드 컴팩트 + 클릭(스케줄 필터) */
.content-card.card.contract-dashboard-slim.contract-dashboard-slim--widgets-only {
    margin-bottom: 10px;
    padding: 4px 8px !important;
}

.widget-container.widget-container--compact {
    gap: 10px;
    margin-bottom: 0;
}

.widget-container.widget-container--compact .b2b-widget {
    padding: 10px 12px;
    gap: 6px;
    border-radius: 10px;
}

.widget-container.widget-container--compact .b2b-widget .w-header {
    font-size: 0.8125rem;
}

.widget-container.widget-container--compact .b2b-widget .w-amount {
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.widget-container.widget-container--compact .b2b-widget .w-count-pill {
    padding: 2px 8px;
    font-size: 0.72rem;
}

.widget-container.widget-container--compact .b2b-widget .w-details {
    gap: 3px;
}

.widget-container.widget-container--compact .b2b-widget .w-detail-row {
    padding: 4px 8px;
    font-size: 0.72rem;
}

a.b2b-widget.contract-schedule-widget-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

a.b2b-widget.contract-schedule-widget-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
    filter: brightness(0.98);
}

a.b2b-widget.contract-schedule-widget-card:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.contract-schedule-widget-card.contract-schedule-widget-card--active {
    box-shadow: 0 0 0 2px #1d4ed8, 0 4px 12px rgba(29, 78, 216, 0.12);
}

.contract-schedule-widget-card.contract-schedule-widget-card--active:hover {
    box-shadow: 0 0 0 2px #1d4ed8, 0 6px 16px rgba(29, 78, 216, 0.16);
}

/* 계약 목록: 상태/구분 탭을 검색·테이블에 밀착 */
.contract-list-filter-bar {
    margin: 0 0 6px;
    padding: 0;
}

.contract-list-filter-bar .dashboard-flex-container.contract-list-filter-bar__tabs {
    margin-bottom: 0;
    gap: 12px;
}

/* 스케줄 필터 ON: 검색줄 배지 — 계약 수 + 스케줄 행 수 */
.customer-list-count-badge--schedule-filter {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    text-align: left;
}

.contract-filter-schedule-hint {
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.contract-filter-schedule-hint--overdue {
    color: #b91c1c;
}

.contract-filter-schedule-hint--today {
    color: #1d4ed8;
}

.contract-filter-schedule-hint--soon {
    color: #b45309;
}

a.contract-stat-card-tiny {
    display: block;
    padding: 10px 16px !important;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

a.contract-stat-card-tiny:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.contract-stat-card-tiny--active {
    border-color: #1d4ed8 !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 1px #93c5fd;
}

.contract-stat-card-tiny__title {
    display: block;
    margin: 0 0 3px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.contract-stat-card-tiny__count {
    display: block;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e40af;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.contract-stat-card-tiny--active .contract-stat-card-tiny__count {
    color: #1d4ed8;
}

.contract-table-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.contract-table-idx {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.contract-table-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-family: inherit;
}

.contract-table-badge--muted {
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
}

.contract-table-badge--ok {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.contract-table-badge--warn {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.contract-table-sub {
    margin-top: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.4;
    font-family: inherit;
}

.contract-table-meta {
    margin-top: 2px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.4;
    font-family: inherit;
}

.contract-fin-lines {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.45;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.page-head-actions .contract-excel-download-btn {
    white-space: nowrap;
}

.customer-list-panel-inner--contract .customer-saas-th-num,
.customer-list-panel-inner--contract .customer-saas-td-num {
    width: auto;
    min-width: 6.5rem;
}

.clean-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.clean-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clean-content-view {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.report-modern-group {
    margin-bottom: 20px !important;
}

/* 제목 라벨 디자인 */
.report-modern-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px !important;
}

/* 텍스트 박스 완벽 복제 */
.report-modern-textarea {
    width: 100%;
    min-height: 120px !important;
    height: auto !important;
    flex: none !important;
    padding: 10px 14px !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    color: #374151;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    resize: vertical;
    transition: all 0.2s ease;
}

/* 텍스트 박스 클릭(포커스) 시 효과 */
.report-modern-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 좌우 한 줄 정렬 */
.dashboard-flex-container {
    display: flex;
    justify-content: space-between; /* 왼쪽 오른쪽 끝으로 밀기 */
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

/* 왼쪽 그룹: 회색 배경 토글 */
.status-tab-group {
    display: inline-flex;
    background-color: #f1f5f9;
    padding: 6px;
    border-radius: 8px;
    gap: 4px;
}
.status-tab {
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}
.status-tab.active {
    background-color: #ffffff;
    color: #4338ca; /* 보라/파란색 포인트 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 오른쪽 그룹: 흰색 배경 토글 */
.category-tab-group {
    display: inline-flex;
    background-color: #ffffff;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    gap: 6px;
}
.category-tab {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s;
}
.category-tab.active {
    background-color: #1e293b; /* 다크 네이비 */
    color: #ffffff;
    border-color: #1e293b;
}

/* 계약 목록: 이력/메모 */
.contract-memo-count {
    font-weight: 700;
}

.contract-memo-count--hot {
    color: #1d4ed8;
}

.contract-memo-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.contract-memo-modal.is-open {
    display: flex;
}

.contract-memo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.contract-memo-modal__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(88vh, 640px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
}

.contract-memo-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.contract-memo-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.contract-memo-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.contract-memo-modal__close:hover {
    color: #0f172a;
}

.contract-memo-modal__body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1;
}

.memo-list-area {
    flex: 1;
    min-height: 160px;
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fafbfc;
}

.memo-input-area {
    flex-shrink: 0;
}

.memo-input-area .form-textarea {
    min-height: 90px;
    font-size: 0.9rem;
}

.memo-input-area__actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.contract-memo-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.contract-memo-empty--err {
    color: #b91c1c;
}

.memo-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.memo-timeline__item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.memo-timeline__item:last-child {
    border-bottom: 0;
}

.memo-timeline__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: #64748b;
}

.memo-timeline__time {
    font-variant-numeric: tabular-nums;
}

.memo-timeline__writer {
    font-weight: 700;
    color: #334155;
}

.memo-timeline__del-btn {
    margin-left: auto;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.memo-timeline__del-btn:hover {
    background: #fef2f2;
    border-color: #fda4af;
}

.memo-timeline__content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1f2937;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.customer-saas-row-actions .contract-memo-open-btn {
    white-space: nowrap;
}

.contract-title-link {
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.contract-title-link:hover {
    text-decoration: underline;
}

/* 계약 상세: 청구/수금 스케줄 */
.contract-detail-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.88rem;
    color: #334155;
}

.billing-schedule-table th,
.billing-schedule-table td {
    white-space: nowrap;
}

.billing-schedule-table .billing-cell-content {
    white-space: normal;
    min-width: 220px;
    overflow-wrap: anywhere;
    word-break: keep-all;
    line-height: 1.45;
    font-size: 0.9rem;
}

/* 청구일 경과 + 미청구: 행 전체 강조 (zebra 스트라이프보다 우선) */
.billing-schedule-table tbody tr.contract-billing-row-bill-overdue > td {
    background-color: #fff5f5 !important;
    border-bottom-color: #fecaca !important;
}

.billing-schedule-table tbody tr.contract-billing-row-bill-overdue:hover > td {
    background-color: #fee2e2 !important;
}

.billing-status-btn {
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.billing-status-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.billing-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-status-badge--billed {
    background: #dbeafe;
    color: #1d4ed8;
}

.billing-status-badge--paid {
    background: #dcfce7;
    color: #15803d;
}

.billing-doc-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.billing-add-form {
    margin-top: 14px;
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
}

.billing-add-form h4 {
    margin: 0 0 10px;
    font-size: 0.96rem;
    color: #0f172a;
}

.billing-add-form__grid {
    display: grid;
    gap: 10px 12px;
    grid-template-columns: 90px minmax(180px, 1.4fr) 140px 140px 140px auto;
    align-items: end;
}

.billing-add-form__btn-wrap {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1160px) {
    .billing-add-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-add-form__btn-wrap {
        justify-content: flex-start;
    }
}

/* 상단 요약 박스 모던화 */
.contract-summary-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.contract-summary-box__left {
    min-width: 0;
}

.contract-summary-box__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.contract-summary-box__company {
    margin: 6px 0 10px;
    color: #475569;
    font-size: 0.95rem;
}

.contract-summary-box__right {
    margin-left: auto;
    text-align: right;
    min-width: 230px;
}

.contract-summary-box__finance-title {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 700;
}

.contract-summary-box__finance-line {
    font-size: 0.98rem;
    color: #334155;
    margin-top: 6px;
}

.contract-summary-box__finance-line strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.contract-summary-box__finance-line.text-danger,
.contract-summary-box__finance-line.text-danger strong {
    color: #dc2626;
}

/* 상태 토글 버튼(뱃지) 최신화 */
.status-toggle-btn {
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.contract-overdue-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #dc2626;
}

.contract-action-row {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.contract-action-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.contract-action-btn--complete {
    background: #0f172a;
}

.contract-action-btn--renew {
    background: #6d28d9;
}

/* 미처리 (회색) */
.status-pending {
    background-color: #f1f5f9;
    color: #64748b;
}

.status-pending:hover {
    background-color: #e2e8f0;
}

/* 처리완료 */
.status-billed {
    background-color: #eff6ff;
    color: #2563eb;
    box-shadow: 0 0 0 1px #bfdbfe inset;
}

.status-paid {
    background-color: #f0fdf4;
    color: #16a34a;
    box-shadow: 0 0 0 1px #bbf7d0 inset;
}

/* 계약 상세 스케줄: btn-sm + 상태색, 일반 .btn:hover 덮어쓰기 */
.billing-schedule-table .js-schedule-status-badge.btn.btn-sm {
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-pending {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-pending:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
    box-shadow: 0 4px 14px rgba(100, 116, 139, 0.22);
    transform: translateY(-1px);
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-billed {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px #bfdbfe inset, 0 1px 2px rgba(37, 99, 235, 0.08);
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-billed:hover {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-paid {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #86efac;
    box-shadow: 0 0 0 1px #bbf7d0 inset, 0 1px 2px rgba(22, 163, 74, 0.08);
}

.billing-schedule-table .js-schedule-status-badge.btn.btn-sm.status-paid:hover {
    background-color: #dcfce7;
    border-color: #4ade80;
    color: #15803d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
    transform: translateY(-1px);
}

/* 액션 버튼 */
.btn-modern-outline {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-weight: 500;
    padding: 6px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer;
}

.btn-modern-outline:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}

@media (max-width: 980px) {
    .contract-summary-box {
        flex-direction: column;
        gap: 14px;
    }
    .contract-summary-box__right {
        text-align: left;
        margin-left: 0;
    }
}

/* 1. 큰 껍데기 (대시보드 박스, 목록 겉 박스, 요약 박스 등) : 10px로 부드럽게 통일 */
.dashboard-flex-container, .contract-summary-box, .card, .panel, .table-responsive {
    border-radius: 10px !important;
}

/* 2. 모든 클릭 요소 (상단 탭, 우측 관리 버튼들, 검색창, 입력창) : 6px로 모던하고 단단하게 통일 */
.btn, .status-tab, .category-tab, .btn-modern-outline, .form-control, .form-select, input[type="text"] {
    border-radius: 6px !important;
}

/* 3. 상태 뱃지 & 토글 (진행, 기타계약, 미청구/청구완료 버튼) : 4px로 깔끔하게 통일 (기존 20px 알약 형태 삭제) */
.badge, .status-badge, .status-toggle-btn {
    border-radius: 4px !important;
}

/* 금일 근태 모니터 고도화 UI */
.attendance-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.att-quick-filter {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.att-quick-filter:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.att-quick-filter.is-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.att-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.att-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.att-badge--normal {
    background: #e8f5e9;
    color: #166534;
}

.att-badge--late {
    background: #fff7ed;
    color: #c2410c;
}

.att-badge--early {
    background: #fef2f2;
    color: #b91c1c;
}

.att-badge--overtime {
    background: #fffbeb;
    color: #a16207;
}

.att-badge--leave {
    background: #ecfeff;
    color: #0e7490;
}

.att-badge--absent {
    background: #fee2e2;
    color: #991b1b;
}

.att-week-over {
    color: #b91c1c !important;
    font-weight: 800;
}

/* 초과근무 (야근/연장) - 눈에 띄는 빨간색/오렌지색 계열로 강조 */
.time-over {
    color: #ea580c;
    font-weight: 700;
    margin-left: 8px;
    font-size: 0.85rem;
    background: #ffedd5;
    padding: 3px 6px;
    border-radius: 4px;
}

/* 근무미달 (조기퇴근/근태불량) - 차가운 파란색 계열 */
.time-under {
    color: #2563eb;
    font-weight: 700;
    margin-left: 8px;
    font-size: 0.85rem;
    background: #dbeafe;
    padding: 3px 6px;
    border-radius: 4px;
}

/* 요약 카드 디자인 */
.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px !important;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.summary-card .number-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0;
}

.summary-card .desc-text {
    font-size: 0.85rem;
    color: #64748b;
}

.attendance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

/* 전사 근태 테이블 SaaS 정렬 통일 */
.att-list-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 14px 10px;
    text-align: center;
    vertical-align: middle;
}

.att-list-table tbody td {
    text-align: center;
    vertical-align: middle;
}

.att-list-table.table-hover tbody tr:hover td,
.att-list-table tbody tr:hover td {
    background: #f8fafc !important;
}

.att-tr-late,
.att-tr-late:hover td {
    background: transparent !important;
}

.att-work-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.att-work-cell .time-over,
.att-work-cell .time-under {
    margin-left: 0;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.badge-absent { background: #fee2e2; color: #dc2626; }
.badge-late { background: #fef08a; color: #a16207; }
.badge-normal { background: #e0e7ff; color: #4338ca; }

/* 내용 수정 모드 시 하이라이트 */
[contenteditable="true"] {
    background-color: #fef08a !important;
    outline: 1px dashed #ca8a04;
}

/* ---------- 청구서·거래명세서 B2B 인쇄 (A4 1장 / 테두리 통일 / 직인) ---------- */
body.b2b-print-page {
    margin: 0;
    background: #d9dee5;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
    font-size: 10pt;
    line-height: 1.4;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-print-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #1e293b;
}

.b2b-print-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
}

.b2b-print-toolbar__btn--edit {
    background: #dbeafe;
    color: #1e3a8a;
}

.b2b-print-toolbar__btn--ghost {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #64748b;
}

.b2b-print-toolbar__btn--primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.b2b-print-toolbar__btn--primary:hover:not(:disabled) {
    filter: brightness(1.06);
}

.b2b-print-toolbar__btn--primary:disabled {
    opacity: 0.75;
    cursor: wait;
}

.b2b-doc {
    width: 210mm;
    max-width: 100%;
    margin: 16px auto;
    padding: 0;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* A4 세로 비율 확보 (웹·인쇄 공통, 숏다리 방지) */
#print-area.print-wrap,
.print-wrap.b2b-doc-frame {
    min-height: 297mm;
    box-sizing: border-box;
}

.b2b-doc-frame.print-container,
.b2b-doc-frame {
    border: 1.5px solid #000;
    box-sizing: border-box;
    padding: 22px 26px 24px;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* --- 상단: 로고 | 제목 | 문서번호 --- */
.b2b-doc-header {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 16px;
    margin-bottom: 25px;
}

.b2b-doc-header__logo {
    flex: 1;
    max-width: none;
    text-align: left;
}

.b2b-doc-header__logo img {
    display: block;
    width: 172px;
    max-width: 100%;
    height: auto;
}

.b2b-doc-header__center {
    flex: 0 auto;
    max-width: none;
    text-align: center;
    white-space: nowrap !important;
    padding-bottom: 0;
}

.b2b-doc__title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 20px;
    text-indent: 20px;
    line-height: 1.1;
}

body.b2b-print-page--statement .b2b-doc__title,
.b2b-doc__title--statement {
    white-space: nowrap;
    letter-spacing: 5px;
    text-indent: 5px;
}

.b2b-doc__subtitle {
    margin: 5px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 5px;
}

.b2b-doc-header__meta {
    flex: 1;
    max-width: none;
    text-align: right;
    white-space: nowrap;
    margin-right: 0 !important;
    padding-right: 0 !important;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
    color: #000;
}

.b2b-doc-header__meta-line {
    white-space: nowrap;
}

/* --- 핵심 박스: 좌측(공급받는자) + 우측 공급자 표 (1.5px 테두리 통일) --- */
.b2b-keybox {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: none;
    margin-bottom: 36px;
    box-sizing: border-box;
    gap: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-keybox__buyer {
    flex: 0 0 42%;
    max-width: 46%;
    padding: 25px;
    border: 2px solid #000 !important;
    border-right: none !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    min-height: 0;
}

/* 거래처명 + 귀하: 정중앙, 상단 여백 확보 */
.b2b-buyer-name-group {
    text-align: center;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    padding-top: 40px;
}

.b2b-buyer-name-group .b2b-buyer-name-main {
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.b2b-buyer-name-group .b2b-buyer-suffix {
    font-size: 1rem;
    font-weight: 500;
    margin-left: 5px;
}

/* 인쇄/PDF: 거래처명+귀하 한 덩어리 유지 (인라인 font-size 상속) */
.b2b-buyer-name-group.b2b-buyer-name-group--nowrap {
    white-space: nowrap;
}

.b2b-buyer-name-group.b2b-buyer-name-group--nowrap .b2b-buyer-suffix {
    font-size: 1em;
    font-weight: 600;
}

.b2b-buyer-total-block {
    margin-top: auto;
    padding: 0 20px 20px 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* 합계금액 3단: 수표 스타일 */
.b2b-buyer-total-stack {
    text-align: right;
    margin-top: 0;
    width: 100%;
}

.b2b-buyer-total-caption {
    font-weight: 700;
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 7px;
    line-height: 1.2;
}

.b2b-buyer-total-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: #000;
    display: inline-block;
    border-bottom: 2px solid #000;
    padding-bottom: 7px;
    margin-bottom: 7px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
}

.b2b-buyer-vat {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 7px;
    color: #6b7280;
}

.b2b-keybox__supplier {
    flex: 1 1 auto;
    min-width: 0;
}

.b2b-supplier-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse !important;
    border-left: 2px solid #000 !important;
    margin: 0;
    table-layout: fixed;
    font-size: 0.82rem;
    box-sizing: border-box;
}

.b2b-supplier-vlabel {
    width: 58px;
    max-width: 58px;
    padding: 10px 4px !important;
    background: #f8fafc !important;
    font-weight: 900;
    text-align: center;
    vertical-align: middle !important;
    border-left: none !important;
}

.b2b-supplier-vlabel-inner {
    display: inline-block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.08em;
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.2;
}

.b2b-supplier-th {
    width: 100px;
    background: #ececec !important;
    font-weight: 700;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

.b2b-supplier-td {
    text-align: left !important;
    padding-left: 15px !important;
    font-weight: 600;
    vertical-align: middle !important;
}

.b2b-supplier-td--bizno {
    white-space: nowrap;
}

.b2b-supplier-td--rep {
    position: relative;
    overflow: visible;
    text-align: left !important;
}

/* 대표자 + (인) + 직인(1.5배, (인) 위 덮음) */
.b2b-rep-wrap {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    font-weight: 700;
    white-space: nowrap;
    margin: 0 auto;
}

.b2b-rep-name {
    letter-spacing: 0.28em;
}

.b2b-rep-nbsp {
    letter-spacing: 0;
}

.b2b-rep-in-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6em;
    min-height: 1.15em;
    vertical-align: middle;
    overflow: visible;
}

.b2b-rep-in {
    position: relative;
    z-index: 0;
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: 0;
    display: inline-block;
    line-height: 1;
}

/* 직인: 약 80% 크기, (인) 글자 기하학적 중앙 */
.seal-img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62px;
    height: 62px;
    margin: 0;
    object-fit: contain;
    transform: translate(-50%, -52%);
    z-index: 10;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* --- 섹션 타이틀 (딥블루 세로 강조) --- */
.b2b-section-title {
    margin: 38px 0 14px;
    padding-left: 10px;
    border-left: 4px solid #1d4ed8;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #000;
}

.b2b-keybox + .b2b-section-title {
    margin-top: 0;
}

/*
 * B2B 문서 테이블: 외곽·내부 선 모두 1.5px #000 (단일화) + box-sizing
 */
body.b2b-print-page .b2b-supplier-table,
body.b2b-print-page .b2b-data-table {
    width: 100%;
    border-collapse: collapse !important;
    border: 2px solid #000 !important;
    box-sizing: border-box;
    margin: 0 0 44px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

body.b2b-print-page .b2b-supplier-table {
    margin-bottom: 0;
}

body.b2b-print-page .b2b-supplier-table th,
body.b2b-print-page .b2b-supplier-table td,
body.b2b-print-page .b2b-data-table th,
body.b2b-print-page .b2b-data-table td {
    border: 1px solid #000 !important;
    box-sizing: border-box;
    padding: 10px 7px;
    vertical-align: middle;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-data-table {
    border-collapse: collapse !important;
    box-sizing: border-box;
}

.b2b-data-table thead th {
    background: #e8e8e8 !important;
    font-weight: 800;
    font-size: 0.78rem;
    text-align: center;
}

.b2b-td-left { text-align: left !important; }
.b2b-td-center { text-align: center !important; }
.b2b-td-right { text-align: right !important; }
.b2b-td-num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.b2b-col-no { width: 8%; }
.b2b-col-item { width: 44%; }
.b2b-col-money { width: 16%; }

.b2b-items-empty td {
    height: 22px;
}

.b2b-items-total-row .b2b-total-label {
    font-weight: 800;
    text-align: center !important;
}

.b2b-items-total-row .b2b-total-sum {
    font-weight: 800;
}

.b2b-items-total-row .b2b-grand-total {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e40af;
    letter-spacing: normal;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-contract-table tbody td:first-child {
    text-align: center !important;
}

/* --- 입금정보: 폼형(외곽선만 + 좌 세로 타이틀 / 우 통합 패널) --- */
.b2b-bank-table--form {
    width: 100%;
    border-collapse: collapse !important;
    border: 2px solid #000;
    box-sizing: border-box;
    margin: 0 0 44px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-bank-table--form > tbody > tr > th,
.b2b-bank-table--form > tbody > tr > td {
    border: 1px solid #000 !important;
    vertical-align: top;
}

.b2b-bank-vtitle {
    width: 48px;
    padding: 14px 8px !important;
    background: #e8e8e8 !important;
    text-align: center;
    vertical-align: middle !important;
    border-right: 1px solid #000 !important;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-bank-vtitle-inner {
    display: inline-block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    line-height: 1;
}

.b2b-bank-panel {
    background-color: #f8fafc !important;
    padding: 16px 20px 18px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.b2b-bank-lines-top {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 40px;
    margin-bottom: 18px;
}

.b2b-bank-inline {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
}

.b2b-bank-inline-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #334155;
    flex-shrink: 0;
}

.b2b-bank-inline-label--account {
    font-size: 0.9rem;
    color: #0f172a;
}

.b2b-bank-inline-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4px;
    min-width: 11em;
}

.b2b-bank-row-account {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.b2b-bank-account-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.b2b-remark-box {
    width: 100%;
    height: 100px;
    border: 2px solid #000 !important;
    box-sizing: border-box;
    margin: 0 0 36px;
    padding: 10px 12px;
    white-space: pre-wrap;
    background: #fff;
}

body.b2b-print-page .b2b-bank-table--form {
    border: 2px solid #000 !important;
    border-collapse: collapse !important;
    box-sizing: border-box !important;
}

body.b2b-print-page .b2b-bank-table--form > tbody > tr > th,
body.b2b-print-page .b2b-bank-table--form > tbody > tr > td {
    border: 1px solid #000 !important;
}

body.b2b-print-page .b2b-bank-table--form .b2b-bank-vtitle {
    border-right: 1px solid #000 !important;
}

/* --- 푸터 (맺음말 → 짧은 실선 → 도메인) --- */
.b2b-print-footer-block {
    margin-top: 36px;
    padding-bottom: 2px;
    text-align: center;
}

.b2b-footer-closing {
    margin: 0;
    text-align: center;
    font-size: 1.08rem;
    font-weight: 700;
    color: #000;
    line-height: 1.55;
}

.b2b-footer-separator {
    width: 250px;
    margin: 10px auto 0;
    border: none;
    border-top: 1.5px solid #000;
    height: 0;
}

.b2b-footer-domain {
    margin: 0;
    padding-top: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #000;
}

.b2b-signature-block {
    margin-top: 20px;
    text-align: right;
    font-size: 1rem;
    font-weight: 700;
    color: #000;
}

.b2b-signature-line {
    display: inline-block;
    width: 200px;
    margin-left: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid #000;
    text-align: right;
}

.b2b-signature-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
}

/* 수정 모드 활성화 시 스타일 */
.editing-active {
    outline: 1px dashed #3b82f6 !important;
    background-color: #f0fdf4 !important;
    transition: background-color 0.2s;
}

.editing-active:hover {
    background-color: #dcfce7 !important;
    cursor: text;
}

@media print {
    body {
        font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: A4;
        margin: 0 !important;
    }

    html.b2b-print-root,
    html.b2b-print-root body.b2b-print-page {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #ffffff !important;
    }

    .no-print {
        display: none !important;
    }

    body.b2b-print-page .b2b-doc {
        width: 210mm !important;
        height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    /* 청구서/거래명세: #print-area.print-wrap.b2b-doc-frame.print-container */
    body.b2b-print-page .print-container {
        box-sizing: border-box !important;
        width: 210mm !important;
        height: 296mm !important;
        min-height: auto !important;
        max-height: 296mm !important;
        margin: 0 auto !important;
        padding: 14mm 15mm !important;
        border: 1.5px solid #000 !important;
        overflow: hidden !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
    }

    body.b2b-print-page .b2b-doc-header {
        margin-bottom: 12px !important;
    }

    body.b2b-print-page .b2b-keybox {
        margin-bottom: 30px !important;
    }

    body.b2b-print-page .b2b-section-title {
        margin: 32px 0 12px !important;
        font-size: 0.95rem !important;
        padding-left: 10px !important;
        border-left-width: 4px !important;
    }

    body.b2b-print-page .b2b-keybox + .b2b-section-title {
        margin-top: 0 !important;
    }

    body.b2b-print-page .b2b-supplier-table th,
    body.b2b-print-page .b2b-supplier-table td,
    body.b2b-print-page .b2b-data-table th,
    body.b2b-print-page .b2b-data-table td {
        padding: 9px 6px !important;
    }

    body.b2b-print-page .b2b-supplier-table .b2b-supplier-th {
        width: 100px !important;
    }

    body.b2b-print-page .b2b-supplier-table td.b2b-supplier-td {
        padding-left: 15px !important;
    }

    body.b2b-print-page .b2b-items-empty td {
        height: 10px !important;
    }

    body.b2b-print-page .b2b-bank-panel {
        padding: 14px 18px 16px !important;
    }

    body.b2b-print-page .b2b-bank-lines-top {
        margin-bottom: 14px !important;
    }

    body.b2b-print-page .b2b-data-table {
        margin-bottom: 38px !important;
    }

    body.b2b-print-page .b2b-bank-table--form {
        margin-bottom: 36px !important;
    }

    body.b2b-print-page,
    body.b2b-print-page .b2b-doc,
    body.b2b-print-page .print-container,
    body.b2b-print-page .b2b-doc-frame,
    body.b2b-print-page #print-area,
    body.b2b-print-page .b2b-data-table,
    body.b2b-print-page .b2b-bank-table,
    body.b2b-print-page .b2b-supplier-table,
    body.b2b-print-page .b2b-keybox,
    body.b2b-print-page .b2b-keybox__buyer {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.b2b-print-page .b2b-print-footer-block {
        margin-top: 18px !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    body.b2b-print-page .b2b-footer-separator {
        width: 250px !important;
        margin: 10px auto 0 !important;
        border-top: 1.5px solid #000 !important;
    }

    body.b2b-print-page .b2b-footer-domain {
        margin: 0 !important;
        padding-top: 10px !important;
    }

    .editing-active {
        outline: none !important;
        background-color: transparent !important;
    }

    .no-print, nav, #toggleEditBtn, button, input, textarea, select, form {
        display: none !important;
    }
}

/* 등록/수정 화면 이력 목록 가독성 */
.contract-history-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    max-height: 280px;
    overflow-y: auto;
}

.contract-history-item {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.contract-history-item:last-child {
    border-bottom: 0;
}

.contract-history-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 6px;
}

.contract-history-item__meta time {
    font-variant-numeric: tabular-nums;
}

.contract-history-item__writer {
    color: #334155;
    font-weight: 700;
}

.contract-history-del-btn {
    margin-left: auto;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.contract-history-del-btn:hover {
    background: #fef2f2;
    border-color: #fda4af;
}

.contract-history-item__content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1f2937;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

/* 계약명 강조 */
.contract-main-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: block;
    margin-bottom: 4px;
}

/* 리스트 모던 프로그레스 바 */
.progress-modern {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-modern-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.finance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.finance-footer {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.widget-container { display: flex; gap: 20px; margin-bottom: 30px; }
.b2b-widget { flex: 1; border-radius: 12px; padding: 20px; box-sizing: border-box; display: flex; flex-direction: column; gap: 15px; }
.b2b-widget .w-header { display: flex; align-items: center; font-size: 1rem; font-weight: 700; }
.b2b-widget .w-main { display: flex; align-items: center; gap: 10px; }
.b2b-widget .w-amount { font-size: 1.8rem; font-weight: 900; letter-spacing: -0.5px; }
.b2b-widget .w-count-pill { padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }
.b2b-widget .w-details { display: flex; flex-direction: column; gap: 5px; }
.b2b-widget .w-detail-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; }

/* 연체/미수 (Red) */
.widget-red { background-color: #fff5f5; border: 1px solid #fee2e2; }
.widget-red .w-header { color: #dc2626; }
.widget-red .w-amount { color: #b91c1c; }
.widget-red .w-count-pill { background-color: #fecaca; color: #b91c1c; }
.widget-red .w-detail-row { background-color: #fef2f2; color: #dc2626; }

/* 오늘 예정 (Blue) */
.widget-blue { background-color: #eff6ff; border: 1px solid #bfdbfe; }
.widget-blue .w-header { color: #2563eb; }
.widget-blue .w-amount { color: #1d4ed8; }
.widget-blue .w-count-pill { background-color: #dbeafe; color: #1d4ed8; }
.widget-blue .w-detail-row { background-color: #eff6ff; color: #2563eb; }

/* 7일 임박 (Yellow) */
.widget-yellow { background-color: #fffbeb; border: 1px solid #fef3c7; }
.widget-yellow .w-header { color: #d97706; }
.widget-yellow .w-amount { color: #b45309; }
.widget-yellow .w-count-pill { background-color: #fde68a; color: #b45309; }
.widget-yellow .w-detail-row { background-color: #fffbeb; color: #d97706; }

/* 테이블 강제 스타일링 */
.attendance-table th { background-color: #f8fafc !important; color: #475569 !important; font-weight: 600 !important; padding: 14px 10px !important; text-align: center !important; border-bottom: 2px solid #e2e8f0 !important; }
.attendance-table td { vertical-align: middle !important; text-align: center !important; border-bottom: 1px solid #e2e8f0 !important; padding: 12px 10px !important; }
.attendance-row:hover { background-color: #f1f5f9 !important; }

/* 상태 파스텔 뱃지 강제화 */
.status-badge { padding: 6px 12px !important; border-radius: 6px !important; font-weight: 600 !important; font-size: 0.85rem !important; display: inline-block !important; min-width: 60px; text-align: center !important; }
.badge-absent { background-color: #fee2e2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; }
.badge-late { background-color: #fef08a !important; color: #a16207 !important; border: 1px solid #fde047 !important; }
.badge-normal { background-color: #e0e7ff !important; color: #4338ca !important; border: 1px solid #c7d2fe !important; }

/* attendance 구형 행 강조 제거(강제) */
.att-tr-late,
.att-tr-late td,
.att-tr-late:hover,
.att-tr-late:hover td {
    background: transparent !important;
    background-color: transparent !important;
}

/* 최근 5일 이력 미니 트래커 */
.history-tracker { display: flex; justify-content: center; align-items: center; gap: 6px; }
.history-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); transition: transform 0.2s ease; }
.history-dot:hover { transform: scale(1.3); }
.history-dot.dot-normal { background-color: #3b82f6 !important; } /* 정상: 파란색 */
.history-dot.dot-late { background-color: #eab308 !important; } /* 지각: 노란색 */
.history-dot.dot-absent { background-color: #ef4444 !important; } /* 미출근: 빨간색 */
.history-dot.dot-empty { background-color: #f1f5f9 !important; } /* 기록없음: 연한 회색 */

/* 업무보고 상세화면 근태 연동 뱃지 */
.report-meta-info { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #475569; margin-bottom: 16px; }
.report-meta-info .divider { color: #cbd5e1; }
.attendance-check-badge {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* 업무보고 상세 하단 액션 버튼 영역 */
.report-bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

.report-bottom-actions-left,
.report-bottom-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.report-bottom-actions-right.report-btn-group a,
.report-bottom-actions-right.report-btn-group button {
    margin-left: 0;
}

/* 스마트 토글 버튼 공통 규격 */
.btn-toggle-status {
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    box-sizing: border-box;
    line-height: 1.25;
    white-space: nowrap;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.btn-toggle-status:hover { transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.btn-toggle-status:disabled {
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.65;
}

/* 미확인 상태 (리스트와 동일한 빨간색 파스텔톤) */
.state-unconfirmed {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

/* 확인 완료 상태 (깔끔한 파란색 솔리드톤) */
.state-confirmed {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border: 1px solid #2563eb !important;
}

/* 카카오톡 스타일 새 글 알림 콩(Dot) — LNB 알림점과 동일 5×5 */
.badge-new-dot {
    display: inline-block;
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    min-height: 5px !important;
    background-color: #ef4444 !important;
    border-radius: 50% !important;
    margin-left: 3px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* .red-dot-badge 기본 규격은 사이드바 블록(.sidebar-link 인근)에서 정의 */

/* 프로젝트 상세 폼 내 NEW 항목 강조 */
.new-item-highlight {
    background-color: #fffbeb !important;
    border: 1px solid #fde68a !important;
    transition: all 0.3s ease;
    border-radius: 8px;
}

/* 관리자 댓글 삭제 버튼 */
.btn-comment-delete { background: transparent; border: none; color: #94a3b8; font-size: 0.8rem; cursor: pointer; padding: 0 4px; margin-left: 8px; transition: color 0.2s; }
.btn-comment-delete:hover { color: #ef4444; text-decoration: underline; }

/* ----- 에이전시 프로젝트 관리 ----- */
.agency-project-page { max-width: 100%; }
.agency-project-form-card { max-width: 1080px; margin-left: auto; margin-right: auto; }
.agency-project-form-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.agency-project-form-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.agency-project-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.agency-project-section__title { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agency-project-section__num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff; font-size: 0.8rem; font-weight: 800;
}
.agency-project-section__hint { font-size: 0.78rem; font-weight: 600; color: #64748b; }
.agency-project-grid { display: grid; gap: 16px; }
.agency-project-grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.agency-project-grid--basic-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.agency-project-grid--basic-4 .form-group { margin-bottom: 0; }

@media (max-width: 980px) {
    .agency-project-grid--basic-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .agency-project-grid--basic-4 { grid-template-columns: 1fr; }
}
.agency-project-total-preview { font-size: 0.95rem; color: #475569; margin-bottom: 16px; }
.agency-project-total-preview strong { color: #4f46e5; font-size: 1.15rem; }
.agency-part-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.agency-part-card {
    border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
.agency-part-card__head { font-weight: 800; font-size: 0.9rem; color: #334155; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.agency-part-card__progress { margin-bottom: 0; }
.agency-part-card__pct { font-weight: 800; color: #6366f1; margin-left: 6px; }

/* 진척도 range: 100%일 때 채움이 트랙 끝까지 맞도록 --agency-range-pct 로 제어 (project_form.js에서 갱신) */
input.agency-range[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    background: transparent;
    --agency-range-pct: 0%;
}
input.agency-range[type="range"]:focus {
    outline: none;
}
input.agency-range[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(
        to right,
        #6366f1 0%,
        #6366f1 var(--agency-range-pct),
        #e2e8f0 var(--agency-range-pct),
        #e2e8f0 100%
    );
}
input.agency-range[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -5px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4f46e5;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}
input.agency-range[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}
input.agency-range[type="range"]::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: #6366f1;
}
input.agency-range[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid #4f46e5;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}
input.agency-range[type="range"]::-ms-track {
    height: 8px;
    border-radius: 4px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}
input.agency-range[type="range"]::-ms-fill-lower {
    background: #6366f1;
    border-radius: 4px;
}
input.agency-range[type="range"]::-ms-fill-upper {
    background: #e2e8f0;
    border-radius: 4px;
}
input.agency-range[type="range"]::-ms-thumb {
    width: 18px;
    height: 18px;
    margin-top: 0;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4f46e5;
    box-sizing: border-box;
}
.agency-pct-input { max-width: 88px; margin-top: 8px; }
.agency-project-form__submit { margin-top: 28px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.agency-project-form__submit--core {
    margin-top: 24px;
    margin-bottom: 8px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #eef0f4;
}
.agency-project-sales-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.agency-project-sales-save.btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    background: #4f46e5;
    border-color: #4338ca;
    color: #fff;
}
.agency-project-sales-save.btn:hover {
    background: #4338ca;
    border-color: #3730a3;
}

.agency-project-form__bottom-nav {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef0f4;
}

.agency-modal { position: fixed; inset: 0; z-index: 12000; display: none; align-items: center; justify-content: center; padding: 16px; }
.agency-modal.is-open { display: flex; }
.agency-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.agency-modal__panel {
    position: relative; z-index: 1; width: min(560px, 100%); max-height: min(80vh, 640px);
    background: #fff; border-radius: 14px; box-shadow: 0 24px 48px rgba(0,0,0,0.18); display: flex; flex-direction: column;
}
.agency-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.agency-modal__head h4 { margin: 0; font-size: 1.05rem; }
.agency-modal__close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #64748b; }
.agency-modal__body { padding: 14px 18px 18px; overflow: auto; }
.agency-modal__hint { font-size: 0.85rem; color: #64748b; margin: 0 0 12px; }
.agency-modal__loading { text-align: center; color: #64748b; padding: 24px; }
.agency-contract-pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.agency-contract-pick-item {
    width: 100%; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid #e2e8f0;
    background: #f8fafc; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.agency-contract-pick-item:hover { border-color: #a5b4fc; background: #eef2ff; }
.agency-contract-pick-item__title { display: block; font-weight: 700; color: #0f172a; line-height: 1.35; }
.agency-contract-pick-item__title .agency-contract-highlight { font-weight: 800; }
.agency-contract-pick-item__meta { display: block; font-size: 0.8rem; color: #64748b; margin-top: 6px; line-height: 1.4; }
.agency-contract-pick-item__client .agency-contract-highlight { font-weight: 700; }
.agency-contract-pick-item__dot { opacity: 0.5; }

.agency-contract-search-wrap { margin-bottom: 14px; }
.agency-contract-search-field {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border: 2px solid #e2e8f0; border-radius: 12px;
    background: #f8fafc; transition: border-color 0.15s, box-shadow 0.15s;
}
.agency-contract-search-field:focus-within {
    border-color: #818cf8; background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.agency-contract-search-icon { color: #64748b; font-size: 1.1rem; flex-shrink: 0; }
.agency-contract-search-input {
    flex: 1; min-width: 0; border: none; background: transparent; font-size: 1rem; font-weight: 500;
    color: #0f172a; outline: none;
}
.agency-contract-search-input::placeholder { color: #94a3b8; font-weight: 400; }

mark.agency-contract-highlight {
    background: linear-gradient(180deg, #fef08a 0%, #fde047 100%);
    color: inherit; padding: 0 2px; border-radius: 3px; font-weight: inherit;
}

.agency-contract-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 36px 20px; color: #64748b;
}
.agency-contract-empty-state__icon { font-size: 2.5rem; color: #cbd5e1; margin-bottom: 12px; }
.agency-contract-empty-state__text { margin: 0; font-size: 0.95rem; font-weight: 700; color: #475569; }
.agency-contract-empty-state__sub { margin: 8px 0 0; font-size: 0.82rem; color: #94a3b8; }
.agency-contract-empty-state--filter .agency-contract-empty-state__icon { color: #a5b4fc; }

.agency-project-view-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.agency-view-tab {
    padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 0.88rem;
    text-decoration: none; color: #64748b; background: #f1f5f9; border: 1px solid transparent;
}
.agency-view-tab:hover { color: #334155; }
.agency-view-tab.is-active { background: #fff; color: #4f46e5; border-color: #c7d2fe; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

.agency-kanban {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.agency-kanban__col {
    flex: 0 0 min(300px, 85vw); scroll-snap-align: start;
    background: #f1f5f9; border-radius: 12px; border: 1px solid #e2e8f0;
    display: flex; flex-direction: column; max-height: min(72vh, 900px);
}
.agency-kanban__col-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; font-weight: 800; font-size: 0.82rem; color: #334155;
    border-bottom: 1px solid #e2e8f0; background: #fff; border-radius: 12px 12px 0 0;
}
.agency-kanban__count { background: #e2e8f0; color: #475569; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; }
.agency-kanban__cards { padding: 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.agency-pj-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.agency-pj-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.agency-pj-card__title { margin: 0; font-size: 0.95rem; font-weight: 800; color: #0f172a; line-height: 1.35; flex: 1; min-width: 0; }
.agency-pj-card__client { font-size: 0.78rem; color: #64748b; margin-bottom: 12px; }
.agency-priority-badge { font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.agency-priority-badge--urgent { background: #fee2e2; color: #b91c1c; }
.agency-priority-badge--high { background: #ffedd5; color: #c2410c; }
.agency-priority-badge--normal { background: #e0e7ff; color: #4338ca; }
.agency-priority-badge--low { background: #f1f5f9; color: #64748b; }

.agency-pj-card__progress-block { margin-bottom: 12px; }
.agency-pj-card__progress-label { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; color: #475569; margin-bottom: 4px; }
.agency-pj-card__progress-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.agency-pj-card__progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: width 0.35s ease;
}

.agency-pj-card__parts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.agency-pj-part {
    border: 1px solid #f1f5f9; border-radius: 10px; padding: 8px 6px; text-align: center;
    background: #fafafa;
}
.agency-pj-part--slow { border-color: #fecaca; background: #fff7f7; }
.agency-pj-part__top { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.agency-pj-part__badge {
    font-size: 0.62rem; font-weight: 900; color: #fff; background: #475569; width: 18px; height: 18px;
    border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
}
.agency-pj-part__avatar {
    width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid #e2e8f0;
}
.agency-pj-part__avatar--txt {
    display: inline-flex; align-items: center; justify-content: center; background: #e0e7ff; color: #3730a3;
    font-size: 0.65rem; font-weight: 800;
}
.agency-pj-part__name { font-size: 0.65rem; color: #475569; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agency-pj-part__bar { height: 4px; border-radius: 99px; background: #e2e8f0; margin: 6px 0 2px; overflow: hidden; }
.agency-pj-part__bar span { display: block; height: 100%; border-radius: 99px; background: #94a3b8; }
.agency-pj-part__pct { font-size: 0.62rem; font-weight: 800; color: #64748b; }

.agency-pj-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; font-size: 0.75rem; color: #64748b; }

.agency-project-table-wrap { overflow-x: auto; }
.agency-project-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.agency-project-table th, .agency-project-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: middle; }
.agency-project-table th { background: #f8fafc; font-weight: 700; color: #475569; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; }
.agency-pj-cell-title-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
    margin: -2px -4px;
    padding: 2px 4px;
}
.agency-pj-cell-title-link:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
.agency-pj-cell-title {
    display: inline-block;
    font-weight: 700;
    color: #0f172a;
}
.agency-pj-cell-sub {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}
.agency-pj-cell-title-link:hover .agency-pj-cell-title {
    color: #1d4ed8;
    text-decoration: underline;
}
.agency-pj-cell-title-link:hover .agency-pj-cell-sub {
    color: #475569;
}
.agency-mini-bar { height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; min-width: 64px; }
.agency-mini-bar--lg { min-width: 100px; }
.agency-mini-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #818cf8); }
.agency-pj-pct { font-weight: 800; font-size: 0.78rem; color: #4f46e5; margin-left: 6px; }
.agency-pj-triple { font-size: 0.78rem; color: #475569; font-variant-numeric: tabular-nums; }

/* 프로젝트 리스트: 통합 뱃지 (상태·D-Day·P/D/C) */
.agency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-sizing: border-box;
}

.agency-badge--status-backlog { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.agency-badge--status-planning { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.agency-badge--status-design { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.agency-badge--status-dev { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.agency-badge--status-review { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.agency-badge--status-done { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.agency-badge--status-on_hold { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.agency-badge--dday-none { background: #f8fafc; color: #64748b; border-color: #e2e8f0; font-weight: 600; }
.agency-badge--dday-calm { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.agency-badge--dday-warn15 { background: #fffbeb; color: #a16207; border-color: #fde68a; }
.agency-badge--dday-warn10 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.agency-badge--dday-danger5 { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.agency-badge--dday-critical { background: #fff1f2; color: #9f1239; border-color: #fda4af; }
.agency-badge--dday-overdue { background: #fafafa; color: #27272a; border-color: #e4e4e7; }

.agency-badge--role-p { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.agency-badge--role-d { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.agency-badge--role-c { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }

.agency-pdc-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 4px;
}
.agency-pdc-sep {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.7rem;
    user-select: none;
}

/* 프로젝트 리스트: 상단 컨트롤 바 */
.agency-project-list-heading {
    margin: 0 0 10px;
}
.agency-project-list-heading .page-title {
    margin: 0;
}

.agency-project-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 14px;
}

.agency-project-control-bar__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.agency-project-control-bar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
}

.agency-project-control-bar__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.agency-project-search-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    flex: 0 1 auto;
    min-width: 0;
}

/* 시안 목록: 프로젝트/상태 필터 + project_list 검색 퓨즈 동일 레이아웃 */
.agency-project-search-form.agency-project-draft-list-form {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
}
.agency-project-draft-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    width: 100%;
}
.agency-project-draft-filters__select {
    width: auto;
    min-width: 160px;
    max-width: 100%;
}

body.page-draft-list .draft-list-project-link {
    color: #0d6efd;
    text-decoration: none;
}
body.page-draft-list .draft-list-project-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* 시안 목록: 링크 컬럼(외부 링크 아이콘) 표 중앙 정렬 (테이블 기본 left 보정) */
body.page-draft-list .agency-project-table--pm th.agency-pm-col-dday,
body.page-draft-list .agency-project-table--pm td.agency-pm-col-dday {
    text-align: center !important;
}

/* 프로젝트 목록: 계약 구분 — 계약 목록과 동일 category-tab UI */
.agency-project-contract-type-filter-bar .contract-list-filter-bar__tabs {
    justify-content: flex-start;
}

/* 검색 입력 + 버튼 일체화 (단일 테두리·동일 높이) */
.agency-project-search-fused {
    display: flex;
    align-items: stretch;
    min-height: 34px;
    border: 1px solid var(--border-panel);
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
    flex: 0 1 auto;
    min-width: min(100%, 280px);
    max-width: 420px;
}

.agency-project-search-fused:focus-within {
    border-color: #94a3b8;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.agency-project-search-fused__input-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 10px 0 12px;
    cursor: text;
}

.agency-project-search-fused__icon {
    color: #94a3b8;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.agency-project-search-fused__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.35;
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.agency-project-search-fused__input::placeholder {
    color: #9ca3af;
}

.agency-project-search-fused__submit.btn {
    flex: 0 0 auto;
    margin: 0;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--border-panel);
    padding: 0 14px;
    min-height: 100%;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1.35;
    box-sizing: border-box;
}

/* 프로젝트 리스트 PM: D-Day 범례 */
.agency-dday-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.agency-dday-legend__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.agency-dday-legend__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.agency-project-control-bar__row .agency-dday-legend {
    margin-left: auto;
}

.agency-project-table--pm th,
.agency-project-table--pm td { font-size: 0.82rem; padding: 10px 8px; }
.agency-project-table--pm .agency-pm-mono { font-variant-numeric: tabular-nums; }
.agency-pm-col-num { width: 44px; text-align: center !important; }
.agency-pm-col-type { max-width: 100px; }
.agency-pm-col-title { min-width: 160px; }
.agency-pm-col-status { white-space: nowrap; }
.agency-pm-col-total { min-width: 120px; }
.agency-pm-col-pdc { white-space: nowrap; }
.agency-pm-col-assign { max-width: 200px; line-height: 1.35; }
.agency-pm-col-date { white-space: nowrap; }
.agency-pm-col-dday { white-space: nowrap; }
.agency-pm-col-act { width: 72px; text-align: center !important; }

/* 프로젝트 이력관리·타임라인 (메인 카드 내 SaaS형) */
.agency-project-history-hint { margin: 0 0 10px; font-size: 0.8rem; color: #64748b; line-height: 1.45; }
.agency-project-history-hint--below { margin-top: 8px; }
.agency-project-sales-textarea {
    min-height: 96px;
    resize: vertical;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px 12px;
}
.agency-project-sales-textarea--readonly {
    background: #f3f4f6 !important;
    color: #6b7280;
    cursor: default;
}

.agency-project-sales-textarea:focus {
    outline: none;
    border-color: #3b82f6 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.agency-range--locked {
    opacity: 0.65;
    cursor: not-allowed;
}

.agency-project-timeline-embed {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #eef0f4;
    max-width: 100%;
    overflow-x: hidden;
}

.agency-project-timeline-embed__title {
    margin: 0 0 14px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.agency-timeline-composer {
    margin-bottom: 18px;
}

.agency-timeline-composer__input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 72px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: #fff;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-sizing: border-box;
}

.agency-timeline-composer__input:hover {
    border-color: #e5e7eb;
    background: #fff;
}

.agency-timeline-composer__input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agency-timeline-composer__input::placeholder {
    color: #94a3b8;
}

.agency-timeline-composer__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.agency-timeline-composer__submit.btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agency-timeline-composer__submit.btn:hover {
    background: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}

.agency-timeline-loading {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 12px;
}

.agency-timeline-shell {
    display: flex;
    align-items: stretch;
    gap: 0 14px;
    margin-top: 4px;
    min-height: 0;
}

.agency-timeline-shell__rail {
    flex: 0 0 20px;
    width: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.agency-timeline-shell__rail::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e5e7eb;
    border-radius: 999px;
}

.agency-timeline-shell__feed {
    flex: 1 1 auto;
    min-width: 0;
}

.agency-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.agency-timeline-entry {
    display: block;
    padding-bottom: 22px;
    position: relative;
}

.agency-timeline-entry:last-child {
    padding-bottom: 4px;
}

.agency-timeline-entry__main {
    min-width: 0;
}

.agency-timeline-entry__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.agency-timeline-entry__who {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.agency-timeline-entry__author {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
}

.agency-timeline-entry__time {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
}

.agency-timeline-entry__actions {
    flex-shrink: 0;
}

.agency-timeline-entry__delete {
    margin: 0;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font);
}

.agency-timeline-entry__delete:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.agency-timeline-entry__bubble {
    position: relative;
    border-radius: 12px;
    border: 1px solid #e8ecf1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 12px 14px;
}

.agency-timeline-entry__bubble::before {
    content: '';
    position: absolute;
    left: -26px; /* rail(왼쪽) 중심과 맞추기 위한 조정 */
    top: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.agency-timeline-entry__body {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #334155;
    word-break: break-word;
}

.agency-timeline-comments {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 20px;
    background: #f9fafb;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 12px 12px;
}

.agency-timeline-comment {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.agency-timeline-comment__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-bottom: 4px;
}

.agency-timeline-comment__name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.agency-timeline-comment__time {
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
}

.agency-timeline-comment__bubble {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 8px 10px;
}

.agency-timeline-comment__body {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #475569;
    word-break: break-word;
}

.agency-timeline-reply {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e8ecf1;
}

.agency-timeline-reply__input {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.agency-timeline-reply__input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agency-timeline-reply__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.agency-timeline-reply__submit.btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agency-timeline-reply__submit.btn:hover {
    background: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}

/* 프로젝트 폼: 비관리자 기본 정보 잠금 */
.agency-form-perm-note { color: #64748b; font-weight: 600; }
.agency-project-section--basic-locked {
    position: relative;
    padding-top: 8px;
}
.agency-project-section__lock-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 6px;
    vertical-align: middle;
}
.agency-field-locked,
.agency-field-locked.form-input,
.agency-field-locked.form-select {
    background-color: #f3f4f6 !important;
    color: #4b5563;
    cursor: not-allowed;
    border-color: #e5e7eb;
}
select.agency-field-locked.form-select {
    opacity: 1;
}

/* ----- 대시보드 핵심 위젯 (3개) 모던 UI ----- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0;
}

.widget-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.widget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
    gap: 10px;
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    margin: 0;
}

.widget-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 16px; /* 스크롤바와 글자 겹침 방지 */
}

/* 대시보드 위젯 모던 스크롤바 */
.widget-content::-webkit-scrollbar {
    width: 6px;
}
.widget-content::-webkit-scrollbar-track {
    background: transparent;
}
.widget-content::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 10px;
}
.widget-content::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Dash 카드(기존)와 충돌 방지: 상단 컬러 바/기본 padding 제거 */
.widget-card.dash-card {
    border-top: none !important;
    padding: 24px;
}

/* 근태 위젯 타이머/버튼: 훨씬 크게 */
.widget-card--att .dash-att-clock {
    font-size: 2.8rem;
    font-weight: 900;
    text-align: center;
    margin: 30px 0;
    letter-spacing: -1px;
    color: #2563eb;
}

.widget-card--att .dash-att-btn {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    min-width: 120px;
}

.widget-card--att .dash-att-btn.btn-primary {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.widget-card--att .dash-att-btn.btn-secondary {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

.widget-card--att .dash-att-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* 공지/업무 리스트: 간격·테두리·말줄임표 + 우측 고정 메타 */
.widget-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.widget-mini-list > li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.widget-mini-list > li.dash-mini-empty {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid rgba(15,23,42,0.06);
}

.widget-mini-list > li:last-child {
    border-bottom: none;
}

.widget-list-title {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 900;
    color: var(--text, #111827);
    text-decoration: none;
}

.widget-list-meta {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 120px;
}

/* 업무보고(우측 메타) 전용: 날짜를 빼고 부서+이름 1줄만 */
.widget-card--wr .widget-mini-list > li {
    align-items: center;
}

.widget-card--wr .widget-list-title {
    -webkit-line-clamp: 1;
}

.widget-card--wr .report-meta {
    margin-left: auto;
    flex: 0 0 auto;
    max-width: 45%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(17,24,39,0.7);
    font-weight: 900;
    font-size: 0.78rem;
}

.widget-list-date,
.widget-list-author {
    color: rgba(17,24,39,0.55);
    font-size: 0.76rem;
    line-height: 1.25;
    white-space: nowrap;
}

.widget-status-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(124,58,237,0.10);
    color: #7c3aed;
    font-weight: 900;
    white-space: nowrap;
}

/* 공지사항 & 업무보고 리스트 공통 모던화 */
.notice-item, .report-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px; border-bottom: 1px solid #f3f4f6; transition: all 0.2s ease; border-radius: 8px; margin-bottom: 4px; }
.notice-item:hover, .report-item:hover { background-color: #f8fafc; cursor: pointer; }
.notice-title-wrapper { display: flex; align-items: center; gap: 10px; flex: 1; overflow: hidden; min-width: 0; }
.badge-notice { background-color: #f3e8ff; color: #7e22ce; padding: 3px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.notice-title, .report-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1e293b; font-weight: 500; font-size: 0.95rem; }
.notice-meta, .report-meta { font-size: 0.8rem; color: #64748b; text-align: right; white-space: nowrap; margin-left: 16px; flex-shrink: 0; }

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 10px 0 24px 0;
    }
}

/* ----- 대시보드: 자사 네임서버 카드 ----- */
.shadow-sm {
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.fw-bold {
    font-weight: 700;
}

/* 네임서버 카드: 12컬럼 기준 9칸(≈ col-md-3×3)만 사용, 우측 여백 */
.dashboard-grid > .dashboard-ns-wrap {
    grid-column: 1 / -1;
}

.dashboard-ns-wrap {
    width: 100%;
    max-width: 75%;
}

@media (max-width: 1100px) {
    .dashboard-ns-wrap {
        max-width: 100%;
    }
}

.dashboard-ns-card.card {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    overflow: hidden;
    min-height: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-ns-card.card:hover {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.dashboard-ns-card__header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.dashboard-ns-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.dashboard-ns-card__icon {
    color: var(--business-accent);
    font-size: 1.15rem;
    opacity: 0.95;
}

.dashboard-ns-card__body {
    padding: 16px 20px 20px;
}

.dashboard-ns-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dashboard-ns-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    z-index: 9999;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: var(--business-accent-strong);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dashboard-ns-toast.dashboard-ns-toast--show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dashboard-ns-row {
    display: grid;
    grid-template-columns: minmax(6.5rem, 7.75rem) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 10px;
    margin-bottom: 6px;
    background: #fafbfc;
    transition: background 0.2s ease;
}

.dashboard-ns-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.dashboard-ns-row__tier {
    font-weight: 800;
    font-size: 0.875rem;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.dashboard-ns-val {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.dashboard-ns-val:hover {
    background: #e8f0fe;
    color: #1d4ed8;
}

.dashboard-ns-val:active {
    background: #dbeafe;
}

.dashboard-ns-val__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-ns-val__icon {
    flex-shrink: 0;
    font-size: 0.8rem;
    opacity: 0.55;
    transition: opacity 0.18s ease;
}

.dashboard-ns-val:hover .dashboard-ns-val__icon {
    opacity: 0.95;
}

@media (max-width: 700px) {
    .dashboard-ns-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }

    .dashboard-ns-row__tier {
        padding-bottom: 2px;
        border-bottom: 1px dashed #e2e8f0;
        margin-bottom: 2px;
    }
}

/* 프로젝트 목록: 진행/완료 탭 · 행 액션 */
.agency-project-tabs {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: #f3f4f6;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.agency-project-tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}

.agency-project-tab:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.7);
}

.agency-project-tab.is-active {
    color: #111827;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.agency-project-list-heading--tabs {
    margin-bottom: 16px;
}

.agency-pm-col-act--row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    justify-content: center;
    min-width: 150px;
}

.agency-project-row-action {
    display: inline-flex;
    margin: 0;
}

/* 프로젝트 목록: 관리 컬럼 버튼 레이아웃 고정 */
.agency-project-table--pm .agency-pm-col-act,
.agency-project-table--pm th.agency-pm-col-act,
.agency-project-table--pm td.agency-pm-col-act {
    white-space: nowrap;
    min-width: 150px;
    vertical-align: middle !important;
}

.action-btn-group {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.action-btn-group button,
.action-btn-group a.btn {
    padding: 5px 8px !important;
    font-size: 0.8rem !important;
    border-radius: 4px !important;
    height: 32px !important; /* 텍스트/아이콘 버튼 공통 고정 */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    box-sizing: border-box;
}

.action-btn-group button.btn-project-delete,
.action-btn-group button.btn-project-delete.btn-sm {
    width: 32px !important;
    padding: 0 !important;
}

.action-btn-group button.btn-project-delete i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    margin: 0 !important;
}

.action-btn-group button.btn-project-delete .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.action-btn-group form {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.btn-project-complete {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}

.btn-project-complete:hover {
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
}

.btn-project-delete {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

.btn-project-delete:hover {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
}

/* ----- 프로젝트 리스트 테이블: 가로줄(밑줄) 1px 일자 강제 ----- */
.agency-project-table {
    border-collapse: collapse !important;
    width: 100% !important;
}

.agency-project-table tbody tr td {
    border-bottom: 1px solid #e5e7eb !important;
    vertical-align: middle !important;
    padding: 12px 10px !important;
}

/* td 내부 요소들은 밑줄 금지(가로줄 중복/계단 방지) */
.agency-project-table tbody tr td div,
.agency-project-table tbody tr td .action-btn-group,
.agency-project-table tbody tr td form,
.agency-project-table tbody tr td .agency-project-row-action {
    border-bottom: none !important;
}

/* ===== 프로젝트 리스트: 계단식 밑줄 완전 차단(최종 오버라이드) ===== */
.agency-project-table {
    border-collapse: collapse !important;
    width: 100% !important;
}

/* 밑줄은 tr에만 1번 */
.agency-project-table tbody tr {
    border-bottom: 1px solid #e5e7eb !important;
}

/* td 개별 선은 절대 금지 */
.agency-project-table tbody tr td {
    border: none !important;
    border-bottom: none !important;
    vertical-align: middle !important;
    height: 56px !important; /* 행 높이 들쭉날쭉 방지 */
    padding: 10px !important;
}

/* 내부 껍데기(텍스트 wrapper/div/form)는 선/여백 원천 차단 */
.agency-project-table tbody tr td div,
.agency-project-table tbody tr td form,
.action-btn-group,
.agency-project-table tbody tr td .agency-project-row-action {
    border: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== 근태 관리자(일자 이동 + 모던 테이블) ===== */
.att-admin-head {
    align-items: center;
    gap: 12px;
}

.att-date-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.att-date-nav__btn {
    white-space: nowrap;
}

.att-date-nav__picker-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 10px;
    padding: 6px 10px;
}

.att-date-nav__cal {
    font-size: 0.95rem;
    line-height: 1;
}

.att-date-nav__picker {
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
}

/* 그리드 정렬 폭 살짝 넓게 고정 */
.work-time-wrapper {
    display: grid !important;
    grid-template-columns: 90px 110px !important;
    width: 200px !important;
    margin: 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
}

.time-base {
    font-weight: 600 !important;
    color: #334155 !important;
    text-align: right !important;
    padding-right: 8px !important;
    margin: 0 !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: 0 !important;
}

/* 뱃지 배경 날리고 깔끔한 텍스트로 변경 */
.time-over, .time-under {
    background: transparent !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    justify-self: start !important;
    margin: 0 !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: 0 !important;
}

.time-over { color: #ea580c !important; }
.time-under { color: #2563eb !important; }

/* CSS로 괄호 자동 추가해서 세련되게 묶기 */
.time-over::before, .time-under::before { content: "(" !important; }
.time-over::after, .time-under::after { content: ")" !important; }

.att-user-table thead th,
.att-monitor-table thead th,
.attendance-table thead th {
    background: #f8fafc;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 700;
}

.att-user-table tbody tr:hover td,
.att-monitor-table tbody tr:hover td,
.attendance-table tbody tr:hover td {
    background-color: #f1f5f9;
}

.att-user-table .status-badge,
.att-monitor-table .status-badge,
.attendance-table .status-badge,
.att-monitor-table .att-badge {
    font-weight: 700 !important;
    border-radius: 999px !important;
    padding: 5px 10px !important;
}

/* attendance.php 총 근무시간 정렬 강제: 위 grid 규칙 사용 */

/* 근태 테이블 여백/정렬 모던 오버라이드 */
.attendance-table,
.att-user-table,
.att-monitor-table { width: 100% !important; border-collapse: collapse !important; border-spacing: 0 !important; }
.table-wrap:has(.attendance-table),
.table-wrap:has(.att-user-table),
.table-wrap:has(.att-monitor-table) {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}
.attendance-table th,
.att-user-table th,
.att-monitor-table th { background-color: #f8fafc !important; padding: 14px 16px !important; font-weight: 600 !important; color: #475569 !important; border-bottom: 1px solid #e2e8f0 !important; text-align: center !important; }
.attendance-table td,
.att-user-table td,
.att-monitor-table td { padding: 14px 16px !important; vertical-align: middle !important; border-bottom: 1px solid #f1f5f9 !important; text-align: center !important; color: #1e293b !important; }
.attendance-table tr:hover td,
.att-user-table tr:hover td,
.att-monitor-table tr:hover td { background-color: #f8fafc !important; transition: background-color 0.2s ease !important; }
/* work-time-wrapper는 위 grid 규칙 단일 적용 */

/* 요약 박스 모던 카드화 */
.att-company-month,
.att-admin-monitor {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    padding: 20px !important;
}

/* 전사 통일: Flatpickr 날짜 필드 래퍼 */
.date-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 200px;
}

/* 전사 날짜 필드: 테두리·배경 강제 (투명/무테두리로 사라지는 현상 방지) */
.date-input-wrapper input {
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    padding: 8px 30px 8px 12px !important;
    border-radius: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #1e293b !important;
    outline: none !important;
    min-height: 38px !important;
}

.date-input-wrapper input:hover {
    border-color: #94a3b8 !important;
}

.date-input-wrapper input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.date-input-wrapper--fluid {
    max-width: none;
}

.date-input-wrapper--block {
    display: block;
    width: 100%;
}

.date-arrows .date-input-wrapper {
    flex: 1;
    min-width: 0;
    max-width: none;
}

/* 날짜 화살표 바 안에서도 입력칸이 박스로 보이도록(구버전 transparent 제거) */
.date-arrows .date-input-wrapper input.form-input,
.date-arrows .date-input-wrapper input {
    border-radius: 0 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

.att-date-nav__picker-wrap .date-input-wrapper {
    max-width: none;
    flex: 1;
    min-width: 0;
}

.wr-date-range .date-input-wrapper {
    max-width: none;
    width: 100%;
    min-width: 0;
}

.contract-schedule-table .date-input-wrapper {
    max-width: none;
}

.calendar-trigger-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 1.1rem;
    font-style: normal;
    line-height: 1;
    user-select: none;
    z-index: 2;
}

.calendar-trigger-icon:hover {
    color: #334155;
}

.calendar-trigger-icon:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* draft_view 갤러리: 시안 전폭·스테이지 높이 채움·스크롤바·SCROLL DOWN 힌트 */
.draft-gallery .sian-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.draft-gallery .empty-notice {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    background: #f9fafb;
}

.draft-gallery .sian-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

.draft-gallery .sian-wrapper::-webkit-scrollbar {
    width: 5px;
}

.draft-gallery .sian-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.draft-gallery .sian-wrapper::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 100px;
}

.draft-gallery .sian-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.32);
}

.draft-gallery .sian-img {
    width: 100%;
    height: auto;
    display: block;
}

.draft-gallery .sian-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 12;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.draft-gallery .sian-scroll-hint--hidden,
.draft-gallery .sian-scroll-hint--no-scroll {
    opacity: 0;
    visibility: hidden;
}

.draft-gallery .sian-scroll-hint--hidden .sian-scroll-hint__arrows,
.draft-gallery .sian-scroll-hint--no-scroll .sian-scroll-hint__arrows {
    animation: none;
}

.draft-gallery .sian-scroll-hint__arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: sian-hint-bounce 1.35s ease-in-out infinite;
}

.draft-gallery .sian-scroll-hint__chev {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(15, 23, 42, 0.4);
    border-bottom: 2px solid rgba(15, 23, 42, 0.4);
    transform: rotate(45deg);
    margin-top: -4px;
    opacity: 0.85;
}

.draft-gallery .sian-scroll-hint__chev:nth-child(2) {
    opacity: 0.45;
}

@keyframes sian-hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

.draft-gallery .sian-scroll-hint__label {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.42);
    margin: 0;
    padding-left: 0.42em;
}

.draft-gallery .draft-gallery__media--sian {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    margin: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.draft-gallery .draft-gallery__media--sian img.sian-img {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: auto;
    display: block;
    object-fit: initial;
    box-shadow: none;
}

