@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
    /* Brand Primary Scale */
    --brand-navy-950: #071329;
    --brand-navy-900: #0d2144;
    --brand-navy-800: #1e3a6e;
    --brand-navy-700: #163a75;
    --brand-primary: #1e4fa8;
    --brand-primary-hover: #163a75;
    --brand-primary-tint: #f0f4fa;
    --brand-gold: #d6b25e;
    --brand-gold-text: #996e1e;

    /* Neutrals (Slate Cool Gray) */
    --bg-ground: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-muted: #f1f5f9;
    --border-subtle: #edf1f7;
    --border-default: #e2e6ee;
    --border-strong: #cbd3e1;
    --text-main: #111827;
    --text-sub: #334155;
    --text-muted: #64748b;
    --text-disabled: #94a3b8;

    /* Functional States */
    --state-success: #15803D;
    --state-success-tint: #f0fdf4;
    --state-success-text: #166534;
    --state-warning: #d97706;
    --state-warning-tint: #fffbeb;
    --state-warning-text: #92400e;
    --state-danger: #dc2626;
    --state-danger-tint: #fef2f2;
    --state-danger-text: #b91c1c;
    --state-info: #2563eb;
    --state-info-tint: #eff6ff;
    --state-info-text: #1e40af;

    /* Radius & Spacing */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows (Subtle Enterprise Elevation) */
    --shadow-card: 0 1px 3px 0 rgba(13, 33, 68, 0.04);
    --shadow-popover: 0 4px 12px 0 rgba(13, 33, 68, 0.08);
    --shadow-modal: 0 12px 32px -4px rgba(13, 33, 68, 0.16);

    /* Legacy Aliases (기존 코드 100% 호환 보장) */
    --paper: var(--bg-ground);
    --card: var(--bg-surface);
    --ink: var(--text-main);
    --muted: var(--text-muted);
    --line: var(--border-default);
    --accent: var(--brand-primary);
    --accent-soft: var(--brand-primary-tint);
    --sidebar: var(--brand-navy-900);
    --sidebar-muted: #b0bed6;
    --navy-900: var(--brand-navy-900);
    --navy-700: var(--brand-navy-700);
    --gold: var(--brand-gold);

    color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-ground);
    color: var(--text-main);
    font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button, input, select, textarea { font: inherit; }


.brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: none;
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-org {
    color: var(--sidebar-muted);
    font-size: 11px;
    font-weight: 500;
}

.brand-app {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}


.brand-lockup.is-light { color: var(--navy-900); }

.brand-lockup.is-light .brand-org { color: var(--muted); }

.brand-lockup.is-light .brand-mark { width: 40px; height: 40px; }

.brand-lockup.is-light .brand-app { font-size: 18px; }

h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.03em;
}

h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

.lead, .card p, .who {
    color: var(--muted);
    line-height: 1.5;
}

/* ==========================================================================
   우리들웍스 디자인 시스템 Core Components (v1.0.0)
   ========================================================================== */

/* 카드 (Card) */
.card {
    display: block;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.card p { margin: 0; }

/* 표준 버튼 (Button System) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    box-sizing: border-box;
}
.btn:disabled, .btn.is-disabled {
    background: var(--bg-muted);
    border-color: var(--bg-muted);
    color: var(--text-disabled);
    cursor: not-allowed;
    pointer-events: none;
}

/* 버튼 크기 */
.btn-lg {
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
}
.btn-md {
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
}
.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

/* 버튼 테마 */
.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}
.btn-primary:hover {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-sub);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--text-disabled);
    color: var(--text-main);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--brand-primary-tint);
    color: var(--brand-primary);
}

.btn-danger {
    background: var(--state-danger);
    color: #ffffff;
    border-color: var(--state-danger);
}
.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

/* 배지 / 태그 (Badges & Tags) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}
.badge-primary {
    background: var(--brand-primary-tint);
    color: var(--brand-primary);
}
.badge-success {
    background: var(--state-success-tint);
    color: var(--state-success);
}
.badge-warning {
    background: var(--state-warning-tint);
    color: var(--state-warning);
}
.badge-danger {
    background: var(--state-danger-tint);
    color: var(--state-danger);
}
.badge-info {
    background: var(--state-info-tint);
    color: var(--state-info);
}
.badge-gold {
    background: #fdf9ed;
    color: #996e1e;
    border: 1px solid rgba(214, 178, 94, 0.35);
}

/* 모달 표준 다이얼로그 (design.md §5.3)
 * 마크업: <dialog class="modal"> 또는 .modal-overlay > .modal-dialog 가 안쪽 여백(24px)을 갖고,
 * .modal-head(.modal-header) 아래 여백 + .modal-actions(.modal-footer) 위 구분선으로 구역을 나눈다.
 * 버튼 순서는 [취소(Secondary)] [행동(Primary/Danger)] 우측 정렬. */
.modal-dialog, dialog.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    color: var(--text-main);
}
.modal-header, .modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin-bottom: 16px;
}
.modal-header h3, .modal-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
    letter-spacing: -0.02em;
    color: var(--text-main);
}
.modal-actions, .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* 표준 탭 내비게이션 (Tab Navigation System) */
.tab-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 24px;
}
.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease-in-out;
}
.tab-item:hover {
    color: var(--text-main);
}
.tab-item.is-active {
    color: var(--brand-primary);
    font-weight: 600;
    border-bottom-color: var(--brand-primary);
}
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--state-danger);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.notice-list { margin: 0; padding-left: 1.1rem; }
.notice-list a { color: inherit; }

.finder { display: flex; gap: 8px; align-items: end; margin: 12px 0; }
.finder label { flex: 1; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.finder input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.finder button { padding: 12px 16px; border: 0; border-radius: 10px; background: var(--accent); color: #ffffff; font-weight: 700; }
.person { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.person p { margin: 0; }
.person-actions { display: flex; gap: 10px; align-items: center; }
.person-actions a, .person-actions button { color: var(--accent); font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; }
.dept-children { margin-top: 12px; margin-left: 16px; }

.month-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; }
.month-nav h2 { margin: 0; }
.month-nav a { color: var(--accent); font-weight: 700; }
.agenda { display: grid; gap: 8px; }
.agenda .card p + p { margin-top: 8px; }
.kind { flex: none; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.drive-list { display: grid; gap: 8px; }
.drive-list a.card { color: inherit; text-decoration: none; }
.drive-name { display: flex; gap: 8px; align-items: baseline; font-weight: 700; }
.drive-name .who { min-width: 0; }
.drive .when { margin-left: auto; flex: none; color: var(--muted); font-weight: 400; font-size: 13px; }

.icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 16px;
    background-color: #F5F7FA;
    background: radial-gradient(circle at 50% 12%, #FFFFFF 0%, #F5F7FA 55%, #EBF0F7 100%);
}

.login-card {
    width: min(100%, 420px);
    padding: 32px 28px;
    background: #ffffff;
    border: 1px solid #E2E6EE;
    border-radius: 16px;
    box-shadow: 0 16px 36px -8px rgba(13, 33, 68, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.login-card .login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.login-card h1 {
    margin: 16px 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-900);
    text-align: center;
    letter-spacing: -0.02em;
}

.login-card .lead {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.5;
}

.login-card form { display: grid; gap: 16px; }

.login-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: #334155; }

.login-card label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    user-select: none;
}

.login-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card input:focus {
    outline: none;
    border-color: var(--navy-900);
    box-shadow: 0 0 0 3px rgba(11, 25, 44, 0.1);
}

.login-card .id-field {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-card .id-field:focus-within {
    border-color: var(--navy-900);
    box-shadow: 0 0 0 3px rgba(11, 25, 44, 0.1);
}

.login-card .id-field input {
    border: 0;
    border-radius: 0;
    flex: 1;
    width: auto;
    min-width: 0;
    box-shadow: none !important;
}

.login-card .id-domain {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-left: 1px solid var(--line);
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.login-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: var(--navy-900);
    cursor: pointer;
}

.login-card button[type="submit"] {
    padding: 13px 16px;
    background: var(--navy-900);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
}

.login-card button[type="submit"]:hover {
    background: var(--text-main);
}

.login-card button[type="submit"]:active {
    transform: scale(0.99);
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.error {
    margin: 0;
    color: #9f1239;
    font-size: 14px;
}

/* ───────── 포털 뼈대: 상단 메뉴(GNB) ───────── */
.gnb {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy-900);
    color: #ffffff;
}

.gnb-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 60px;
    padding: 0 32px;
}

.gnb .brand-lockup { flex: none; }
.gnb .brand-mark { width: 30px; height: 30px; }

.gnb-menu {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.gnb-menu::-webkit-scrollbar { display: none; }

.gnb-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    color: var(--sidebar-muted);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
}

.gnb-item .icon { width: 18px; height: 18px; }
.gnb-item:hover { color: #ffffff; }
.gnb-item.is-current { color: #ffffff; font-weight: 700; }

.gnb-item.is-current::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #ffffff;
}

.gnb-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.gnb-action,
.gnb-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sidebar-muted);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.gnb-action:hover,
.gnb-profile:hover,
.gnb-action[aria-expanded="true"],
.gnb-profile[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.gnb-action .icon { width: 20px; height: 20px; }
.gnb-profile { gap: 12px; padding-left: 6px; border-radius: 20px; }

.gnb-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5484d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ───────── 팝오버(메신저·전체 서비스·내 정보) ───────── */
.pop { position: relative; }

.pop-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100;
    display: none;
    width: 300px;
    padding: 16px;
    background: #ffffff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(13, 33, 68, 0.18);
    transform-origin: top right;
    animation: pop-in 0.15s ease-out;
}

.pop-card.is-open { display: block; }

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: none; }
}

.launcher-card { width: 380px; max-height: 80vh; overflow-y: auto; }
.pop-title { margin: 0 0 6px; font-weight: 700; }
.pop-text { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.messenger-card { width: 360px; }
.pop-downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pop-downloads .button { white-space: nowrap; }
#messengerInstall .field-hint { margin: 10px 0 18px; line-height: 1.6; }
.pop-link { display: block; margin-top: 12px; color: var(--accent); font-size: 13px; font-weight: 600; }

.pop-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}

.pop-section-head a { color: var(--accent); font-size: 12px; font-weight: 600; }

.pop-menu {
    display: grid;
    gap: 2px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.pop-menu form { margin: 0; }

.pop-menu a,
.pop-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.pop-menu .icon { width: 17px; height: 17px; }
.pop-menu a:hover, .pop-menu button:hover { background: var(--paper); color: var(--ink); }
.pop-menu .is-danger, .pop-menu .is-danger:hover { color: #dc2626; }
.pop-menu .is-danger:hover { background: #fef2f2; }

/* ───────── 사람 사진·내 정보 ───────── */
.person-avatar {
    display: inline-grid;
    flex: none;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--navy-700);
    color: #ffffff;
    font-weight: 700;
}

.person-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.person-avatar.is-sm { width: 30px; height: 30px; font-size: 13px; }
.person-avatar.is-md { width: 36px; height: 36px; font-size: 14px; }
.person-avatar.is-lg { width: 46px; height: 46px; font-size: 18px; }
.person-avatar.is-xl { width: 72px; height: 72px; font-size: 28px; }

.profile-head { display: flex; align-items: center; gap: 12px; }
.profile-meta { flex: 1; min-width: 0; }
.profile-name { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.profile-email { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-dept { margin-top: 2px; color: #94a3b8; font-size: 11px; }

.profile-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--paper);
    color: var(--muted);
    font-size: 12px;
}

.status-on { color: var(--state-success); font-weight: 700; }
.status-off { color: #94a3b8; font-weight: 600; }

/* ───────── 공통 부품 (Legacy .button & .tag 디자인 시스템 일원화) ───────── */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
}

.button .icon { width: 16px; height: 16px; }
.button:hover {
    background: var(--bg-subtle);
    border-color: var(--text-disabled);
    color: var(--text-main);
}
.button.is-primary {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #ffffff;
    font-weight: 600;
}
.button.is-primary:hover {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    color: #ffffff;
}
.button.is-quiet {
    border-color: transparent;
    background: var(--brand-primary-tint);
    color: var(--brand-primary);
    font-weight: 500;
}
.button.is-quiet:hover {
    background: var(--primary-100, #dce5f5);
}
.button.is-block { display: flex; width: 100%; }
.button:disabled { background: var(--bg-muted); border-color: var(--bg-muted); color: var(--text-disabled); pointer-events: none; cursor: not-allowed; }

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-xs);
    background: var(--brand-primary-tint);
    color: var(--brand-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.tag-success { background: var(--state-success-tint); color: var(--state-success); }
.tag-danger { background: var(--state-danger-tint); color: var(--state-danger); }
.tag-warning { background: var(--state-warning-tint); color: var(--state-warning); }
.tag-muted { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-subtle); }

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toasts {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: min(520px, calc(100% - 32px));
    transform: translateX(-50%);
    pointer-events: none;
}
.flash {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px 10px 16px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    pointer-events: auto;
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.flash .toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.flash [data-toast-text] {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    color: #ffffff;
}
.flash.is-success {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(52, 211, 153, 0.3);
}
.flash.is-error {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(248, 113, 113, 0.35);
}
.flash.is-wait {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(56, 189, 248, 0.3);
}
.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}
.toast-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.empty-note { margin: 0; padding: 10px 0; color: var(--muted); font-size: 13px; }

/* ───────── 본문·위젯 ───────── */
body.portal { min-width: 1280px; }

.portal-main { padding: 28px 32px 64px; }

.page-head { margin-bottom: 20px; }
.page-head .lead { margin: 6px 0 0; }

.widget {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.portal-main > .widget + .widget { margin-top: 16px; }

.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.widget-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: -0.015em; }
.widget-head h2 .icon { width: 18px; height: 18px; color: var(--brand-primary); }
.widget-more { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.widget-more:hover { color: var(--brand-primary); }
.widget-sub { color: var(--text-muted); font-size: 12px; }
.widget-note { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.big-number { margin: 0; color: var(--text-muted); font-size: 14px; }
.big-number strong { margin-right: 4px; color: var(--brand-navy-900); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }

/* ───────── 홈 대시보드 ───────── */
.dash-head { margin-bottom: 20px; }
.dash-head h1 { font-size: 24px; }
.dash-date { margin: 0 0 4px; color: var(--muted); font-size: 13px; }

.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dash-tools { display: flex; gap: 8px; }
.dash-edit-actions { display: none; gap: 8px; }
.is-dash-editing [data-dash-edit] { display: none; }
.is-dash-editing .dash-edit-actions { display: flex; }

.dash { display: grid; grid-template-columns: 300px repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; min-height: 120px; border-radius: 16px; }

.dash-tray { display: none; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border: 1px dashed #b9c6dc; border-radius: 12px; background: #f8fafd; }
.dash-tray-label { color: var(--muted); font-size: 13px; }
.dash-tray-items { display: flex; flex-wrap: wrap; gap: 6px; }
.is-dash-editing .dash-tray { display: flex; }

.dash-widget { position: relative; }
.widget-edit { display: none; }
.is-dash-editing .dash-col { padding: 6px; margin: -6px; outline: 2px dashed #d5deec; outline-offset: -2px; }
.is-dash-editing .dash-widget { cursor: grab; box-shadow: 0 0 0 1px #c7d3e6; }
.is-dash-editing .dash-widget > :not(.widget-edit) { pointer-events: none; }
.is-dash-editing .widget-edit {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(244, 246, 250, 0.72);
    backdrop-filter: blur(1px);
}
.widget-grip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 10px; box-shadow: 0 4px 12px rgba(13, 33, 68, 0.25); border-radius: 999px; background: var(--navy-900); color: #ffffff; font-size: 12px; font-weight: 700; }
.widget-grip .icon { width: 16px; height: 16px; stroke-width: 3; }
.widget-edit button { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #ffffff; color: var(--muted); cursor: pointer; }
.widget-edit button:hover { border-color: #fecaca; color: #dc2626; }
.widget-edit button .icon { width: 14px; height: 14px; }
.dash-widget.is-dragging { opacity: 0.35; }

.profile-widget { align-items: center; gap: 6px; text-align: center; }
.profile-widget-name { margin-top: 6px; font-size: 18px; }
.profile-widget-dept { margin-bottom: 8px; color: var(--muted); font-size: 13px; }

.clock {
    color: var(--brand-navy-900);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    text-align: center;
}

.punch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 12px 0;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.punch div + div { border-left: 1px solid var(--border-default); }
.punch dt { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.punch dd { margin: 4px 0 0; color: var(--text-main); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 실시간으로 다시 그리는 감싸개 안에 있어 .widget의 간격(gap)이 닿지 않으므로 같은 간격을 준다. */
[data-attendance-card] { display: flex; flex-direction: column; gap: 12px; }
.punch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.punch-actions form { display: grid; margin: 0; }

.line-list, .stat-list { display: grid; margin: 0; padding: 0; list-style: none; }
.line-list li + li, .stat-list li + li { border-top: 1px solid var(--border-subtle); }

.line-list a,
.line-list li > span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-main);
}

.line-list a:hover .line-title { color: var(--brand-primary); }
.line-tag {
    flex: none;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    font-size: 11px;
    font-weight: 600;
}
.line-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-list time { flex: none; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.stat-list a, .stat-list li > span { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text-main); }
.stat-list strong { color: var(--brand-primary); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ───────── 서비스 타일·바로가기 ───────── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.service-grid.is-compact { grid-template-columns: repeat(4, 1fr); gap: 4px; }

.service-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px;
    border-radius: 12px;
    color: #374151;
    transition: background 0.15s;
}

.service-tile:hover { background: var(--paper); }

.service-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
}

.service-icon .icon { width: 22px; height: 22px; }
.service-label { font-size: 12px; font-weight: 600; text-align: center; }
.is-compact .service-tile { padding: 10px 4px; }
.is-compact .service-icon { width: 40px; height: 40px; }

.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.quick-links.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-links .empty-note { grid-column: 1 / -1; }

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}

.quick-link:hover { border-color: var(--border-strong); background: var(--paper); }

.quick-link-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--paper);
    color: var(--muted);
    font-size: 16px;
}

.quick-link-icon .icon { width: 16px; height: 16px; }
.quick-link-text { display: grid; min-width: 0; }
.quick-link-name { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.quick-link-category { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.badge.approved { background: #dcfce7; color: #166534; }

.badge.rejected { background: #ffe4e6; color: #9f1239; }

.back { color: var(--accent); font-weight: 700; }

/* 캘린더 고도화 스타일 */
.calendar-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.calendar-side { display: grid; gap: 14px; align-content: start; }
.btn-create-event.is-block { width: 100%; justify-content: center; border-radius: var(--radius-md); padding: 12px 16px; }
.calendar-mini { display: grid; gap: 8px; padding: 14px 12px 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.calendar-mini-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-mini-nav strong { font-size: 15px; }
.mini-pager { display: inline-flex; align-items: center; gap: 2px; }
.mini-pager a { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 700; font-size: 13px; }
.mini-pager a:hover { background: var(--paper); }
.calendar-side-list { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.calendar-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; text-align: center; gap: 2px; font-size: 13px; }
.calendar-mini-grid .mini-dow { padding: 4px 0; color: #64748b; font-size: 12px; font-weight: 700; }
.calendar-mini-grid .mini-dow.is-sun { color: #dc2626; }
.calendar-mini-grid .mini-dow.is-sat { color: #2563eb; }
.calendar-mini-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 34px; min-height: 36px; color: var(--text-main); text-decoration: none; border-radius: 999px; font-weight: 600; }
.calendar-mini-grid a.is-sun { color: #dc2626; }
.calendar-mini-grid a.is-sat { color: #2563eb; }
.calendar-mini-grid a.is-holiday { color: #dc2626; }
.calendar-mini-grid a.is-outside { color: var(--border-strong); }
.calendar-mini-grid a.is-today { background: var(--navy, #1e4fa8); color: #fff; }
.calendar-mini-grid a.is-focus:not(.is-today) { box-shadow: inset 0 0 0 1.5px var(--navy, #1e4fa8); }
.mini-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--navy, #1e4fa8); }
.mini-dot.is-empty { visibility: hidden; }
.calendar-mini-grid a.is-today .mini-dot { background: #fff; }
.calendar-mini-grid a.is-outside .mini-dot { background: var(--border-strong); }
.calendar-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.calendar-side-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.cal-check { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; padding: 6px 8px; border-radius: 8px; }
.cal-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.cal-row:hover, .cal-row:focus-within { background: #eef2ff; }
.cal-row .cal-check { flex: 1; }
.cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-edit { flex: none; color: #64748b; }
.cal-edit .icon { fill: currentColor; stroke: none; }
.cal-loading { display: grid; justify-items: center; gap: 12px; padding: 56px 0; color: var(--muted); }
.cal-loading[hidden] { display: none; }
.cal-loading p { margin: 0; font-weight: 700; }
.cal-spinner { width: 28px; height: 28px; border: 3px solid var(--border-default); border-top-color: var(--navy, #1e4fa8); border-radius: 50%; animation: cal-spin 0.7s linear infinite; }
@keyframes cal-spin { to { transform: rotate(360deg); } }
.cal-empty { margin: 0; color: var(--muted); font-size: 12px; }
.cal-kind, .cal-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cal-owner, .cal-share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-owner { padding: 10px 12px; border-radius: 12px; background: var(--paper, #f4f7fb); }
.cal-share-panel { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.cal-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid transparent; flex: none; }
.cal-check .cal-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; }
.cal-check .cal-dot::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.cal-check.is-off .cal-dot { background: #fff !important; border-color: var(--border-strong); }
.cal-check.is-off .cal-dot::after { display: none; }
#calendarFields { display: flex; flex-direction: column; gap: 20px; }
.calendar-dialog .calendar-side-label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; letter-spacing: -0.2px; }
.cal-scope { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-muted); border: 1px solid var(--border-default); }
.cal-scope label { position: relative; display: flex !important; align-items: center; justify-content: center; min-height: 40px; margin: 0; padding: 8px 12px; border-radius: 8px; color: #64748b; cursor: pointer; font-weight: 700; font-size: 13px; transition: all 0.15s ease; }
.cal-scope input { position: absolute; opacity: 0; pointer-events: none; }
.cal-scope label:hover:not(:has(input:checked)) { color: var(--ink); }
.cal-scope label:has(input:checked) { background: #fff; color: var(--navy, #1e4fa8); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06); }
.calendar-dialog #scopeHelp, .calendar-dialog #primaryHelp { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border-default); color: #64748b; font-size: 12px; line-height: 1.5; font-weight: 500; }
.cal-name-field { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; margin: 0; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-height: 46px; transition: all 0.15s ease; }
.cal-name-field:focus-within { border-color: var(--navy, #1e4fa8); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); }
#calendarNameDot { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15, 23, 42, 0.15); }
.cal-name-field .input { border: 0; padding: 0; box-shadow: none; font-size: 15px; font-weight: 600; color: var(--ink); flex: 1; }
.cal-name-field .input:focus { box-shadow: none; outline: none; }
.cal-swatches { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 8px; margin-top: 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--border-default); border-radius: 12px; justify-items: center; align-items: center; }
.cal-swatch { width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; padding: 0; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cal-swatch:hover { transform: scale(1.25); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25); z-index: 2; }
.cal-swatch[aria-pressed="true"] { transform: scale(1.15); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text-main); z-index: 1; }
.cal-share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-share-head .calendar-side-label { margin-bottom: 0; }
#addCalendarMembers { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #bfdbfe; background: var(--brand-primary-tint); color: var(--navy, #1e4fa8); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
#addCalendarMembers:hover { background: #dce5f5; border-color: #93c5fd; }
[data-cal-members] { display: grid; gap: 8px; max-height: 200px; overflow-y: auto; margin-bottom: 6px; }
.cal-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; background: #ffffff; border-radius: 12px; border: 1px solid var(--border-default); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.cal-member-text { display: grid; min-width: 0; }
.cal-member-text strong { font-size: 14px; color: var(--ink); font-weight: 700; }
.cal-member-text small { color: #64748b; font-size: 12px; font-weight: 500; }
.cal-member select { min-height: 34px; width: 110px; border-radius: 8px; border: 1px solid var(--border-strong); background: #f8fafc; padding: 0 10px; font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.cal-member select:focus { border-color: var(--navy, #1e4fa8); outline: none; background: #fff; }
.cal-member .icon-button { width: 28px; height: 28px; border-radius: 6px; color: #94a3b8; }
.cal-member .icon-button:hover { color: var(--state-danger); background: var(--state-danger-tint); }
.cal-role { grid-column: 3 / 5; justify-self: end; color: #64748b; font-size: 12px; font-weight: 700; background: var(--bg-muted); padding: 4px 10px; border-radius: 6px; }
[data-group-fields] .field-hint { margin-top: 6px; color: #64748b; font-size: 12px; line-height: 1.5; }
.cal-remind-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--border-default); }
.cal-remind-row .calendar-side-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cal-remind-row .field-hint { margin: 0; color: #64748b; font-size: 12px; font-weight: 500; }
.cal-remind-row select { min-height: 40px; width: 140px; flex: none; border-radius: 10px; border: 1px solid var(--border-strong); background: #ffffff; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.cal-remind-row select:focus { border-color: var(--navy, #1e4fa8); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); outline: none; }
.event-form { gap: 16px; }
.event-title { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; padding: 12px 16px; font-size: 18px; font-weight: 700; color: var(--ink); box-sizing: border-box; transition: all 0.2s ease; }
.event-title:focus { outline: none; border-color: var(--navy, #1e4fa8); background: #ffffff; box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); }
.event-title::placeholder { color: #94a3b8; font-weight: 500; }
.event-line { display: flex; align-items: center; gap: 10px; }
.event-line.is-top { align-items: flex-start; }
.event-line .event-icon { display: grid; place-items: center; width: 22px; flex: none; color: #64748b; }
.event-line .event-icon .icon { width: 18px; height: 18px; }
.event-line .event-icon.is-connector { display: flex; align-items: center; justify-content: center; }
.event-line .event-icon.is-connector::before { content: ""; width: 2px; height: 14px; background: var(--border-strong); border-radius: 1px; }
.event-line .cal-dot { margin: 0 4px; }
.event-label { width: 36px; flex: none; color: #64748b; font-size: 14px; font-weight: 700; }
.event-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; min-width: 136px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.event-chip:hover { border-color: var(--border-strong); background: #f8fafc; }
.event-chip:focus-within { border-color: var(--navy, #1e4fa8); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); }
.event-chip-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#startTimeGroup, #endTimeGroup { min-width: 96px; }
.event-aside { margin-left: auto; color: #64748b; font-size: 13px; font-weight: 600; white-space: nowrap; }
#eventDuration { background: var(--bg-muted); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--text-sub); }
.event-line .event-select, .event-line > .input { width: auto; min-width: 160px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 12px; font-size: 14px; color: var(--ink); transition: all 0.15s ease; }
.event-line .event-select:focus, .event-line > .input:focus, .event-line textarea:focus { border-color: var(--navy, #1e4fa8); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); outline: none; }
.event-line > .input[name="location"], .event-line textarea { flex: 1; min-width: 0; }
.event-line textarea.input { min-height: 84px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.event-stack { display: grid; gap: 8px; flex: 1; }
.event-chip-select { gap: 8px; min-width: 120px; padding-right: 4px; }
.event-chip-select select { width: auto; min-width: 72px; border: 0; background: transparent; box-shadow: none; padding-left: 0; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.event-chip-select select:focus { outline: none; box-shadow: none; }
.event-busy-dot { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; flex: none; }
.event-busy-dot.is-free { background: #94a3b8; }
.event-add { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; background: #f8fafc; color: var(--navy, #1e4fa8); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
.event-add:hover { background: var(--brand-primary-tint); border-color: #93c5fd; }
.event-meet { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #334155; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.15s ease; }
.event-meet:hover { border-color: var(--border-strong); background: #f8fafc; }
.event-meet.is-on { border-color: #93c5fd; background: var(--brand-primary-tint); color: var(--navy, #1e4fa8); }
.remind-chip { border: 0; border-radius: 999px; padding: 6px 10px; background: #e8eefc; color: #334155; font-weight: 700; font-size: 13px; cursor: pointer; }
.remind-chip[aria-pressed="false"] { background: var(--bg-muted); color: #94a3b8; }
.calendar-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.calendar-dialog { width: 640px; }
.event-detail { width: min(520px, calc(100vw - 48px)); }
.event-detail .modal-head { align-items: center; margin-bottom: 0; }
.event-detail .badge { margin: 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: -0.2px; background: #eef2ff; color: #3730a3; border: 1px solid #e0e7ff; }
.event-detail .badge:empty { display: none; }
.event-detail .badge.approved { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.event-detail h2 { margin: 10px 0 0; font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--ink); word-break: break-word; }
.event-detail-when { margin: 8px 0 0; color: var(--text-sub); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.event-detail-rows { display: grid; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.event-detail-row { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 14px; }
.event-detail-row .event-icon { display: grid; place-items: center; width: 22px; flex: none; color: #64748b; }
.event-detail-row .event-icon .icon { width: 18px; height: 18px; }
.event-detail-muted { color: #94a3b8; font-size: 13px; font-weight: 600; }
.event-detail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.event-detail-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--bg-muted); border: 1px solid var(--border-default); color: #334155; font-size: 12px; font-weight: 600; }
#detailDescRow { align-items: flex-start; }
#detailDescRow .event-icon { margin-top: 2px; }
#detailDescription { white-space: pre-wrap; flex: 1; min-width: 0; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--border-default); border-radius: 10px; font-size: 13px; line-height: 1.6; color: #334155; max-height: 200px; overflow-y: auto; }
#detailDocRow { padding-top: 4px; }
#detailDocRow .back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; background: var(--bg-muted); color: var(--navy, #1e4fa8); font-size: 13px; font-weight: 700; text-decoration: none; transition: background 0.15s ease; }
#detailDocRow .back:hover { background: var(--border-default); }
#detailMeetRow .event-meet { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 8px; background: var(--navy, #1e4fa8); color: #ffffff; border: 0; text-decoration: none; font-weight: 700; box-shadow: 0 1px 2px rgba(30, 79, 168, 0.2); transition: background 0.15s ease; }
#detailMeetRow .event-meet:hover { background: #173e86; }
#detailMeetCopy { border: 1px solid var(--line); background: #fff; border-radius: 8px; }
#detailMeetCopy:hover { background: var(--bg-muted); }
.event-detail-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.event-detail-actions form { margin: 0; }
.event-detail-end { display: flex; gap: 8px; margin-left: auto; }
.event-detail-actions .btn-cal-nav, .modal-actions .btn-cal-nav { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: #ffffff; color: var(--text-sub); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.event-detail-actions .btn-cal-nav:hover, .modal-actions .btn-cal-nav:hover { background: #f8fafc; border-color: var(--border-strong); color: var(--ink); }
.event-detail-actions .btn-create-event, .modal-actions .btn-create-event { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 0; background: var(--brand-primary); color: #ffffff; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.event-detail-actions .btn-create-event:hover, .modal-actions .btn-create-event:hover { background: var(--brand-primary-hover); }
.event-detail-actions .btn-cal-nav.is-danger { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 1px solid #fecaca; background: #fef2f2; color: #dc2626; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.event-detail-actions .btn-cal-nav.is-danger:hover { background: var(--state-danger-tint); border-color: #fca5a5; color: #b91c1c; }
.event-detail-actions .btn-cal-nav.is-danger .icon { width: 16px; height: 16px; }
#eventCalLocked strong { font-size: 15px; }
.modal-form label.check { flex-direction: row; align-items: center; color: var(--ink); }
.cal-person { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--bg-muted); font-size: 13px; }
.cal-share-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 6px 0; }
.people-picker { width: min(980px, calc(100vw - 48px)); }
.people-search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.people-search .icon { width: 18px; height: 18px; color: var(--muted); }
.people-search .input { flex: 1; border: 0; background: transparent; box-shadow: none; }
.people-picker-body { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 12px; margin-top: 12px; }
.people-col { border: 1px solid var(--line); border-radius: 12px; min-height: 360px; max-height: 460px; overflow: auto; }
.people-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); }
.people-col-title { font-weight: 700; }
.people-all { gap: 8px; color: var(--ink); font-weight: 700; }
.people-count { color: var(--navy, #1e4fa8); font-weight: 700; }
.people-clear { border: 0; background: none; padding: 0; color: #64748b; font-weight: 700; cursor: pointer; }
.people-tree { padding: 6px; }
.people-tree .org-node { padding-left: 8px; }
.people-tree .people-depth-2 { padding-left: 24px; }
.people-tree .people-depth-3 { padding-left: 40px; }
.people-tree .people-depth-4 { padding-left: 56px; }
.people-tree .people-depth-5 { padding-left: 72px; }
.people-tree .people-depth-6 { padding-left: 88px; }
.people-tree .org-node[aria-current="true"] { background: #eef3fb; color: var(--navy, #1e4fa8); font-weight: 700; }
.people-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; }
.people-row > .icon-button { margin-left: auto; }
.people-body { display: grid; min-width: 0; gap: 1px; }
.people-main { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.people-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.people-rank { color: #64748b; font-size: 13px; font-weight: 600; white-space: nowrap; }
.people-path { overflow: hidden; color: #94a3b8; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.people-picker input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--navy, #1e4fa8); }
.people-picker .modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    background: transparent;
}
.people-picker .modal-actions .btn {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
}
.people-tint-0 { background: #DCE5F5; color: #1E4FA8; }
.people-tint-1 { background: #dcfce7; color: #15803d; }
.people-tint-2 { background: #ffedd5; color: #c2410c; }
.people-tint-3 { background: #f3e8ff; color: #7e22ce; }
.people-tint-4 { background: #fce7f3; color: #be185d; }
.people-tint-5 { background: #e0f2fe; color: #0369a1; }
.calendar-team { width: 640px; }
.btn-cal-nav.is-danger { color: #dc2626; }
.calendar-list:not(.is-open) { display: none; }
.calendar-grid-card.is-closed { display: none; }
.calendar-day-cell, .calendar-span-day { cursor: pointer; }
.cal-color-1 { --cal: #ac725e; background: #ac725e; }
.cal-color-2 { --cal: #d06b64; background: #d06b64; }
.cal-color-3 { --cal: #f83a22; background: #f83a22; }
.cal-color-4 { --cal: #fa573c; background: #fa573c; }
.cal-color-5 { --cal: #ff7537; background: #ff7537; }
.cal-color-6 { --cal: #ffad46; background: #ffad46; }
.cal-color-7 { --cal: #42d692; background: #42d692; }
.cal-color-8 { --cal: #16a765; background: #16a765; }
.cal-color-9 { --cal: #7bd148; background: #7bd148; }
.cal-color-10 { --cal: #b3dc6c; background: #b3dc6c; }
.cal-color-11 { --cal: #fbe983; background: #fbe983; }
.cal-color-12 { --cal: #fad165; background: #fad165; }
.cal-color-13 { --cal: #92e1c0; background: #92e1c0; }
.cal-color-14 { --cal: #9fe1e7; background: #9fe1e7; }
.cal-color-15 { --cal: #9fc6e7; background: #9fc6e7; }
.cal-color-16 { --cal: #4986e7; background: #4986e7; }
.cal-color-17 { --cal: #9a9cff; background: #9a9cff; }
.cal-color-18 { --cal: #b99aff; background: #b99aff; }
.cal-color-19 { --cal: #c2c2c2; background: #c2c2c2; }
.cal-color-20 { --cal: #cabdbf; background: #cabdbf; }
.cal-color-21 { --cal: #cca6ac; background: #cca6ac; }
.cal-color-22 { --cal: #f691b2; background: #f691b2; }
.cal-color-23 { --cal: #cd74e6; background: #cd74e6; }
.cal-color-24 { --cal: #a47ae2; background: #a47ae2; }
.remind-list { display: grid; gap: 8px; }
.remind-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.remind-row select { width: 140px; }
.repeat-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; padding: 4px; border-radius: 12px; background: var(--bg-muted); }
.repeat-units button { border: 0; border-radius: 8px; padding: 9px 4px; background: transparent; color: #64748b; font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.15s ease; }
.repeat-units button.is-on { background: #fff; color: var(--navy, #1e4fa8); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.repeat-every { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.repeat-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.repeat-stepper button { width: 38px; height: 40px; border: 0; background: #f8fafc; color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.repeat-stepper button:hover { background: var(--bg-muted); }
.repeat-stepper input { width: 52px; height: 40px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; padding: 0; text-align: center; font-weight: 700; font-size: 15px; color: var(--ink); }
.repeat-days { display: flex; gap: 8px; margin-top: 8px; }
.repeat-days button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #64748b; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.15s ease; }
.repeat-days button:hover { background: #f8fafc; border-color: var(--border-strong); }
.repeat-days button[aria-pressed="true"] { border-color: var(--navy, #1e4fa8); background: var(--brand-primary-tint); color: var(--navy, #1e4fa8); font-weight: 700; }
.repeat-end, #repeatMonthBy { display: grid; gap: 8px; }
.modal-form label.repeat-option { flex-direction: row; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: #f8fafc; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: all 0.15s ease; }
.modal-form label.repeat-option:hover { background: var(--bg-muted); }
.modal-form label.repeat-option:has(input:checked) { background: var(--brand-primary-tint); border-color: #bfdbfe; color: var(--navy, #1e4fa8); }
.modal-form label.repeat-option input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--navy, #1e4fa8); }
.modal-form label.repeat-option input[type="number"] { width: 56px; padding: 6px 8px; text-align: center; border: 1px solid var(--line); border-radius: 8px; }
.repeat-date-face { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; background: #e8eef5; color: var(--text-sub); font-weight: 700; font-size: 13px; }
.repeat-date-face input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.repeat-summary { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--brand-primary-tint); border: 1px solid #dce5f5; color: var(--navy, #1e4fa8); }
.repeat-summary .icon { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.repeat-summary strong { display: block; font-size: 14px; font-weight: 700; color: #1e3a8a; }
.repeat-summary p { margin: 4px 0 0; color: var(--text-sub); font-size: 13px; font-weight: 500; }
.dot-leave { background: #16a765; }
.dot-booking { background: #4986e7; }
.calendar-view-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 0; }

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.calendar-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-nav-group h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    min-width: 220px;
    text-align: center;
    white-space: nowrap;
}

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

.btn-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-cal-nav:hover { background: var(--paper); }
.btn-cal-today { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.calendar-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.calendar-filters a.filter-chip { text-decoration: none; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    transition: all 0.15s;
}
.filter-chip input { display: none; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-google { background: #6366f1; }
.dot-leave { background: var(--state-success); }
.dot-booking { background: #0ea5e9; }

.btn-create-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-create-event:hover { background: var(--brand-primary-hover); }

.calendar-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    padding: 0 4px;
}

.calendar-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
}
.calendar-status-badge.unlinked {
    background: #fef2f2;
    color: #991b1b;
}

/* 그리드 달력 */
.calendar-grid-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.calendar-weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
}

.calendar-weekday-title {
    padding: 10px 0;
}
.calendar-weekday-title.sunday { color: #dc2626; }
.calendar-weekday-title.saturday { color: #2563eb; }

.calendar-weeks-body {
    display: flex;
    flex-direction: column;
}

.calendar-week-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--line);
}
.calendar-week-row:last-child { border-bottom: 0; }

.calendar-day-cell {
    min-height: 110px;
    padding: 6px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    transition: background 0.1s;
}
.calendar-day-cell:last-child { border-right: 0; }
.calendar-day-cell.outside-month {
    background: #f8fafc;
    opacity: 0.55;
}
.calendar-day-cell:hover { background: #f8fafc; }

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.day-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.sunday .day-number, .calendar-day-cell.sunday .day-number { color: #dc2626; }
.saturday .day-number, .calendar-day-cell.saturday .day-number { color: #2563eb; }

.calendar-day-cell.is-today .day-number {
    background: var(--accent);
    color: #fff !important;
    font-weight: 700;
}

.calendar-events-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.event-pill {
    display: block;
    width: 100%;
    text-align: left;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s, filter 0.08s;
}
.event-pill:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.event-pill.pill-google {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}
.event-pill.pill-google[class*="cal-color-"] {
    background: color-mix(in srgb, var(--cal) 22%, #fff);
    color: color-mix(in srgb, var(--cal) 78%, var(--text-main));
    border-color: color-mix(in srgb, var(--cal) 42%, #fff);
}
.event-pill.pill-leave {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}
.week-spans {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}
.span-lane { display: grid; grid-template-columns: repeat(7, 1fr); height: 20px; }
.week-spans .event-pill { height: 20px; margin: 0 2px; padding-top: 2px; padding-bottom: 2px; pointer-events: auto; }
.event-pill.is-span.continues-before { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.event-pill.is-span.continues-after { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.span-start-0 { grid-column-start: 1; }
.span-start-1 { grid-column-start: 2; }
.span-start-2 { grid-column-start: 3; }
.span-start-3 { grid-column-start: 4; }
.span-start-4 { grid-column-start: 5; }
.span-start-5 { grid-column-start: 6; }
.span-start-6 { grid-column-start: 7; }
.span-len-1 { grid-column-end: span 1; }
.span-len-2 { grid-column-end: span 2; }
.span-len-3 { grid-column-end: span 3; }
.span-len-4 { grid-column-end: span 4; }
.span-len-5 { grid-column-end: span 5; }
.span-len-6 { grid-column-end: span 6; }
.span-len-7 { grid-column-end: span 7; }
.calendar-week-row.lanes-1 .calendar-events-container { margin-top: 23px; }
.calendar-week-row.lanes-2 .calendar-events-container { margin-top: 46px; }
.calendar-week-row.lanes-3 .calendar-events-container { margin-top: 69px; }
.calendar-week-row.lanes-4 .calendar-events-container { margin-top: 92px; }
.calendar-week-row.lanes-5 .calendar-events-container { margin-top: 115px; }
.calendar-week-row.lanes-6 .calendar-events-container { margin-top: 138px; }
.calendar-week-row.lanes-7 .calendar-events-container { margin-top: 161px; }
.calendar-week-row.lanes-8 .calendar-events-container { margin-top: 184px; }

.event-pill.pill-booking {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* 캘린더 할 일(구글 할 일): 달력 칸의 체크 + 사이드바 목록 */
.event-pill.pill-task { display: flex; align-items: center; gap: 5px; padding: 2px 6px 2px 4px; background: #fff; color: #1e3a8a; border-color: #c7d2fe; cursor: default; }
.event-pill.pill-task:hover { transform: none; filter: none; background: #eef2ff; }
.task-pill-title { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.event-pill.pill-task.is-done { color: #94a3b8; border-color: #e2e8f0; }
.event-pill.pill-task.is-done .task-pill-title { text-decoration: line-through; }
.task-check { flex: none; width: 14px; height: 14px; padding: 0; border: 1.5px solid #4f6bed; border-radius: 50%; background: #fff; cursor: pointer; display: inline-grid; place-items: center; transition: background 0.12s, border-color 0.12s; }
.task-check:hover { background: #e0e7ff; }
.task-check::after { content: ""; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.task-check[aria-pressed="true"] { background: #4f6bed; border-color: #4f6bed; }
.task-check[aria-pressed="true"]::after { opacity: 1; }
.dot-task { background: #4f6bed; }

.task-panel { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.task-count { margin-left: 2px; color: var(--navy, #1e4fa8); }
.task-add { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px dashed var(--border-strong); border-radius: 8px; background: #fff; }
.task-add:focus-within { border-style: solid; border-color: var(--navy, #1e4fa8); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.1); }
.task-add[hidden] { display: none; }
.task-add-plus { color: var(--navy, #1e4fa8); font-weight: 700; }
.task-add-title { flex: 1; min-width: 0; border: 0; outline: none; padding: 4px 0; font: inherit; font-size: 13px; background: transparent; }
.task-add-due { flex: none; width: 112px; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--navy, #1e4fa8); background: transparent; cursor: pointer; }
.task-add-due.is-empty:not(:focus) { width: 20px; color: var(--muted); }
.task-add-due.is-empty:not(:focus)::-webkit-datetime-edit { display: none; }
.task-message { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12px; line-height: 1.5; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; max-height: 260px; overflow-y: auto; }
.task-item { display: flex; align-items: flex-start; gap: 8px; padding: 5px 6px; border-radius: 8px; }
.task-item:hover { background: #eef2ff; }
.task-item .task-check { width: 16px; height: 16px; margin-top: 1px; }
.task-item .task-check::after { width: 7px; height: 3.5px; }
.task-item-body { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.task-item-title { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.task-item.is-done .task-item-title { color: #94a3b8; text-decoration: line-through; }
.task-due { font-size: 11px; color: var(--muted); }
.task-due.is-today { color: var(--navy, #1e4fa8); font-weight: 700; }
.task-due.is-overdue { color: #dc2626; font-weight: 700; }
.task-empty { padding: 6px; color: var(--muted); font-size: 12px; }
.task-done-box summary { cursor: pointer; padding: 4px 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.task-done-box[hidden] { display: none; }
.task-clear-due { flex: none; min-height: 34px; padding: 0 10px; font-size: 12px; }
.task-google-note { margin: 0; color: var(--muted); font-size: 12px; }
.task-actions { align-items: center; }
.task-actions-gap { flex: 1; }

/* 모달 오버레이 (소프트 블러 일원화) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 33, 68, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.modal-overlay[hidden] { display: none !important; }

.modal-dialog {
    max-width: 480px;
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}
.modal-dialog > .modal-header { margin-bottom: 0; }

.modal-close-btn {
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
    padding: 4px 8px;
    line-height: 1;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    color: var(--ink);
}

.modal-info-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 12px;
    line-height: 1.5;
}
.modal-info-label { color: var(--muted); font-weight: 600; }
.modal-info-val { color: var(--ink); word-break: break-all; }

.btn-meet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #1a73e8;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    margin-top: 6px;
}
.btn-meet-link:hover { background: #1557b0; }


.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.modal-form label.cal-kind-option,
.modal-form label.cal-type-card {
    position: relative;
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}
.modal-form label.cal-kind-option:has(input:checked),
.modal-form label.cal-type-card:has(input:checked) {
    border-color: var(--navy, #1e4fa8);
    background: #eef3fb;
}
.modal-form label.cal-kind-option input,
.modal-form label.cal-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.modal-form label.cal-kind-option small,
.modal-form label.cal-type-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form input[type="time"],
.modal-form textarea {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
}
.modal-form .event-title {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.modal-form .event-title:focus {
    outline: none;
    border-color: var(--navy, #1e4fa8);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12);
}
.modal-form .cal-scope label { flex-direction: row; }
.modal-form .event-chip-input { border: 0; padding: 0; }
.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.view-mode-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.view-mode-toggle button,
.view-mode-toggle a {
    border: 0;
    background: #fff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
}
.view-mode-toggle button.active,
.view-mode-toggle a.active {
    background: var(--ink);
    color: #fff;
}

.calendar-span {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #fff;
}
.calendar-span.is-day { grid-template-columns: 1fr; }
.calendar-span-day {
    min-height: 420px;
    padding: 10px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.calendar-span.is-day .calendar-span-day { min-height: 480px; }
.calendar-span-day:last-child { border-right: 0; }
.calendar-span-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.calendar-span-head .calendar-weekday-title { padding: 0; }
.calendar-span-empty {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}
a.day-number { text-decoration: none; }

/* 드라이브 고도화 스타일 */
.drive-wrap { position: relative; display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }

.drive-drop {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--accent);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
}
.drive-drop p { margin: 0; }

.drive-spaces-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 2px;
    overflow-x: auto;
}

.drive-google-status {
    margin-left: auto;
    flex: none;
    margin-bottom: 4px;
}

.drive-space-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.drive-space-tab:hover { color: var(--ink); background: rgba(0, 0, 0, 0.03); }
.drive-space-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    margin-bottom: -2px;
}
.drive-space-tab .icon,
.btn-drive-action .icon,
.dropdown-item .icon { width: 16px; height: 16px; }

.drive-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.drive-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}
.drive-search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
    background: #fff;
}
.drive-search-box button {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
}

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

.btn-drive-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    transition: all 0.15s;
}
.btn-drive-action:hover { background: var(--paper); }
.btn-drive-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-drive-primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); }
.btn-drive-danger {
    background: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}
.btn-drive-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.drive-trash-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
}
.drive-trash-banner svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

/* 브레드크럼 & 필터 칩 */
.drive-subbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.drive-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--muted);
    flex-wrap: wrap;
}
.drive-breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
}
.drive-breadcrumbs a:hover { text-decoration: underline; }
.drive-breadcrumbs span.sep { color: var(--line); }
.drive-breadcrumbs span.current { color: var(--ink); font-weight: 700; }

.drive-type-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.drive-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    text-decoration: none;
}
.drive-chip:hover { background: var(--paper); }
.drive-chip.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* 파일 테이블 */
.drive-table-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.drive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.drive-table th {
    padding: 12px 16px;
    background: var(--paper);
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

.drive-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.drive-table tr:last-child td { border-bottom: 0; }
.drive-table tbody tr:hover td { background: #f5f8fc; }

.drive-file-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    display: inline-flex;
    flex: none;
    color: var(--muted);
}
.file-icon .icon { width: 20px; height: 20px; }
.file-icon.kind-folder { color: #d97706; }
.file-icon.kind-document { color: #3730a3; }
.file-icon.kind-spreadsheet { color: #166534; }
.file-icon.kind-presentation { color: #c2410c; }
.file-icon.kind-pdf { color: #991b1b; }

.drive-col-check { width: 36px; }
.drive-col-name { width: 50%; }
.drive-list-tools { display: grid; min-height: 30px; align-items: center; }
.drive-list-tools > .drive-type-chips,
.drive-list-tools > .drive-bulk { grid-area: 1 / 1; }
.drive-subbar:has(.drive-bulk:not([hidden])) .drive-type-chips { visibility: hidden; }
.drive-bulk { display: flex; align-items: center; gap: 6px; }
tr[data-pending] input { pointer-events: none; }
.drive-roster { display: grid; grid-template-columns: 180px 1fr; gap: 12px; min-height: 220px; }
.drive-roster-list { display: grid; align-content: start; gap: 4px; max-height: 280px; overflow: auto; }
.drive-roster-list button { text-align: left; }
.drive-roster-list button[data-depth="1"] { padding-left: 16px; }
.drive-roster-list button[data-depth="2"] { padding-left: 28px; }
.drive-roster-list button[data-depth="3"] { padding-left: 40px; }
.drive-roster-list button[data-depth="4"] { padding-left: 52px; }
.drive-roster-list button[data-depth="5"] { padding-left: 64px; }
.drive-roster-list button[data-depth="6"] { padding-left: 76px; }
.drive-person { display: flex; align-items: center; gap: 8px; }
.drive-col-size { width: 15%; }
.drive-col-when { width: 20%; }
.drive-col-actions { width: 220px; text-align: right; }
.drive-meta { color: var(--muted); font-size: 13px; }
.drive-delete-form { margin: 0; }
.drive-search-reset { padding: 7px 10px; }

.file-title-wrap {
    min-width: 0;
    flex: 1;
}

.file-name-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    word-break: break-all;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.12s ease-in-out;
}
.file-name-link.is-folder {
    font-weight: 600;
}
.file-name-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.file-kind-badge {
    display: none !important;
}

.file-actions-cell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.btn-file-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s;
}
.btn-file-icon-action:hover {
    color: var(--ink);
    background: var(--paper);
}
.btn-file-icon-action .icon { width: 14px; height: 14px; }
.btn-file-icon-action.is-danger { color: #dc2626; }
.btn-file-icon-action.is-danger:hover { color: #b91c1c; }
.btn-file-icon-action.is-on { color: #d6b25e; border-color: #ead7a4; }
.btn-file-icon-action.is-on .icon { fill: currentColor; }
tr[data-pending] .file-name-link,
tr[data-pending] .file-actions-cell { pointer-events: none; }
tr[data-pending] { opacity: 0.72; }
.drive-menu, .drive-dialog { display: none; width: 400px; gap: 14px; }
.drive-dialog.drive-team { width: 640px; }
.drive-access { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.drive-menu[open], .drive-dialog[open] { display: grid; }
.drive-menu-meta { margin: 0; color: var(--muted); font-size: 13px; }
.drive-menu-list { display: grid; }
.drive-menu-list a,
.drive-menu-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.drive-menu-list a:hover,
.drive-menu-list button:hover { background: var(--paper); }
.drive-menu-list .icon { width: 18px; height: 18px; }
.drive-menu-list .is-danger { color: #b91c1c; }
.drive-dialog-form { display: grid; gap: 12px; }
.drive-dialog-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }

/* 드롭다운 메뉴 */
.dropdown-wrap { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    min-width: 170px;
    padding: 6px 0;
    z-index: 100;
}
.dropdown-menu[hidden] { display: none !important; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}
.dropdown-item:hover { background: var(--paper); }
.dropdown-rule { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }

.upload-file-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge-direct-upload { font-size: 11px; background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.upload-file-input { padding: 12px; border: 2px dashed var(--line); border-radius: 8px; background: var(--paper); width: 100%; }
.upload-progress { margin-top: 14px; }
.upload-progress-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.upload-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.upload-percent { font-weight: 700; color: var(--accent); }
.upload-track { width: 100%; height: 8px; background: var(--border-default); border-radius: 4px; overflow: hidden; }
.upload-progress-bar { height: 100%; background: var(--accent); width: var(--upload-progress, 0%); transition: width .15s ease; }
.upload-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.upload-error { color: #dc2626; font-size: 13px; }




.page-stack { display: flex; flex-direction: column; gap: 20px; }

/* ───────── 공통 입력 부품 (디자인 시스템 v1.0.0 표준) ───────── */
.input {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.input::placeholder { color: var(--text-disabled); }
.input:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.15);
}
.input:disabled {
    background: var(--bg-subtle);
    color: var(--text-disabled);
    cursor: not-allowed;
    border-color: var(--border-default);
}
textarea.input {
    min-height: 80px;
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
}
.input.is-medium { max-width: 380px; }

.search-field { position: relative; display: block; }
.search-field .icon { position: absolute; top: 50%; left: 10px; width: 16px; height: 16px; color: var(--text-disabled); transform: translateY(-50%); pointer-events: none; }
.search-field .input { padding-left: 34px; }
.search-field.is-sm .input { min-height: 32px; padding-top: 0; padding-bottom: 0; font-size: 13px; }

.search-form { display: flex; align-items: center; gap: 6px; }
.search-form .search-field { width: 240px; }

.field { display: grid; gap: 6px; }
.field > label, .field-label { color: var(--text-main); font-size: 13px; font-weight: 600; }
.field .req { color: var(--state-danger); }
.field-hint { margin: 0; color: var(--text-muted); font-size: 12px; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; }
.field-row > .field { flex: 1; min-width: 240px; }
.field-row > .field.is-narrow { flex: 0 0 170px; min-width: 0; }

.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-main); font-size: 13px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-primary); }

.form-stack { display: grid; gap: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-actions .button { min-height: 40px; padding: 0 20px; font-size: 14px; }

.error-box { margin: 0; padding: 12px 16px 12px 34px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; }

.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.chip:hover { border-color: var(--border-strong); color: var(--ink); }
.chip.is-current { border-color: var(--navy-900); background: var(--navy-900); color: #ffffff; }

.empty-state { display: grid; justify-items: center; gap: 6px; padding: 56px 20px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 40px; height: 40px; margin-bottom: 6px; color: var(--border-strong); stroke-width: 1.4; }
.empty-state strong { color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0; font-size: 13px; }

.panel { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.panel.is-padded { padding: 28px; }

.tag-required { background: var(--state-danger-tint); color: #b91c1c; }
.tag-prefix { background: var(--accent-soft); color: var(--accent); }
.tag-new { min-width: 16px; padding: 0 4px; justify-content: center; background: #e5484d; color: #ffffff; font-size: 11px; }
/* 새 글 표시: 빨간 N 상자 대신 제목 옆 작은 점 */
.post-new-dot { display: inline-block; flex: none; width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: #f04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, .14); vertical-align: middle; }

/* ───────── 게시판 ───────── */
:is(.board-workspace-container, .split-page) {
    display: flex;
    min-height: calc(100vh - 148px);
    overflow: hidden;
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 14px;
}

:is(.board-sidebar, .split-side) {
    display: flex;
    flex: 0 0 248px;
    flex-direction: column;
    gap: 16px;
    padding: 16px 12px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-default);
}

.board-hub {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.board-hub a { display: grid; gap: 1px; padding: 6px 2px; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 11px; }
.board-hub strong { color: var(--text-main); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.board-hub .icon { width: 16px; height: 16px; margin: 1px auto; color: var(--state-warning); }
.board-hub a:hover { color: var(--text-main); background: rgba(0, 0, 0, 0.02); }
.board-hub a.is-current { background: var(--bg-surface); box-shadow: var(--shadow-card); color: var(--brand-primary); font-weight: 600; }
.board-hub .is-alert strong { color: var(--state-danger); }

.board-nav { flex: 1; overflow-y: auto; }
:is(.board-nav-title, .side-title) { margin: 0 0 6px; padding: 0 6px; color: var(--text-muted); font-size: 11px; font-weight: 600; }
:is(.board-nav-title, .side-title).is-starred { color: #b45309; }
.board-nav-group + .board-nav-group { margin-top: 14px; }
:is(.board-nav-list, .side-list) { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.board-nav details > ul { padding: 2px 0 6px 12px; }

.board-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.board-nav summary::-webkit-details-marker { display: none; }
.board-nav summary .icon { width: 12px; height: 12px; transition: transform 0.15s; }
.board-nav details:not([open]) summary .icon { transform: rotate(-90deg); }
.board-nav summary span { display: inline-flex; align-items: center; gap: 4px; }

:is(.board-nav-link, .side-link) {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    color: var(--text-sub);
    font-size: 13px;
    transition: background 0.12s, color 0.12s;
}

:is(.board-nav-link, .side-link):hover { background: var(--bg-subtle); color: var(--text-main); }
:is(.board-nav-link, .side-link).is-current { background: var(--brand-primary-tint); color: var(--brand-primary); font-weight: 600; }
}

:is(.board-nav-link, .side-link):hover { background: var(--paper); }
:is(.board-nav-link, .side-link).is-current { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
:is(.board-nav-link, .side-link) .icon { flex: none; width: 15px; height: 15px; color: #94a3b8; }
:is(.board-nav-link, .side-link).is-current .icon { color: var(--accent); }
:is(.board-nav-link, .side-link) .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.board-nav-link, .side-link) .lock { width: 12px; height: 12px; }
.count-pill { padding: 1px 6px; border-radius: 999px; background: var(--bg-muted); color: var(--muted); font-size: 11px; font-weight: 600; }

:is(.board-main, .split-main) { display: flex; flex: 1; flex-direction: column; gap: 16px; min-width: 0; padding: 24px 28px; }

:is(.board-head, .split-head) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

:is(.board-head, .split-head) h1 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 700; }
:is(.board-head, .split-head) h1 .icon { width: 22px; height: 22px; color: var(--accent); }
:is(.board-head, .split-head) p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.board-head-actions { display: flex; align-items: center; gap: 8px; }

.star-toggle { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--border-strong); font-size: 20px; line-height: 1; cursor: pointer; }
.star-toggle .icon { width: 20px; height: 20px; }
.star-toggle:hover { background: var(--paper); }
.star-toggle.is-on { color: var(--brand-gold); }
.star-toggle.is-on .icon { fill: currentColor; }
.star-toggle form, :is(.board-head, .split-head) form { margin: 0; }

.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.board-toolbar .search-field { width: 220px; }

.board-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.board-table th { height: 38px; padding: 0 16px; border-bottom: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-muted); font-size: 13px; font-weight: 600; vertical-align: middle; }
.board-table td { height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-sub); vertical-align: middle; }
.board-table tr:last-child td { border-bottom: 0; }
.board-table tbody tr { transition: background 0.12s ease-in-out; }
.board-table tbody tr:hover { background: var(--bg-subtle); }
.board-table tr.is-required { background: #fffcf7; }
.board-table tr.is-required:hover { background: #fef7ed; }
.board-table tr.is-selected { background: var(--brand-primary-tint); }
.board-table tr.is-selected .post-title { color: var(--brand-primary); font-weight: 600; }
.board-table .col-board { width: 140px; }
.board-table .col-author { width: 120px; color: var(--text-main); font-weight: 500; }
.board-table .col-date { width: 110px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-muted); }
.board-table .col-views { width: 64px; text-align: center; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.post-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.post-line .icon { flex: none; width: 14px; height: 14px; color: var(--text-disabled); }
.post-line .pin { color: var(--brand-primary); }
.post-title { min-width: 0; overflow: hidden; color: var(--text-main); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.post-title:hover { color: var(--brand-primary); }
.is-unread .post-title { font-weight: 700; }
.post-excerpt { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: var(--text-muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.post-comments { flex: none; color: var(--brand-primary); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-name-tag { display: inline-block; max-width: 120px; overflow: hidden; padding: 2px 7px; border-radius: var(--radius-xs); background: var(--bg-subtle); border: 1px solid var(--border-subtle); color: var(--text-sub); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-card { display: flex; flex-direction: column; overflow: hidden; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; transition: transform 0.15s, box-shadow 0.15s; }
.album-card:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.album-thumb { position: relative; display: grid; place-items: center; height: 140px; overflow: hidden; background: linear-gradient(135deg, #eef2f8, var(--border-default)); color: #94a3b8; }
.album-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-thumb .icon { width: 36px; height: 36px; stroke-width: 1.4; }
.album-thumb .tag { position: absolute; top: 8px; left: 8px; z-index: 1; }
.album-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px; }
.album-body h3 { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.album-meta { display: flex; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--bg-muted); color: var(--muted); font-size: 11px; }
.album-grid .empty-state { grid-column: 1 / -1; }

.board-preview-split { display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.board-preview-pane { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1100px) {
    .board-preview-split { grid-template-columns: 1fr; }
}

/* ───────── 그룹 워크스페이스 ───────── */
.group-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.group-kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 16px; align-items: start; }
.group-workspace > .split-main > .group-kanban { padding: 0; }
.group-kanban-col { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.group-kanban-col > .panel-head { padding: 4px 4px 10px; }
.group-kanban-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.group-kanban-cards { display: grid; gap: 8px; }
.group-task-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; font-size: 13px; }
.group-task-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.group-task-move { margin: 4px 0 0; }
.group-task-move .input { min-height: 28px; padding: 2px 8px; font-size: 12px; }
.group-picker { display: grid; gap: 8px; }
.group-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-picker-count { color: var(--navy, #1e4fa8); }
.group-picker-list { display: grid; max-height: 260px; overflow-y: auto; padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.group-picker-list .empty-note { margin: 0; padding: 14px 0; text-align: center; font-size: 13px; }
.group-picker-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.group-picker-row:last-child { border-bottom: 0; }
.group-picker-text { display: grid; min-width: 0; }
.group-picker-text strong { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-picker-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 글 상세 */
.post-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 13px; font-weight: 600; }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.post-topbar form { margin: 0; }
.button.is-danger { border-color: #fecaca; color: #dc2626; }
.button.is-danger:hover { background: #fef2f2; }
.button.is-sm { min-height: 30px; padding: 0 12px; font-size: 12px; border-radius: var(--radius-sm); }

.article-badges { display: flex; gap: 6px; margin-bottom: 8px; }
.article-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.35; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-muted);
    color: var(--muted);
    font-size: 12px;
}

.article-author { display: flex; align-items: center; gap: 10px; }
.article-author strong { display: block; color: var(--ink); font-size: 13px; }
.article-author em { color: var(--muted); font-style: normal; font-weight: 400; }
.article-stats { display: flex; align-items: center; gap: 10px; }
.article-stats strong { color: var(--ink); }

.readers { position: relative; }
.readers summary { color: var(--accent); font-weight: 700; list-style: none; cursor: pointer; }
.readers summary::-webkit-details-marker { display: none; }
.readers-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; gap: 4px; width: 220px; max-height: 260px; overflow-y: auto; padding: 10px 12px; background: #ffffff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12); color: var(--ink); font-size: 12px; }
.readers-list span { display: flex; justify-content: space-between; gap: 8px; }
.readers-list time { color: var(--muted); }

.article-body { margin-bottom: 24px; color: var(--ink); font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-body.rich-body { white-space: normal; }
.article-body.rich-body p,
.article-body.rich-body blockquote { margin: 0 0 0.8em; }
.article-body.rich-body h2 { margin: 0 0 0.6em; font-size: 18px; }
.article-body.rich-body ul,
.article-body.rich-body ol { margin: 0 0 0.8em; padding-left: 1.4em; }
.article-body.rich-body a { color: var(--accent); }
.article-body.rich-body mark { padding: 0 2px; }
.article-body.rich-body img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0.4em 0; }
.article-body.rich-body hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }

.attach-list { display: grid; gap: 8px; margin: 20px 0; }

.attach-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    transition: background 0.15s, border-color 0.15s;
}

.attach-card:hover { border-color: var(--border-strong); background: var(--bg-muted); }
.attach-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.attach-icon .icon { width: 20px; height: 20px; }
.attach-text { display: grid; flex: 1; min-width: 0; gap: 1px; }
.attach-text strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.attach-text span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attach-card > .icon { flex: none; width: 18px; height: 18px; color: var(--muted); }

.reaction-bar { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--bg-muted); }
.reaction-bar p { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.reaction-bar form { margin: 0; }
.reaction-row { display: flex; flex-wrap: wrap; gap: 8px; }

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.reaction-btn:hover { border-color: var(--border-strong); }
.reaction-btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.reaction-btn .emoji { font-size: 15px; }
.reaction-btn .num { padding: 0 6px; border-radius: 999px; background: var(--bg-muted); color: var(--text-sub); font-size: 11px; font-weight: 700; }
.reaction-btn.is-on .num { background: var(--accent); color: #ffffff; }

.comment-head { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.comment-head span { color: var(--accent); font-size: 14px; }
.comment-box { margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; }
.comment-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); }
.comment-box textarea { display: block; width: 100%; padding: 12px; border: 0; font-size: 14px; resize: vertical; outline: none; }
.comment-box footer { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--bg-muted); background: #f8fafc; }

.comment-list { display: grid; gap: 14px; }
.comment { display: flex; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--bg-muted); }
.comment:last-child { padding-bottom: 0; border-bottom: 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.comment-meta strong { font-size: 13px; }
.comment-meta time { color: var(--muted); font-size: 11px; }
.comment-text { color: var(--ink); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment form { margin: 0; }
.link-button { padding: 2px 4px; border: 0; background: none; color: #94a3b8; font-size: 11px; cursor: pointer; }
.link-button:hover { color: #dc2626; }

/* ───────── 화면 제목·표·대화상자 (업무 화면 공통) ───────── */
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-title h1 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 22px; font-weight: 700; }
.page-title h1 .icon { width: 24px; height: 24px; color: var(--accent); }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-title-actions { display: flex; gap: 8px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat-value { margin: 0; color: var(--navy-900); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value.is-accent { color: var(--accent); }
.stat-value.is-success { color: #059669; }
.clock.is-inline { font-size: 15px; letter-spacing: 0; }
.punch.is-two { grid-template-columns: repeat(2, 1fr); }
.meter { height: 8px; overflow: hidden; border-radius: 999px; background: var(--bg-muted); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-head > span { color: var(--muted); font-size: 12px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table th { padding: 10px 20px; border-bottom: 1px solid var(--line); background: #f8fafc; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 12px 20px; border-bottom: 1px solid var(--bg-muted); color: var(--ink); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fafd; }
.data-table .is-narrow { width: 1%; white-space: nowrap; }
.data-table .is-time { width: 140px; }
.data-table .is-period { width: 240px; }
.data-table .is-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr.is-today { background: var(--accent-soft); }
.data-table tr.is-today:hover { background: #dfe8f8; }
.data-table tr.is-muted td { color: #94a3b8; }
.data-table td form { margin: 0; }
.data-table .tag + .tag { margin-left: 4px; }
.is-sunday { color: #dc2626; }
.is-saturday { color: #2563eb; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; }
.cell-note { color: var(--muted); font-size: 12px; }

.tag-warning { background: #fef3c7; color: #92400e; }
.link-button.is-accent { color: var(--accent); font-size: 13px; font-weight: 700; }
.link-button.is-accent:hover { color: var(--navy-900); text-decoration: underline; }
.field-hint.is-accent { color: var(--accent); font-weight: 700; }

.modal {
    width: 560px;
    max-width: calc(100vw - 32px);
    padding: 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    color: var(--text-main);
    background: var(--bg-surface);
    margin: auto;
}
.modal.calendar-dialog { width: 640px; }
.modal.people-picker { width: min(960px, calc(100vw - 48px)); }
.rich-table-dialog[open] { width: 360px; display: grid; gap: 16px; }
.rich-table-dialog .form-actions { padding-top: 0; border-top: 0; }
.modal::backdrop {
    background: rgba(13, 33, 68, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
dialog.modal[open] {
    animation: modal-enter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: all 0.15s ease; }
.icon-button:hover { background: var(--paper); color: var(--ink); }
.icon-button .icon { width: 18px; height: 18px; }

.segmented { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 38px; padding: 0 4px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-sub); font-size: 13px; font-weight: 600; text-align: center; }
.segmented label:hover span { border-color: var(--border-strong); }
.segmented input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.2); }

/* ───────── 자원 예약 ───────── */
.segmented-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 4px; border-radius: 10px; background: var(--paper); }
.segmented-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.segmented-tabs a:hover { color: var(--ink); }
.segmented-tabs a.is-current { background: #ffffff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); color: var(--accent); font-weight: 700; }
.side-note { padding: 12px; border-radius: 10px; background: var(--paper); color: var(--text-sub); font-size: 12px; line-height: 1.6; }
.side-note p { margin: 0; }
.side-note .is-alert { margin-top: 4px; color: #dc2626; font-weight: 600; }

.toolbar-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.toolbar-label { margin-right: 4px; font-size: 13px; font-weight: 700; }
.toolbar-sep { color: #94a3b8; }
.toolbar-hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.toolbar-hint.is-accent { color: var(--accent); font-weight: 700; }
.input.is-auto { width: auto; }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.resource-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 12px; transition: box-shadow 0.15s, transform 0.15s; }
.resource-card:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.resource-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 2 / 1; overflow: hidden; background: linear-gradient(135deg, #eef2f8, var(--border-default)); color: #94a3b8; }
.resource-thumb.is-large { aspect-ratio: 2 / 1; }
.resource-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.resource-thumb > .icon { width: 44px; height: 44px; stroke-width: 1.4; }
.resource-thumb .tag { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.92); }
.resource-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px; }
.resource-body h3 { margin: 0; font-size: 16px; font-weight: 700; }
.resource-meta { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: 12px; }
.resource-meta .icon { width: 13px; height: 13px; }
.resource-desc { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-sub); font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.resource-body footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--bg-muted); color: var(--muted); font-size: 12px; }
.resource-go { display: inline-flex; align-items: center; color: var(--accent); font-weight: 700; }
.resource-go .icon { width: 14px; height: 14px; }

.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.pager { display: flex; justify-content: center; gap: 4px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; font-size: 13px; }
.pager a:hover { border-color: var(--border-strong); }
.pager .is-current { border-color: var(--accent); background: var(--accent); color: #ffffff; font-weight: 700; }
.pager .is-disabled, .pager .is-gap { color: var(--border-strong); }

.page-title .back-link { margin-bottom: 6px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.info-list { display: grid; margin: 0; padding: 8px 20px; }
.info-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; font-size: 13px; }
.info-list div + div { border-top: 1px solid var(--bg-muted); }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; }
.detail-desc { margin: 0; padding: 14px 20px 20px; color: var(--text-sub); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.empty-note.is-padded { padding: 20px; }
.form-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.form-section { display: grid; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.form-section legend { padding: 0 6px; color: var(--accent); font-size: 13px; font-weight: 700; }

/* ───────── 조직도 ───────── */
.org-page .split-side { gap: 12px; }
.org-tree { display: grid; gap: 1px; }
.org-list { margin: 0; padding: 0; list-style: none; }
.org-branch.is-collapsed > .org-list { display: none; }
.org-node { display: flex; align-items: center; gap: 4px; width: 100%; padding: 7px 8px 7px calc(8px + (var(--depth, 0) - 1) * 16px); border: 0; border-radius: 8px; background: none; color: #334155; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.org-node.is-root { padding-left: 8px; gap: 8px; font-weight: 700; }
.org-node.is-root .icon { width: 16px; height: 16px; color: var(--muted); }
.org-node:hover { background: var(--bg-muted); }
.org-node.is-current { background: var(--accent-soft, #eef2fb); color: var(--accent); font-weight: 700; }
.org-node .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-caret { display: grid; flex: none; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: #94a3b8; }
.org-caret:hover { background: var(--border-default); color: var(--ink); }
.org-caret .icon { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 0.15s; }
.org-branch.is-collapsed > .org-node .org-caret .icon { transform: none; }
.org-table td { vertical-align: middle; }
.org-table a { color: inherit; }
.org-table a:hover { color: var(--accent); }
.org-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
.org-sort::after { content: '↕'; font-size: 10px; opacity: .35; }
.org-sort[aria-sort="ascending"]::after { content: '▲'; opacity: .8; }
.org-sort[aria-sort="descending"]::after { content: '▼'; opacity: .8; }
.org-sort:hover { color: var(--accent); }
.org-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .person-avatar { flex: none; width: 34px; height: 34px; font-size: 13px; }
.person-cell strong { margin-right: 4px; }
.person-cell .tag { margin-left: 2px; }

/* ───────── 마이페이지 ───────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel-body { padding: 20px; }
.panel-body > * + * { margin-top: 20px; }
.panel-body.form-stack { gap: 16px; }
.panel-body.form-stack > * + * { margin-top: 0; }
.field-hint.is-error { color: #dc2626; }
.field-hint.is-padded { margin: 0; padding: 12px 20px 16px; }
.field.is-medium { max-width: 360px; }
.input.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; }
.form-actions.is-start { justify-content: flex-start; padding-top: 0; border-top: 0; }
.mypage-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr); gap: 16px; align-items: start; max-width: 1360px; }
.mypage-column { display: grid; gap: 16px; min-width: 0; }
.mypage-column > .panel { margin: 0; scroll-margin-top: 80px; }
.mypage-columns .info-list.is-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mypage-columns .button { white-space: nowrap; }
.me-card { display: grid; justify-items: center; gap: 4px; padding: 20px 12px; border-radius: 12px; background: var(--paper); text-align: center; }
.me-card .person-avatar { margin-bottom: 6px; }
.me-card strong { font-size: 16px; }
.me-card > span:not(.tag) { color: var(--muted); font-size: 12px; }
.count-pill.is-ok { background: #dcfce7; color: #15803d; }
.photo-row { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--bg-muted); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-actions .field-hint { flex-basis: 100%; margin: 0; }
.info-list.is-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; padding: 8px 20px 12px; }
.info-list.is-columns div + div { border-top: 0; }
.info-list.is-columns div { border-bottom: 1px solid var(--bg-muted); }
.week-pattern { table-layout: fixed; border-top: 1px solid var(--line); }
.week-pattern th, .week-pattern td { text-align: center; }
.week-pattern td { padding: 14px 6px; font-size: 13px; }
.week-pattern td.is-off { background: #f8fafc; }
.tfa-line { display: flex; align-items: center; gap: 10px; margin: 0; color: #334155; font-size: 14px; }
.tfa-line .icon { flex: none; width: 20px; height: 20px; color: var(--accent); }
.tfa-line .cell-sub { margin-left: auto; }
.tfa-start { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tfa-off summary { cursor: pointer; }
.tfa-off form { margin-top: 12px; }
.steps { margin: 0; padding-left: 20px; color: var(--text-sub); font-size: 13px; line-height: 1.9; }
.tfa-qr-row { display: grid; grid-template-columns: 200px minmax(0, 360px); gap: 24px; align-items: start; }
.tfa-qr { display: grid; place-items: center; width: 200px; height: 200px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; }
.tfa-qr svg { width: 100%; height: 100%; }

/* ───────── 메일 ───────── */
.mail-workspace {
    position: relative;
    display: grid;
    grid-template-columns: 220px var(--mail-list-width, 400px) minmax(0, 1fr);
    min-height: calc(100vh - 148px);
    overflow: hidden;
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.mail-workspace[hidden] { display: none; }

.mail-top-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(90deg, #1e4fa8 0%, #38bdf8 50%, #1e4fa8 100%);
    background-size: 200% 100%;
    transition: opacity 150ms ease;
}
.mail-workspace.is-navigating .mail-top-loader {
    opacity: 1;
    animation: mailLoaderMove 1.2s infinite linear;
}
@keyframes mailLoaderMove {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.mail-read.is-done { display: flex; flex-direction: column; }
.mail-read.is-done > :not([data-mail-done]) { display: none; }
.mail-read.is-done > [data-mail-done] { flex: 1; }
.mail-done {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 20px;
    min-height: 100%;
    padding: 32px 16px;
    text-align: center;
}
.mail-done[hidden] { display: none; }
.mail-done-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}
.mail-done-mark .icon { width: 32px; height: 32px; }
.mail-done p { margin: 0; font-size: 18px; font-weight: 700; }
.mail-done.is-error .mail-done-mark { background: #fff1f2; color: #9f1239; }
.mail-done-actions { display: flex; gap: 8px; }
.mail-done-actions button[hidden] { display: none; }
.mail-preview-dialog[open] { display: grid; gap: 16px; width: min(720px, calc(100vw - 48px)); }

.mail-side,
.mail-list,
.mail-read { min-width: 0; min-height: 0; overflow: auto; }
.mail-pane { display: flex; flex-direction: column; }
.mail-pane.is-hidden { display: none; }
.mail-pane > .mail-read-head { order: 0; }
.mail-pane > .mail-write { order: 1; }
.mail-pane > .mail-thread,
.mail-pane > .empty-state { order: 2; }
.mail-write { display: none; gap: 16px; padding: 20px 24px 32px; }
.mail-write.is-open { display: grid; }
.mail-write-bar,
.mail-write-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mail-write-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mail-write-actions .check { margin-left: 4px; white-space: nowrap; }
.mail-write-bar h2,
.mail-write-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.mail-write-tools { display: flex; align-items: center; gap: 8px; }
.mail-write-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.mail-write-body:not(:has(.mail-people)) { grid-template-columns: minmax(0, 1fr); }
.mail-write-main { display: grid; gap: 12px; min-width: 0; }
.mail-recipients { display: grid; gap: 10px; }
.mail-line { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.mail-line[hidden] { display: none; }
.mail-line-label { display: flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ink); font-size: 13px; font-weight: 700; }
.mail-bcc-toggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: #e8edf5; color: var(--muted); cursor: pointer; }
.mail-bcc-toggle .icon { width: 14px; height: 14px; transition: transform 160ms ease; }
.mail-bcc-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.mail-token-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail-token-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.12); }
.mail-token-input { flex: 1 1 140px; min-width: 120px; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; }
.mail-token-input[hidden] { display: none; }
.mail-chips { display: contents; }
.mail-chips:empty { display: none; }
.mail-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 3px 4px 3px 8px; border-radius: 8px; background: var(--brand-primary-tint); color: var(--brand-primary); font-size: 13px; font-weight: 700; }
.mail-chip.is-invalid { background: var(--state-danger-tint); color: #b91c1c; }
.mail-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-chip button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.mail-chip .icon { width: 13px; height: 13px; }
.mail-chip-edit { width: 220px; max-width: 100%; border: 0; outline: none; background: transparent; color: inherit; font: inherit; font-weight: 700; }
.mail-more { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.mail-more summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; list-style: none; cursor: pointer; font-weight: 700; }
.mail-more summary::-webkit-details-marker { display: none; }
.mail-more summary .icon { width: 16px; height: 16px; color: var(--muted); transition: transform 160ms ease; }
.mail-more[open] summary .icon { transform: rotate(180deg); }
.mail-more-body { display: grid; }
.mail-more-group { display: grid; gap: 10px; padding: 12px 14px 14px; }
.mail-more-group + .mail-more-group { border-top: 1px solid var(--line); }
.mail-more-group h3 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.mail-more .check { align-items: flex-start; }
.mail-more .check > span { display: grid; gap: 2px; }
.mail-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 88px; padding: 18px; border: 1px dashed #94a3b8; border-radius: 12px; background: #fbfcfe; color: #64748b; font-size: 14px; font-weight: 600; cursor: pointer; }
.mail-drop .icon { width: 22px; height: 22px; }
.mail-drop:hover,
.mail-drop.is-over { border-color: #64748b; background: #f8fafc; color: #334155; }
.mail-files-field:has(.mail-file-board:not([hidden])) .mail-drop { min-height: 72px; }
.mail-drop-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mail-people { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.mail-people-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mail-people-title { margin: 0; font-size: 13px; font-weight: 700; }
.mail-people-actions { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.mail-dept-toggle-btn { background: none; border: 0; padding: 2px 4px; font-size: 11px; font-weight: 600; color: #64748b; cursor: pointer; border-radius: 4px; }
.mail-dept-toggle-btn:hover { color: var(--accent, #1e4fa8); background: var(--bg-muted); }
.mail-people-actions .action-divider { color: var(--border-strong); font-size: 11px; }
.mail-people-dept { margin: 10px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.mail-dept-group { border: 1px solid var(--border-default); border-radius: 8px; background: #ffffff; overflow: hidden; margin-bottom: 6px; }
.mail-dept-group[hidden] { display: none; }
.mail-dept-summary { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #f8fafc; font-size: 12px; font-weight: 700; color: #334155; cursor: pointer; user-select: none; list-style: none; }
.mail-dept-summary::-webkit-details-marker { display: none; }
.mail-dept-summary:hover { background: var(--bg-muted); }
.mail-dept-chevron { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; color: #64748b; transition: transform 160ms ease; }
.mail-dept-chevron .icon { width: 12px; height: 12px; }
.mail-dept-group[open] > .mail-dept-summary .mail-dept-chevron { transform: rotate(90deg); }
.mail-dept-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-dept-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--border-default); color: var(--text-sub); font-size: 11px; font-weight: 700; }
.mail-dept-members { display: grid; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--bg-muted); background: #ffffff; }
.mail-people-list { display: grid; gap: 6px; max-height: 420px; margin-top: 8px; overflow: auto; }
.mail-person { display: flex; align-items: center; gap: 6px; }
.mail-person .name { flex: 1; min-width: 0; font-size: 13px; }
.mail-person .button { padding: 0 8px; }
.mail-preview { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.mail-preview[hidden] { display: none; }
.mail-preview-body { padding: 12px; border-radius: 8px; background: #fff; }
.mail-file-names { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.mail-signature { min-height: 72px; resize: vertical; }
.mail-seal { max-width: 640px; margin: 48px auto; padding: 24px; }

.mail-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 12px;
    background: #ffffff;
    border-right: 1px solid var(--line);
}

.mail-compose-actions { display: flex; align-items: center; gap: 8px; }
.mail-side .button.is-primary { border-color: var(--mail-accent, var(--accent)); background: var(--mail-accent, var(--accent)); }
.mail-side .button.is-primary:hover { border-color: var(--mail-accent, var(--accent)); background: var(--mail-accent, var(--accent)); filter: brightness(0.92); }
.mail-compose { flex: 1; display: flex; justify-content: center; }
.mail-compose-me {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--mail-accent, var(--accent));
    cursor: pointer;
}
.mail-compose-me:hover { background: var(--mail-accent-soft, var(--paper)); }
.mail-compose-me .icon { width: 18px; height: 18px; }
.mail-from-line { margin: 0 4px; color: var(--muted); font-size: 12px; }
.mail-from-line strong { color: var(--ink); }
.mail-side-label { margin: 4px 4px 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.mail-accounts { display: grid; gap: 8px; }
.mail-account-section { display: grid; gap: 4px; }
.mail-account-section + .mail-account-section {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--line, var(--border-default));
}
.mail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 2px;
}
.mail-section-header .mail-side-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.mail-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--border-default);
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
}
.mail-account-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    transition: background 140ms ease;
}
.mail-account.is-open > .mail-account-head { background: var(--mail-accent-soft, var(--accent-soft)); }
.mail-account-head:hover { background: var(--paper); }
.mail-account.is-open > .mail-account-head:hover { background: var(--mail-accent-soft, var(--accent-soft)); }
.mail-account.is-switching .mail-avatar {
    animation: mailAvatarPulse 0.8s infinite alternate ease-in-out;
}
@keyframes mailAvatarPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.15); filter: brightness(1.2); }
}
.mail-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: var(--account-accent, var(--mail-accent, var(--accent)));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.mail-account-copy { display: grid; min-width: 0; }
.mail-account-name { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mail-account-email { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mail-unread {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--account-accent, var(--mail-accent, var(--accent)));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.mail-account-side { display: flex; align-items: center; gap: 6px; }
.mail-account-chevron { width: 14px; height: 14px; color: #94a3b8; }
.mail-account-folders { display: grid; gap: 2px; padding: 2px 0 6px 12px; }
.mail-account-folders .side-link.is-current { background: var(--mail-accent-soft, var(--accent-soft)); color: var(--mail-accent, var(--accent)); }
.mail-account-folders .side-link.is-current .icon { color: var(--mail-accent, var(--accent)); }
.mail-locked-from { margin: 0; color: var(--muted); font-size: 13px; }
.mail-locked-from strong { color: var(--ink); }
.mail-boxes { display: grid; gap: 2px; }
.mail-settings { display: grid; gap: 6px; margin-top: auto; padding: 12px; border-radius: 10px; background: var(--paper); color: var(--text-sub); font-size: 12px; line-height: 1.6; }
.mail-settings strong { color: var(--ink); font-size: 13px; }
.mail-settings p { margin: 0; }
.mail-settings a { color: var(--accent); font-weight: 700; text-decoration: none; }
.mail-settings a:hover { text-decoration: underline; }
.mail-list { position: relative; display: flex; flex-direction: column; background: #ffffff; border-right: 1px solid var(--line); }
.mail-resizer {
    position: absolute;
    top: 0;
    right: -6px;
    width: 12px;
    height: 100%;
    cursor: col-resize;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background 150ms ease;
}
.mail-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 2px;
    background: transparent;
    transition: background 150ms ease;
}
.mail-resizer:hover::before,
.mail-resizer.is-dragging::before {
    background: var(--accent, #1e4fa8);
}
.mail-resizer-handle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 40px;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
    opacity: 0.7;
    pointer-events: none;
}
.mail-resizer:hover .mail-resizer-handle,
.mail-resizer.is-dragging .mail-resizer-handle {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--accent, #1e4fa8);
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(30, 79, 168, 0.25);
}
.mail-resizer-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.mail-resizer-dots i {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #64748b;
    transition: background 150ms ease;
}
.mail-resizer:hover .mail-resizer-dots i,
.mail-resizer.is-dragging .mail-resizer-dots i {
    background: var(--accent, #1e4fa8);
}
.mail-resizer-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%) translateX(-4px);
    background: var(--text-main);
    color: #ffffff;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 30;
}
.mail-resizer-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: transparent var(--text-main) transparent transparent;
}
.mail-resizer:hover .mail-resizer-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
.mail-resizer.is-dragging .mail-resizer-tooltip {
    opacity: 0;
    visibility: hidden;
}
body.is-resizing-mail {
    cursor: col-resize !important;
    user-select: none !important;
}
.mail-read { background: #ffffff; }

.mail-list-head,
.mail-read-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.mail-list-head .search-form { display: block; }
.mail-list-head .search-field { width: 100%; }
.mail-list-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 30px;
}
.mail-tools-left {
    display: grid;
    align-items: center;
}
.mail-tools-left > .mail-views,
.mail-tools-left > .mail-bulk { grid-area: 1 / 1; }
.mail-list-head:has(.mail-bulk:not([hidden])) .mail-views { visibility: hidden; }
.mail-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 140ms ease, color 140ms ease;
}
.mail-refresh-btn:hover {
    background: var(--paper, var(--bg-muted));
    color: var(--ink);
}
.mail-refresh-btn .icon {
    width: 15px;
    height: 15px;
}
.mail-refresh-btn.is-spinning .icon {
    animation: mailSpin 0.75s infinite linear;
}
@keyframes mailSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.mail-list.is-refreshing .mail-rows {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 160ms ease;
}
.mail-rows {
    animation: mailFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes mailFadeIn {
    from { opacity: 0.6; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}
.mail-views { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mail-views a { padding: 4px 10px; border-radius: var(--radius-xs); color: var(--text-muted); font-size: 12px; font-weight: 600; text-decoration: none; transition: all 0.15s ease; }
.mail-views a:hover { color: var(--text-main); background: var(--bg-subtle); }
.mail-views a.is-current { background: var(--mail-accent, var(--brand-primary)); color: #fff; }
.mail-group { margin: 0; padding: 10px 14px 4px; color: var(--text-muted); font-size: 12px; font-weight: 700; }

.mail-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    border-left: 3px solid transparent;
    transition: background 0.12s ease-in-out;
}

.mail-check { width: 16px; height: 16px; margin-left: 12px; accent-color: var(--mail-accent, var(--brand-primary)); }
.mail-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mail-bulk[hidden] { display: none; }
.mail-bulk > span { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.mail-move { position: relative; }
.mail-move:not([open]) > .mail-move-menu { display: none; }
.mail-move > summary { list-style: none; cursor: pointer; }
.mail-move > summary::-webkit-details-marker { display: none; }
.mail-move-menu {
    position: absolute;
    z-index: 4;
    display: grid;
    min-width: 168px;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-popover);
}
.mail-move-menu form { margin: 0; }
.mail-move-menu form[hidden] { display: none; }
.mail-move-menu button {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.mail-move-menu button:hover { background: var(--bg-subtle); }

.mail-row a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-width: 0; padding: 10px 10px 10px 14px; color: inherit; text-decoration: none; }
.mail-row.is-unread .who,
.mail-row.is-unread .subject-text { font-weight: 700; color: var(--text-main); }
.mail-row.is-current {
    background: var(--mail-accent-soft, var(--brand-primary-tint));
    border-left-color: var(--mail-accent, var(--brand-primary));
}
.mail-row:hover { background: var(--bg-subtle); }
.mail-row.is-current:hover {
    background: var(--mail-accent-soft, var(--brand-primary-tint));
    filter: brightness(0.97);
}
.mail-row-top,
.mail-message-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.mail-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--state-success); }
.mail-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mail-row .subject { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mail-place { flex: none; padding: 1px 6px; border-radius: 999px; background: var(--bg-muted); color: var(--muted); font-size: 11px; font-weight: 700; }
.mail-replied { display: inline-flex; flex: none; color: var(--accent); }
.mail-replied .icon { width: 14px; height: 14px; }
.mail-row .subject-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .when { flex: none; }
.mail-row .when,
.mail-row .snippet,
.mail-message time { color: var(--muted); font-size: 12px; font-weight: 400; }
.mail-row .snippet { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-marks { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.mail-row-marks form { margin: 0; }
.mail-clip { display: inline-flex; color: #94a3b8; }
.mail-clip .icon,
.mail-row .star-toggle .icon { width: 16px; height: 16px; }
.mail-file-names { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.mail-file-names li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: #ecfdf3; color: #166534; font-size: 12px; font-weight: 700; }
.mail-file-names button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.mail-file-board { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail-file-board[hidden] { display: none; }
.mail-file-summary { display: flex; justify-content: flex-end; gap: 16px; margin: 0; padding: 8px 12px; color: #64748b; font-size: 12px; font-weight: 700; }
.mail-file-list { display: grid; margin: 0; padding: 0; list-style: none; }
.mail-file-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--bg-muted); color: var(--ink); font-size: 13px; font-weight: 600; }
.mail-file-list .icon { width: 16px; height: 16px; flex: none; color: var(--state-success); }
.mail-file-list li.is-large .icon { color: #dc2626; }
.mail-file-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-file-until,
.mail-file-kind { flex: none; color: #64748b; font-size: 12px; font-weight: 700; }
.mail-file-switch { flex: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #334155; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mail-file-remove { flex: none; border: 0; background: transparent; color: #64748b; font-size: 16px; line-height: 1; cursor: pointer; }
.mail-drive-progress { margin-top: 8px; }
.mail-drive-progress[hidden] { display: none; }
.mail-drive-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #334155; font-size: 13px; font-weight: 700; }
.mail-drive-progress-row span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-drive-percent { flex: none; color: var(--accent); }
.mail-drive-track { width: 100%; height: 10px; background: var(--border-default); border-radius: 999px; overflow: hidden; }
.mail-drive-bar { height: 100%; background: var(--accent); width: var(--upload-progress, 0%); transition: width .15s ease; }
.mail-drive-meta { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }

.mail-read-head h1 { margin: 0; font-size: 18px; font-weight: 700; }
.mail-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mail-toolbar form,
.mail-files form { margin: 0; }
.mail-thread { display: grid; gap: 12px; padding: 12px 16px 20px; }
.mail-message,
.mail-history { display: grid; gap: 14px; margin: 0; }
.mail-message { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mail-history { gap: 10px; margin-left: 8px; padding: 2px 0 2px 16px; border-left: 3px solid #d5deee; }
.mail-history .mail-message-head { padding-bottom: 0; border-bottom: 0; }
.mail-history.is-target { border-left-color: var(--accent); }
.mail-message.is-sent { background: #f4f7fb; border-color: #d5deee; }
.mail-message.is-draft { background: #f8fafc; }
.mail-message.is-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mail-kind { margin: 0; justify-self: start; padding: 2px 8px; border-radius: 999px; background: #ecfdf3; color: #166534; font-size: 11px; font-weight: 700; }
.mail-message.is-sent .mail-kind { background: #e8effb; color: var(--accent); }
.mail-message.is-draft .mail-kind { background: var(--bg-muted); color: var(--muted); }
.mail-message-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-message-head { align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mail-party { display: grid; gap: 4px; min-width: 0; }
.mail-party p { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.mail-party span { display: inline-block; min-width: 72px; margin-right: 8px; color: var(--muted); font-weight: 700; }
.mail-party .tag { margin-left: 8px; }
.mail-body { overflow: auto; color: var(--ink); font-size: 14px; font-weight: 400; line-height: 1.7; }
.mail-body img { max-width: 100%; height: auto; }
.mail-body .mail-large { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.mail-body .mail-large-head { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--bg-muted); font-size: 13px; font-weight: 700; }
.mail-body .mail-large-list { list-style: none; margin: 0; padding: 0; }
.mail-body .mail-large-list li + li { border-top: 1px solid var(--bg-muted); }
.mail-body .mail-large-list a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--ink); font-weight: 700; text-decoration: none; }
.mail-body .mail-large-list a:hover { background: #f8fafc; }
.mail-body .mail-large-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 6px; background: #f4efe6; color: #92400e; font-size: 11px; font-weight: 700; }
.mail-body .mail-large-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body .mail-large .icon { width: 18px; height: 18px; flex: none; color: #64748b; }
.mail-body .gmail_chip,
.mail-body .gmail_drive_chip { box-sizing: content-box; display: inline-block; max-width: 100%; vertical-align: middle; }
.mail-body .gmail_chip *,
.mail-body .gmail_drive_chip * { box-sizing: content-box; }
.mail-body .gmail_chip img,
.mail-body .gmail_drive_chip img { max-width: none; width: auto; height: auto; vertical-align: bottom; }
.mail-files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mail-reply-page { display: grid; gap: 16px; max-width: 720px; }
.mail-reply-page h2 { margin: 0; font-size: 18px; }
.mail-list .pager { padding: 16px; }

/* ───────── 서식 편집기 ───────── */
.rich-toolbar,
.rich-surface { display: none; }
.rich-editor { position: relative; }
.rich-editor.is-ready .rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin-bottom: 0;
    padding: 3px 4px;
    background: #f7f8fa;
    border: 1px solid var(--border-default);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}
.rich-editor.is-ready .rich-surface {
    display: block;
    min-height: 180px;
    padding: 10px 12px;
    border: 1px solid var(--border-default);
    border-radius: 0 0 8px 8px;
    background: #fff;
}
.rich-editor.is-ready textarea {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.rich-group { display: inline-flex; align-items: center; gap: 1px; padding: 0 4px; }
.rich-group + .rich-group { margin-left: 2px; padding-left: 6px; border-left: 1px solid var(--border-default); }
.rich-group.is-table { display: none; }
.rich-group.is-table:has(.rich-cmd:not(:disabled)) { display: inline-flex; }
.rich-cmd,
.rich-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 28px;
    min-width: 28px;
    padding: 0 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #1f2937;
    line-height: 1;
    cursor: pointer;
}
.rich-cmd:hover,
.rich-tool:hover,
.rich-select:hover { background: #eceff3; }
.rich-cmd.is-active { background: var(--border-default); color: #111827; }
.rich-cmd:disabled { opacity: 0.35; cursor: default; }
.rich-cmd:disabled:hover { background: transparent; }
.rich-cmd svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rich-cmd svg .is-fill { fill: currentColor; stroke: none; }
.rich-cmd svg .is-mark { fill: currentColor; stroke: none; font-size: 6px; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.rich-cmd.is-letter,
.rich-cmd.is-clear,
.rich-t,
.rich-mark-letter { font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 700; }
.rich-cmd.is-italic { font-style: italic; font-weight: 600; }
.rich-cmd.is-underline { text-decoration: underline; text-underline-offset: 3px; }
.rich-cmd.is-strike { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.rich-cmd.is-clear { width: auto; padding: 0 6px; font-size: 14px; font-weight: 600; letter-spacing: -0.03em; }
.rich-cmd.is-clear span { font-style: italic; font-weight: 700; }
.rich-select {
    height: 28px;
    max-width: 108px;
    padding: 0 16px 0 6px;
    border: 0;
    border-radius: 4px;
    appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%236b7280' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 2px center;
    background-size: 10px;
    color: #1f2937;
    font-size: 13px;
    cursor: pointer;
}
.rich-select.is-size { width: 72px; }
.rich-paint { position: relative; }
.rich-t { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.rich-t i { display: block; width: 12px; height: 3px; margin-top: 1px; border-radius: 1px; background: #111827; }
.rich-caret { width: 0; height: 0; margin-top: 6px; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid var(--text-muted); }
.rich-paint input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.rich-mark { position: relative; display: inline-flex; }
.rich-mark-letter { display: inline-block; min-width: 14px; padding: 0 1px 1px; border-radius: 2px; background: var(--border-default); line-height: 1; text-align: center; }
.rich-mark-letter.is-fde68a { background: #fde68a; }
.rich-mark-letter.is-bbf7d0 { background: #bbf7d0; }
.rich-mark-letter.is-bfdbfe { background: #bfdbfe; }
.rich-mark-letter.is-fecdd3 { background: #fecdd3; }
.rich-swatches { position: absolute; top: calc(100% + 4px); left: 0; z-index: 4; display: flex; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.rich-swatches[hidden] { display: none; }
.rich-swatch { width: 18px; height: 18px; padding: 0; border: 1px solid var(--border-default); border-radius: 3px; background: #fff; color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; }
.rich-swatch.is-yellow { background: #fde68a; }
.rich-swatch.is-green { background: #bbf7d0; }
.rich-swatch.is-blue { background: #bfdbfe; }
.rich-swatch.is-pink { background: #fecdd3; }
.rich-swatch.is-active { outline: 2px solid #111827; outline-offset: 1px; }
.rich-prose { min-height: 160px; outline: none; }
.rich-prose p { margin: 0 0 0.6em; }
.rich-prose mark { padding: 0 2px; }
.rich-prose hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.rich-prose img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0.4em 0; }
.rich-prose img.ProseMirror-selectednode { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 본문 사진 크기·배치: 편집기와 글 보기가 같은 style(width %, float)을 쓴다. */
.rich-prose { display: flow-root; }
.rich-prose img[style*="float: left"],
.article-body.rich-body img[style*="float: left"] { margin: 0.2em 1em 0.6em 0; }
.rich-prose img[style*="float: right"],
.article-body.rich-body img[style*="float: right"] { margin: 0.2em 0 0.6em 1em; }
.article-body.rich-body { display: flow-root; }
.rich-image-pop { position: absolute; z-index: 5; display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
.rich-image-pop[hidden] { display: none; }
.rich-image-handle { position: absolute; z-index: 6; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1.5px solid #1f2937; border-radius: 2px; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3); cursor: nwse-resize; touch-action: none; }
.rich-image-handle.is-left { cursor: nesw-resize; }
.rich-image-handle[hidden] { display: none; }
.rich-image-handle[data-size]::after { content: attr(data-size); position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 2px 6px; border-radius: 4px; background: #111827; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.rich-editor.is-resizing,
.rich-editor.is-resizing * { cursor: nwse-resize; user-select: none; }
.rich-editor.is-resizing .rich-image-pop { visibility: hidden; }
.rich-image-pop-group { display: inline-flex; border: 1px solid var(--border-default); border-radius: 6px; overflow: hidden; }
.rich-image-pop-group .rich-cmd { height: 30px; min-width: 32px; padding: 0 8px; border-radius: 0; }
.rich-image-pop-group .rich-cmd + .rich-cmd { border-left: 1px solid var(--border-default); }
.rich-image-pop-group .rich-cmd.is-text { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rich-image-pop-group .rich-cmd[data-rich-image="delete"]:hover { color: #dc2626; }
.rich-cmd.is-busy { opacity: 0.5; pointer-events: none; }
.rich-prose .selectedCell { background: #eef2fb; }
.rich-table { width: 100%; margin: 0 0 0.8em; border-collapse: collapse; }
.rich-table td,
.rich-table th { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.rich-table th { background: #f8fafc; font-weight: 700; }
.rich-table p { margin: 0; }
.rich-prose p.is-editor-empty:first-child::before {
    float: left;
    height: 0;
    color: var(--muted);
    content: attr(data-placeholder);
    pointer-events: none;
}

/* ==========================================================================
   첨부 탭 및 목록 스타일 (Attachment Tabs & Board) - Screenshot 2
   ========================================================================== */
.mail-attach-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.mail-attach-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 150ms ease;
    user-select: none;
}
.mail-attach-tab:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--text-main);
}
.mail-attach-tab.is-active,
.mail-attach-tab:focus {
    background: var(--brand-primary-tint);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.mail-attach-tab .icon {
    width: 15px;
    height: 15px;
}

/* 첨부 파일 보드 컨테이너 (Screenshot 2) */
.mail-file-board {
    margin-top: 10px;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.mail-file-board[hidden] {
    display: none !important;
}
.mail-file-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-default);
    font-size: 13px;
}
.mail-file-board-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-main);
}
.mail-file-board-left .count-badge {
    color: #2563eb;
    font-weight: 700;
}
.mail-file-board-left .sep {
    color: var(--border-strong);
}
.mail-file-clear-all {
    background: none;
    border: 0;
    padding: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.mail-file-clear-all:hover {
    color: var(--state-danger);
    text-decoration: underline;
}
.mail-file-board-right {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}
.mail-file-cap-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
}

/* 첨부 파일 행 (Screenshot 2) */
.mail-file-table-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mail-file-row {
    display: grid;
    grid-template-columns: 28px 24px minmax(0, 1fr) auto auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--bg-muted);
    font-size: 13px;
    color: var(--text-main);
    transition: background 120ms ease;
}
.mail-file-row:last-child {
    border-bottom: 0;
}
.mail-file-row:hover {
    background: #f8fafc;
}
.mail-file-row-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    background: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}
.mail-file-row-del:hover {
    background: var(--state-danger-tint);
    color: var(--state-danger);
}
.mail-file-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.mail-file-row-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mail-file-row-status {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.mail-file-row-size {
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.mail-file-row-expiry {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 4px;
}
.mail-file-row-expiry.is-infinite {
    color: #059669;
    background: #ecfdf5;
}
.mail-file-row-expiry.is-pc-large {
    color: #b45309;
    background: #fef3c7;
}
.mail-file-row-expiry.is-inline {
    color: #64748b;
    background: var(--bg-muted);
}
.mail-file-row-switch {
    padding: 3px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.mail-file-row-switch:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* ==========================================================================
   드라이브 파일 선택 모달 스타일 (Drive Picker Modal) - Screenshot 1
   ========================================================================== */
.drive-picker-modal {
    width: min(940px, calc(100vw - 40px));
    height: 620px;
    max-height: 85vh;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
    background: #ffffff;
    overflow: hidden;
}
.drive-picker-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
.drive-picker-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.drive-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-default);
    background: #ffffff;
}
.drive-picker-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}
.drive-picker-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
}
.drive-picker-search-wrap .icon {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
}
.drive-picker-search-input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 32px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: all 140ms ease;
}
.drive-picker-search-input:focus {
    background: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(30, 79, 168, 0.15);
}
.drive-picker-close-btn {
    border: 0;
    background: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.drive-picker-close-btn:hover {
    background: var(--bg-muted);
    color: var(--text-main);
}
.drive-picker-body {
    display: flex;
    flex: 1;
    min-height: 0;
}
.drive-picker-sidebar {
    width: 180px;
    flex-shrink: 0;
    padding: 12px 8px;
    background: #fbfcfe;
    border-right: 1px solid var(--border-default);
}
.drive-picker-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.drive-picker-space-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 120ms ease;
}
.drive-picker-space-btn .icon {
    width: 18px;
    height: 18px;
    color: #64748b;
}
.drive-picker-space-btn:hover {
    background: var(--bg-muted);
    color: var(--text-main);
}
.drive-picker-space-btn.is-active {
    background: var(--brand-primary-tint);
    color: var(--brand-primary);
    font-weight: 700;
}
.drive-picker-space-btn.is-active .icon {
    color: #2563eb;
}
.drive-picker-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: #ffffff;
}
.drive-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid var(--bg-muted);
}
.drive-picker-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.drive-picker-breadcrumbs .crumb {
    cursor: pointer;
}
.drive-picker-breadcrumbs .crumb:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}
.drive-picker-breadcrumbs .crumb.is-current {
    color: var(--text-main);
    font-weight: 700;
    cursor: default;
    text-decoration: none;
}
.drive-picker-breadcrumbs .crumb-sep {
    color: #94a3b8;
    font-size: 11px;
}
.btn-picker-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
}
.btn-picker-sort:hover {
    background: #f8fafc;
}
.drive-picker-table-wrap {
    flex: 1;
    overflow-y: auto;
    position: relative;
}
.drive-picker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.drive-picker-table thead {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
    border-bottom: 1px solid var(--border-default);
}
.drive-picker-table th {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap;
}
.drive-picker-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bg-muted);
    color: #334155;
    white-space: nowrap;
}
.drive-picker-row {
    cursor: pointer;
    transition: background 120ms ease;
}
.drive-picker-row:hover {
    background: #f8fafc;
}
.drive-picker-row.is-selected {
    background: var(--brand-primary-tint);
}
.drive-picker-row .col-name {
    font-weight: 600;
    color: var(--text-main);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drive-picker-row .file-name-text.is-folder {
    color: var(--brand-primary);
}
.drive-picker-row .col-check input {
    cursor: pointer;
    width: 16px;
    height: 16px;
}
.drive-picker-empty,
.drive-picker-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 13px;
}
.drive-picker-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-default);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: drive-spin 800ms linear infinite;
}
@keyframes drive-spin {
    to { transform: rotate(360deg); }
}
.drive-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 20px;
    border-top: 1px solid var(--border-default);
    background: #f8fafc;
}
.drive-picker-footer-left {
    font-size: 13px;
    color: #64748b;
}
.drive-picker-selected-summary strong {
    color: #2563eb;
}
.drive-picker-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 공통 확인창 (design.md §5.4) — window.wooridleConfirm / form[data-wr-confirm] */
dialog.modal.modal-confirm {
    width: 400px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
}
.modal-confirm .modal-confirm-body { padding: 24px 24px 20px; }
.modal-confirm .modal-confirm-body h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: var(--text-main);
    word-break: keep-all;
}
.modal-confirm .modal-confirm-body p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    word-break: keep-all;
    white-space: pre-line;
}
.modal-confirm .modal-confirm-body p:empty { display: none; }
.modal-confirm .modal-actions {
    gap: 8px;
    height: 64px;
    margin: 0;
    padding: 0 24px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-subtle);
}
.modal-confirm .modal-actions .btn { min-width: 72px; border-radius: var(--radius-md); font-weight: 600; }
.modal-confirm .modal-confirm-input { display: block; width: 100%; margin-top: 14px; height: 38px; }
.modal-confirm .modal-confirm-input[hidden] { display: none; }

/* ── 결재선 (근태·휴가 신청 창) ─────────────────────────── */
.approval-line { border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-subtle); }
.approval-line > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 13px; }
.approval-line > summary::-webkit-details-marker { display: none; }
.approval-line-title { font-weight: 700; color: var(--ink); white-space: nowrap; }
.approval-line-summary { flex: 1; min-width: 0; overflow: hidden; color: var(--text-sub); text-overflow: ellipsis; white-space: nowrap; }
.approval-line-caret { flex-shrink: 0; color: var(--muted); transition: transform 0.15s ease; }
.approval-line[open] .approval-line-caret { transform: rotate(180deg); }
.approval-line-body { display: grid; gap: 12px; padding: 4px 14px 14px; border-top: 1px solid var(--border-subtle); }
.approval-line-warning { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #FECACA; border-radius: var(--radius-md); background: var(--state-danger-tint); color: #B91C1C; font-size: 13px; line-height: 1.5; }
.approval-line-section { display: grid; gap: 6px; }
.approval-line-section:first-of-type { margin-top: 10px; }
.approval-line-label { font-size: 12px; font-weight: 700; color: var(--text-sub); }
.approval-line-label small { margin-left: 6px; font-weight: 500; color: var(--muted); }
.approval-steps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.approval-step { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border-subtle); border-radius: 8px; background: #fff; font-size: 13px; }
.approval-step.is-added { border-style: dashed; border-color: var(--brand-primary); }
.approval-step-order { min-width: 30px; font-weight: 700; color: var(--brand-primary); }
.approval-step-name { font-weight: 600; color: var(--ink); }
.approval-step-detail { flex: 1; color: var(--muted); font-size: 12px; }
.approval-step-tools { display: inline-flex; gap: 2px; }
.icon-button.is-xs { width: 24px; height: 24px; font-size: 12px; }
.approval-cc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 30px; }
.approval-chip { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--border-subtle); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--ink); }
.approval-chip.is-locked { padding-right: 10px; background: var(--brand-primary-tint); border-color: transparent; color: var(--brand-primary); }
.approval-empty { color: var(--muted); font-size: 12px; }
.approval-add, .approval-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.approval-add .input { flex: 1; min-width: 160px; }
.approval-presets .input { width: auto; min-width: 150px; flex: 1; }
.approval-presets-gap { flex-basis: 100%; height: 0; }
[data-approval-note].is-danger { color: #B91C1C; }
.approval-decide { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.approval-decide .approval-progress { flex-basis: 100%; margin-top: 2px; }
.approval-progress { line-height: 1.5; }
.approval-inbox { border-color: var(--brand-primary); }

/* ── 2차 인증 (로그인 승인) ─────────────────────────── */
.tfa-approval { display: grid; justify-items: center; gap: 8px; text-align: center; }
.tfa-number { min-width: 120px; padding: 14px 20px; border-radius: 16px; background: var(--brand-primary-tint); color: var(--brand-primary); font-size: 44px; font-weight: 800; letter-spacing: 6px; line-height: 1; }
.tfa-hint { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.tfa-link { background: none; border: 0; padding: 4px 8px; color: var(--text-sub); font-size: 13px; text-decoration: underline; cursor: pointer; }
.tfa-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--text-muted); font-size: 12px; }
.tfa-divider::before, .tfa-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }
.tfa-app { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.tfa-subhead { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-sub); }
.approval-chip[hidden] { display: none; }

/* 새 메일 알림 (오른쪽 아래). layout.blade.php 의 메일 알림 스크립트가 만든다. */
.mail-toasts {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100% - 32px));
    pointer-events: none;
}
.mail-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4px 12px;
    align-items: start;
    padding: 14px 14px 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--brand-primary);
    border-radius: 12px;
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.28), 0 4px 12px rgba(15, 23, 42, 0.08);
    color: var(--text-main);
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    animation: mailToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.mail-toast:hover { border-color: var(--brand-primary); }
.mail-toast .mail-toast-icon { grid-row: span 3; color: var(--brand-primary); padding-top: 2px; }
.mail-toast .mail-toast-label { font-size: 12px; font-weight: 600; color: var(--brand-primary); }
.mail-toast .mail-toast-title,
.mail-toast .mail-toast-body {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mail-toast .mail-toast-title { font-size: 14px; font-weight: 600; }
.mail-toast .mail-toast-body { font-size: 13px; color: var(--text-muted); }
.mail-toast .mail-toast-close {
    grid-column: 3;
    grid-row: 1;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.mail-alert-toggle { margin: 4px 0 0; padding-top: 6px; border-top: 1px dashed var(--line); }
.mail-alert-switch { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-sub); font-family: inherit; font-size: 12px; text-align: left; cursor: pointer; transition: background 0.12s, color 0.12s; }
.mail-alert-switch:hover { background: var(--paper); color: var(--text-main); }
.mail-alert-switch:focus-visible { outline: 2px solid var(--mail-accent, var(--accent)); outline-offset: 1px; }
.mail-alert-switch .icon { flex: none; width: 14px; height: 14px; color: #94a3b8; }
.mail-alert-switch .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-alert-track { position: relative; flex: none; width: 28px; height: 16px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s; }
.mail-alert-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2); transition: transform 0.15s; }
.mail-alert-switch.is-on { color: var(--text-main); }
.mail-alert-switch.is-on .icon { color: var(--mail-accent, var(--accent)); }
.mail-alert-switch.is-on .mail-alert-track { background: var(--mail-accent, var(--accent)); }
.mail-alert-switch.is-on .mail-alert-thumb { transform: translateX(12px); }
@keyframes mailToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
    .mail-toasts { right: 16px; bottom: 16px; }
}

/* 결재 열: 버튼을 한 줄로, 진행 상황은 아래에 (근태·휴가 승인 표) */
.data-table .is-actions { width: 1%; white-space: nowrap; text-align: right; }
.data-table .is-actions .approval-decide { justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 132px; }
.data-table .is-actions .approval-decide form { display: inline-flex; }
.data-table .is-actions .approval-decide .button { min-width: 56px; }
.data-table .is-actions .approval-progress { text-align: right; white-space: nowrap; }
.data-table .cell-reason { color: var(--text-sub); min-width: 200px; max-width: 520px; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }

/* 세그먼트 탭 (부서 근무 관리 서브탭) */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: var(--radius-lg); background: var(--bg-muted); border: 1px solid var(--border-subtle); }
.segmented-item { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.segmented-item:hover { color: var(--text-main); }
.segmented-item.is-active { background: var(--bg-surface); color: var(--brand-primary); box-shadow: 0 1px 3px rgba(13, 33, 68, .1); }
.segmented-item em { font-style: normal; min-width: 20px; padding: 1px 6px; border-radius: var(--radius-full); background: var(--border-default); color: var(--text-sub); font-size: 11px; text-align: center; }
.segmented-item em.is-alert { background: var(--state-danger); color: #fff; }

/* 부서 근무계획 매트릭스 */
.matrix-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 12px; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.matrix-legend i { font-style: normal; }
.matrix-scroll { overflow-x: auto; }
.matrix-table { font-size: 12px; white-space: nowrap; }
.matrix-table th, .matrix-table td { padding: 8px 3px; }
.matrix-table .matrix-name { position: sticky; left: 0; z-index: 1; min-width: 92px; padding-left: 20px; background: var(--bg-surface); font-weight: 600; box-shadow: 1px 0 0 var(--border-subtle); }
.matrix-table th.matrix-name { background: var(--bg-subtle); z-index: 2; }
.matrix-table tbody tr:hover .matrix-name { background: #f8fafd; }
.matrix-day { min-width: 44px; text-align: center; line-height: 1.25; }
.matrix-day strong { display: block; color: var(--text-sub); font-size: 13px; }
.matrix-day span { font-size: 11px; font-weight: 500; }
.matrix-day.is-sat strong, .matrix-day.is-sat span { color: var(--state-info); }
.matrix-day.is-sun strong, .matrix-day.is-sun span { color: var(--state-danger); }
.matrix-day.is-today { background: var(--brand-primary-tint); box-shadow: inset 0 -2px 0 var(--brand-primary); }
.matrix-cell { text-align: center; }
.matrix-cell.is-today { background: rgba(30, 79, 168, .04); }
.matrix-chip { display: inline-block; min-width: 38px; padding: 3px 4px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.matrix-chip.is-work { background: var(--brand-primary-tint); color: var(--brand-primary); }
.matrix-chip.is-adjusted { background: #fff1e6; color: #c2410c; box-shadow: inset 0 0 0 1px #fdd5b4; }
.matrix-chip.is-leave { background: #ecfdf3; color: #047857; box-shadow: inset 0 0 0 1px #b7ebcf; }
.matrix-chip.is-off { color: var(--text-disabled); font-weight: 500; }
.matrix-chip.is-empty { color: var(--text-disabled); font-weight: 400; }

/* 자원예약 상세 — 상태 배지 · 상태 관리 패널 */
.rb-badge { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px 4px 8px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; line-height: 1.4; }
.rb-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rb-badge.is-pending { background: #fdf6e7; color: #a16207; box-shadow: inset 0 0 0 1px #f3e2b8; }
.rb-badge.is-approved { background: var(--brand-primary-tint); color: var(--brand-primary); box-shadow: inset 0 0 0 1px #d5e0f2; }
.rb-badge.is-returned { background: #eefaf3; color: #0f7a4b; box-shadow: inset 0 0 0 1px #c9ead8; }
.rb-badge.is-rejected, .rb-badge.is-cancelled { background: #fdf1f1; color: #b42318; box-shadow: inset 0 0 0 1px #f6d4d2; }
.rb-badge.is-muted { background: var(--bg-muted); color: var(--text-muted); }

.rb-status-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--bg-subtle); }
.rb-status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rb-status-head-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--bg-surface); color: var(--brand-primary); box-shadow: inset 0 0 0 1px var(--border-default); }
.rb-status-head strong { display: block; font-size: 14px; color: var(--text-main); }
.rb-status-head small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.rb-status-list { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.rb-status-option { --tone: var(--text-muted); --tone-soft: var(--bg-muted); display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); color: var(--text-sub); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.rb-status-option.is-pending { --tone: #c58a12; --tone-soft: #fdf6e7; }
.rb-status-option.is-approved { --tone: var(--brand-primary); --tone-soft: var(--brand-primary-tint); }
.rb-status-option.is-returned { --tone: #12925a; --tone-soft: #eefaf3; }
.rb-status-option:hover { border-color: var(--tone); }
.rb-status-option:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.rb-status-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--tone); }
.rb-status-text { flex: 1; min-width: 0; }
.rb-status-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text-main); }
.rb-status-text small { display: block; margin-top: 1px; font-size: 11px; color: var(--text-muted); }
.rb-status-check { display: none; color: var(--tone); }
.rb-status-option.is-active { border-color: var(--tone); background: var(--tone-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 12%, transparent); }
.rb-status-option.is-active .rb-status-dot { background: var(--tone); }
.rb-status-option.is-active .rb-status-text strong { color: var(--tone); }
.rb-status-option.is-active .rb-status-check { display: inline-flex; }
.rb-status-note { margin: 12px 0 0; font-size: 11px; line-height: 1.55; color: var(--text-muted); }
.rb-status-cancel { padding-top: 12px; border-top: 1px solid var(--border-default); }
.rb-status-cancel form { margin: 0; }
.rb-status-cancel button { width: 100%; height: 34px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: #b42318; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.rb-status-cancel button:hover { background: #fdf1f1; border-color: #f6d4d2; }
@media (max-width: 720px) {
    .rb-detail-grid { grid-template-columns: 1fr !important; }
}

/* 프로젝트 — 선택 전 · 프로젝트 없음 화면 (게시판·근태와 같은 empty-state) */
.project-workspace .project-empty { min-height: 360px; align-content: center; margin: 4px 0; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--bg-surface); }
.project-workspace .project-empty .button { margin-top: 12px; }
.project-workspace .project-side-empty { padding: 14px 12px; border: 1px dashed var(--border-default); border-radius: var(--radius-md); text-align: center; font-size: 12px; }
.empty-state .button .icon { width: 16px; height: 16px; margin: 0; color: inherit; stroke-width: 2; }
.project-workspace .project-empty { min-height: calc(100vh - 200px); }

/* 그룹 화상회의 열기 */
.meet-dialog { width: min(480px, calc(100vw - 32px)); }
.meet-people-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px; font-size: 13px; }
.meet-people { max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
.meet-people li label { width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); }
.meet-people li label:hover { background: var(--bg-subtle); }
.meet-person-name { font-weight: 600; }
.meet-ready { display: grid; gap: 8px; padding: 18px; border-radius: var(--radius-lg); background: var(--state-success-tint); border: 1px solid #c9ead8; }
.meet-ready > strong { color: var(--state-success-text); font-size: 15px; }
.meet-link-row { display: flex; gap: 8px; }
.meet-link-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); font: inherit; font-size: 13px; }

/* 그룹 공유 드라이브를 만들지 못했을 때 안내 */
.group-drive-notice { margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid #f3e2b8; border-radius: var(--radius-md); background: var(--state-warning-tint); color: var(--state-warning-text); font-size: 13px; }

/* 출퇴근 정정 창: 고른 날짜에 기록된 출퇴근 */
.correction-record { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-subtle, #f8fafc); }
.correction-record-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.correction-record-plan { color: var(--text-sub); font-size: 12px; }
.correction-record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.correction-record-grid > div { padding: 6px 8px; border-radius: var(--radius-xs); background: #fff; text-align: center; }
.correction-record-grid dt { color: var(--text-sub); font-size: 12px; }
.correction-record-grid dd { margin: 2px 0 0; color: var(--text-main); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.correction-record-grid dd.is-missing { color: var(--danger, #dc2626); font-size: 14px; }
.correction-record-note { margin: 8px 0 0; color: var(--text-sub); font-size: 12px; }

/* ───────── 홈 대시보드: 오늘 챙길 일 요약 띠 ───────── */
.dash-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-stat { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--bg-surface); box-shadow: var(--shadow-card); color: var(--text-main); transition: border-color 0.15s, transform 0.15s; }
a.dash-stat:hover { border-color: var(--brand-primary); transform: translateY(-1px); }
.dash-stat-icon { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg-subtle); color: var(--text-muted); }
.dash-stat-icon .icon { width: 20px; height: 20px; }
.dash-stat-text { display: grid; min-width: 0; }
.dash-stat-label { overflow: hidden; color: var(--text-muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dash-stat strong { color: var(--brand-navy-900); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.2; }
.dash-stat.is-hot { border-color: var(--brand-primary); }
.dash-stat.is-hot .dash-stat-icon { background: var(--brand-primary-tint); color: var(--brand-primary); }
.dash-stat.is-hot strong { color: var(--brand-primary); }
.is-dash-editing .dash-summary { opacity: 0.45; pointer-events: none; }

.widget-section + .widget-section { padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.widget-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; color: var(--text-sub); font-size: 12px; font-weight: 700; }
.widget-section .line-list a { padding: 8px 0; font-size: 13px; }
.widget-foot { color: var(--text-muted); font-size: 12px; font-weight: 600; text-align: right; }
.widget-foot:hover { color: var(--brand-primary); }

/* 내 정보: 한 줄 */
.profile-widget { align-items: stretch; padding: 14px 16px; text-align: left; }
.profile-widget-link { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text-main); }
.profile-widget-link > .icon { flex: none; color: var(--text-disabled); }
.profile-widget-text { display: grid; flex: 1; min-width: 0; text-align: left; }
.profile-widget-name { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.profile-widget-dept { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-widget-link:hover .profile-widget-name { color: var(--brand-primary); }

/* 메모 위젯 */
.memo-add { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-muted); cursor: pointer; }
.memo-add:hover { background: var(--bg-subtle); color: var(--brand-primary); }
.memo-add .icon { width: 18px; height: 18px; }
.memo-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.memo-list:empty { display: none; }
.memo-note { display: grid; gap: 4px; padding: 10px 12px 8px; border-radius: 10px; background: #e1efdc; }
.memo-note.is-yellow { background: #fbf1c9; }
.memo-note.is-blue { background: #dde9f8; }
.memo-note.is-pink { background: #f9e0e4; }
.memo-note textarea { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: #2b3440; font: inherit; font-size: 13px; line-height: 1.55; resize: none; outline: none; }
.memo-note textarea::placeholder { color: rgba(43, 52, 64, 0.45); }
.memo-note footer { display: flex; align-items: center; gap: 6px; min-height: 22px; color: rgba(43, 52, 64, 0.55); font-size: 11px; }
.memo-note time { font-variant-numeric: tabular-nums; }
.memo-state { flex: 1; }
.memo-tool { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: rgba(43, 52, 64, 0.5); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.memo-note:hover .memo-tool, .memo-note:focus-within .memo-tool { opacity: 1; }
.memo-tool:hover { background: rgba(255, 255, 255, 0.6); color: #2b3440; }
.memo-tool .icon { width: 13px; height: 13px; }
.memo-tool i { width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; }

/* ───────── 보고 ───────── */
.report-side-note { margin: auto 4px 0; padding-top: 12px; border-top: 1px solid var(--border-subtle); line-height: 1.6; }
.report-table .col-kind { width: 84px; }
.report-table .col-state { width: 110px; text-align: center; }
.report-line { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-subtle); }
.report-line.is-view { margin-bottom: 24px; }
.report-line-row { display: flex; align-items: flex-start; gap: 12px; }
.report-line-row > .approval-cc, .report-line-row > .report-people { flex: 1; }
.report-line-label { display: grid; flex: 0 0 110px; gap: 1px; padding-top: 5px; font-size: 13px; }
.report-line-label small { color: var(--muted); font-size: 11px; }
.report-line-label .req { color: var(--state-danger); }
.report-line .field-hint { margin: 0; }
.approval-chip-remove { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.approval-chip-remove:hover { background: var(--bg-muted); color: #dc2626; }
.report-people { display: flex; flex-wrap: wrap; gap: 6px; }
.report-person { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: 999px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; }
.report-person em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; }
.report-person.is-read em { color: var(--brand-primary); }
.report-person.is-done { border-color: transparent; background: var(--state-success-tint); }
.report-person.is-done em { color: var(--state-success); font-weight: 700; }
.report-confirm { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 12px; margin-top: 8px; padding: 16px; border: 1px solid var(--brand-primary); border-radius: 12px; background: var(--brand-primary-tint); }
.report-confirm strong { font-size: 14px; }
.report-confirm p { margin: 2px 0 0; color: var(--text-sub); font-size: 12px; }
.report-confirm textarea { resize: vertical; min-height: 44px; }
.report-confirmed { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--state-success); font-size: 13px; font-weight: 600; }
.report-confirmed .icon { width: 16px; height: 16px; }

/* 상단 메뉴가 11개(보고 추가)라 좁은 화면에서는 간격을 줄이고, 더 좁으면 아이콘을 뺀다. */
@media (max-width: 1600px) {
    .gnb-inner { gap: 16px; padding: 0 24px; }
    .gnb-item { gap: 5px; padding: 0 9px; font-size: 14px; }
    .gnb-item .icon { width: 16px; height: 16px; }
    .gnb-item.is-current::after { right: 9px; left: 9px; }
}
@media (max-width: 1420px) {
    .gnb-item .icon { display: none; }
    .gnb-item { padding: 0 10px; }
}

.report-presets { padding-top: 10px; border-top: 1px dashed var(--border-default); }
.report-presets .input { flex: 1 1 180px; width: auto; }
.report-presets-gap { flex: 0 0 12px; }

/* 댓글 첨부·수정 (게시판) */
.comment-box footer { align-items: center; justify-content: space-between; gap: 8px; }
.comment-attach-tools { display: inline-flex; align-items: center; gap: 4px; }
.comment-attach-tools .link-button { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.comment-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.comment-box .comment-files { margin: 0; padding: 0 12px 10px; }
.comment-file { display: inline-flex; align-items: center; gap: 6px; max-width: 320px; height: 28px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-subtle); color: var(--ink); font-size: 12px; }
a.comment-file:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.comment-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-file em { flex: none; color: var(--muted); font-size: 11px; font-style: normal; }
.comment-file .icon { flex: none; }
.comment-edit { margin: 6px 0 0; }
.comment-edited { color: var(--muted); font-size: 11px; }
.comment-actions { display: flex; flex: none; align-items: center; gap: 2px; }
/* 삭제는 form 안 버튼이라 [수정]과 같은 줄·같은 크기로 맞춘다. */
.comment-actions form { display: inline-flex; margin: 0; }
.comment-actions .link-button { display: inline-flex; align-items: center; height: 24px; margin: 0; padding: 0 6px; font: inherit; font-size: 12px; line-height: 1; }

/* 홈 메일 위젯 */
.widget-section h3 a { color: inherit; }
.widget-section h3 a:hover { color: var(--brand-primary); }
.mail-lines .mail-line-from { flex: 0 0 84px; overflow: hidden; color: var(--text-sub); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mail-lines .is-unread .line-title, .mail-lines .is-unread .mail-line-from { color: var(--text-main); font-weight: 700; }
