/* ============================================================
   Storage Seeker — Neuracle Science Design System
   ============================================================ */

:root {
    /* Brand Colors */
    --color-primary:        #D5224F;
    --color-primary-hover:  #b91c42;
    --color-primary-dark:   #900023;
    --color-primary-bg:     #fff5f7;
    --color-primary-border: #EBB4C2;

    /* Pink Tones */
    --color-pink-light:     #F6EDEF;
    --color-pink-mid:       #EBB4C2;

    /* Neutral */
    --color-text:           #333333;
    --color-text-sub:       #666666;
    --color-text-muted:     #999999;
    --color-border:         #e8e8e8;
    --color-border-light:   #f0f0f0;
    --color-bg:             #f7f7f8;
    --color-surface:        #ffffff;

    /* Sidebar — v3 Editorial Minimal Direction B: 다크 톤 (#0e0a0c) + 크림슨 액센트 */
    --color-sidebar-bg:     #0e0a0c;
    --color-sidebar-text:   rgba(255,255,255,0.6);
    --color-sidebar-active: rgba(213,34,79,0.18);
    --color-sidebar-hover:  rgba(255,255,255,0.06);
    --color-sidebar-border: rgba(255,255,255,0.08);

    /* Nav Icon Colors */
    --icon-dashboard:       #ff6b8a;
    --icon-consumables:     #10b981;
    --icon-equipment:       #818cf8;
    --icon-pipette:         #fbbf24;
    --icon-favorites:       #fbbf24;
    --icon-export:          #a78bfa;
    --icon-settings:        #94a3b8;

    /* Status Colors */
    --status-ok-bg:         #ecfdf5;
    --status-ok-text:       #065f46;
    --status-low-bg:        #fffbeb;
    --status-low-text:      #92400e;
    --status-empty-bg:      #fef2f2;
    --status-empty-text:    #991b1b;
    --status-check-bg:      #eff6ff;
    --status-check-text:    #1e40af;

    /* Legacy aliases (used in templates) */
    --primary:          var(--color-primary);
    --primary-dark:     var(--color-primary-dark);
    --primary-light:    #ff7fa0;
    --bg:               var(--color-bg);
    --bg-card:          var(--color-surface);
    --text:             var(--color-text);
    --text-light:       var(--color-text-sub);
    --border:           var(--color-border);
    --green:            #10b981;
    --green-bg:         #ecfdf5;
    --yellow:           #f59e0b;
    --yellow-bg:        #fffbeb;
    --red:              #ef4444;
    --red-bg:           #fef2f2;
    --blue:             #6366f1;
    --blue-bg:          #eff6ff;

    /* Typography */
    --font-ko:      'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --font-en:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', 'Noto Sans KR', system-ui, sans-serif;
    --font-body:    'Inter', 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Storage Seeker v3 토큰 (Editorial Minimal) — 점진적 도입용 */
    --c-primary:        #D5224F;
    --c-primary-light:  #fff5f7;
    --c-primary-mid:    #EBB4C2;
    --c-text:           #0a0a0a;
    --c-text-sub:       #666;
    --c-text-muted:     #999;
    --c-bg:             #ffffff;
    --c-bg-soft:        #f7f7f7;
    --c-divider:        #f0f0f0;

    /* iOS safe-area (노치/홈 인디케이터) */
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top:    env(safe-area-inset-top, 0px);

    /* Layout */
    --sidebar-width: 220px;
    --topbar-height: 60px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 4px rgba(0,0,0,0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* iOS Safari 의 highlight tap 색 제거 — 깜빡임 방지 */
    -webkit-tap-highlight-color: transparent;
}

html, body {
    /* iOS 부드러운 관성 스크롤. 모든 스크롤 컨테이너에 상속 */
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-ko);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    font-size: 13px;
}

/* ============================================================
   v3 Mobile Optimization Layer
   - 7가지 모바일/iOS 가이드라인을 한 곳에 정리
   ============================================================ */

/* (6) 버튼류 텍스트 선택 방지 (PC/모바일 공통) */
button, .btn, .nav-item, .topbar-btn, .bottom-tab,
.bottom-nav-item, .mobile-action-btn,
.btn-fav-toggle, .btn-remove, .fav-modal-close,
.mobile-action-close-btn {
    -webkit-user-select: none;
    user-select: none;
}
/* (3) 모바일 터치 영역 최소 44×44px — Apple HIG (모바일만 적용) */
@media (max-width: 768px) {
    button, .btn, .nav-item, .topbar-btn, .bottom-tab,
    .bottom-nav-item, .mobile-action-btn,
    .fav-modal-close, .mobile-action-close-btn {
        min-height: 44px;
    }
    /* 작은 인라인 토글(★/체크박스 등)은 별도 — 부모 셀로 영역 확보 */
}

/* input 류는 텍스트 선택 허용 */
input.input, textarea.input, select.input,
input[type="text"], input[type="email"], input[type="number"],
input[type="search"], input[type="password"], input[type="tel"],
input[type="url"], input[type="date"], input[type="time"], textarea {
    -webkit-user-select: text;
    user-select: text;
}
/* iOS Safari 줌인 방지 — 모바일에서만 폰트 16px 이상 강제
   (PC 는 디자인 그대로 두기 위해 미디어 쿼리로 분리) */
@media (max-width: 768px) {
    input.input, textarea.input, select.input,
    input[type="text"], input[type="email"], input[type="number"],
    input[type="search"], input[type="password"], input[type="tel"],
    input[type="url"], input[type="date"], input[type="time"], textarea {
        font-size: 16px;
    }
}

/* 체크박스는 작게 유지하되 부모 영역으로 44px 확보 */
input.row-check, input.export-row-check, input.export-select-all,
input.btn-fav-toggle, input[type="checkbox"] {
    width: 18px; height: 18px;
    min-width: 18px; min-height: 18px;
    -webkit-user-select: none;
    user-select: none;
}

/* (4) iOS 관성 스크롤 */
.table-scroll, .mobile-list-container, .fav-modal-body,
.mobile-action-body, .preview-area, .cal-grid {
    -webkit-overflow-scrolling: touch;
}

/* (5) 좁은 화면에서 아이콘/배지/버튼 찌그러짐 방지 */
.btn, .badge, .mobile-item-icon, .dash-quick-icon,
.cal-cat-dot, .cal-notice-badge, .fav-indicator,
.cal-meta-badge, .logo-mark, .nav-icon,
.mobile-nav-icon, .bottom-tab-icon, .selection-count,
.checkbox-label, .col-check, .col-fav, .col-action {
    flex-shrink: 0;
}
/* 텍스트 영역은 반대로 축소 허용 + min-width:0 */
.mobile-item-body, .mobile-item-name, .mobile-item-sub,
.cal-detail-info, .cal-detail-title, .fav-modal-target,
.cal-notice-left {
    min-width: 0;
}

/* (7) iOS Safari safe-area — 하단 탭바/플로팅바 노치 영역 회피 */
.bottom-nav, .mobile-bottom-nav,
.mobile-action-sheet .mobile-action-body {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
.mobile-action-handle ~ #mobile-action-btns {
    /* 액션시트 내부 콘텐츠는 그대로 두고 close-btn 영역만 safe-area 처리 */
}

/* ============================================================
   Sidebar Navigation
   ============================================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    /* v3 Direction B 다크 톤 */
    border-right: 1px solid var(--color-sidebar-border);
}

.sidebar-header {
    padding: 22px 18px 18px;
    border-bottom: 1px solid var(--color-sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    /* 다크 사이드바 — 로고를 흰색 처리 */
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.logo-brand-wrap {
    line-height: 1.15;
}

.logo-brand {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.logo-sub {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
}

.nav-menu {
    list-style: none;
    padding: 10px 10px;
    flex: 1;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    min-height: 38px;
    margin-bottom: 2px;
    font-family: var(--font-body);
}

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

.nav-link.active {
    background: var(--color-sidebar-active);
    color: #ffffff;
    border-left-color: var(--c-primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* 다크 사이드바에서 메뉴 SVG 아이콘은 currentColor 따라 흰 톤 */
.nav-link svg {
    flex-shrink: 0;
    vertical-align: middle;
    color: currentColor;
    stroke: currentColor;
}
.nav-link svg [fill]:not([fill="none"]) { fill: currentColor; }
.nav-link svg [stroke]:not([stroke="none"]) { stroke: currentColor; }

.nav-link.active .nav-icon {
    opacity: 1;
}

/* ============================================================
   Sidebar — User Section & Footer
   ============================================================ */

.sidebar-user {
    padding: 10px 14px 0;
    border-top: 1px solid var(--color-sidebar-border);
}

.sidebar-user-label {
    display: block;
    font-size: 10px;
    color: var(--c-text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.sidebar-user .select {
    width: 100%;
    font-size: 12px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    color: var(--c-text);
    border-radius: 6px;
    padding: 6px 9px;
}

.sidebar-user .select option {
    background: #ffffff;
    color: var(--c-text);
}

.sidebar-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--color-sidebar-border);
}

/* ── Sidebar pin toggle */
.sidebar-pin-row {
    padding: 8px 10px 12px;
    border-top: 1px solid var(--color-sidebar-border);
}
.sidebar-pin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--color-sidebar-text);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.12s, color 0.12s;
}
.sidebar-pin-btn:hover {
    background: var(--color-sidebar-hover);
    color: rgba(255,255,255,0.9);
}
.sidebar-pin-icon {
    flex-shrink: 0;
    transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.refresh-time {
    font-size: 10px;
    color: var(--c-text-muted);
    margin-top: 6px;
}

/* ============================================================
   Top Bar
   ============================================================ */

.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: #ffffff;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 90;
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 0;
}

/* v3 — 상단바 중앙 검색 */
.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}
.v3-topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f7f7;
    padding: 7px 14px;
    border-radius: 8px;
    width: 360px;
    max-width: 100%;
    transition: background 0.12s, box-shadow 0.12s;
}
.v3-topbar-search:focus-within {
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--c-divider) inset, 0 1px 4px rgba(0,0,0,0.04);
}
.v3-topbar-search-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--c-text-muted);
}
.v3-topbar-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--c-text);
}
.v3-topbar-search-input::placeholder { color: var(--c-text-muted); }
.v3-topbar-search-kbd {
    padding: 1px 6px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 10px;
    color: var(--c-text-muted);
    font-family: var(--font-display);
    flex-shrink: 0;
}

/* v3 — Topbar 컴포넌트 정돈 */
.v3-topbar-refresh-label { color: var(--c-text-muted); }
.v3-topbar-refresh-time { color: var(--c-text); font-weight: 500; text-transform: none; letter-spacing: 0; font-family: var(--font-mono); font-size: 11px; }

/* Sheets 상태 칩 */
.v3-sheets-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--c-text-sub);
}
.v3-sheets-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

/* 사용자 칩 (아바타 + 이름) */
.v3-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--c-text);
    max-width: 160px;
}
.v3-user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.v3-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.v3-topbar-btn { padding: 5px 11px; font-size: 12px; }

/* v3 — Topbar 설정 아이콘 버튼 */
.v3-topbar-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.v3-topbar-settings-btn:hover {
    background: var(--c-bg-soft);
    color: var(--c-text);
}
.v3-topbar-settings-btn:active {
    background: var(--c-border);
}

/* v3 — Topbar 브랜드 (로고 + Storage Seeker / NEURACLE 워드마크) */
.v3-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: 6px;
    transition: opacity 0.12s, background 0.12s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.v3-topbar-brand:hover { opacity: 0.85; }
.v3-topbar-brand:active { opacity: 0.7; background: var(--c-bg-soft); }
.v3-topbar-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.v3-topbar-wordmark {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
    font-family: var(--font-display);
}
.v3-topbar-wordmark strong {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: 0.2px;
}
.v3-topbar-wordmark em {
    font-style: normal;
    font-size: 9px;
    font-weight: 500;
    color: var(--c-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.v3-topbar-refresh-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-text-muted);
    margin-left: 12px;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

/* v3 — 사용자 칩 드롭다운 (▾ 메뉴) */
.v3-user-chip-wrap { position: relative; display: inline-block; }
.v3-user-chip {
    cursor: pointer;
    font-family: var(--font-body);
    padding: 3px 10px 3px 3px;
}
.v3-user-chevron {
    font-size: 10px;
    color: var(--c-text-muted);
    flex-shrink: 0;
    margin-left: 2px;
}
.v3-user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--c-divider);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 6px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.v3-user-menu[hidden] { display: none; }
.v3-user-menu button, .v3-user-menu a {
    background: none;
    border: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--c-text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    display: block;
}
.v3-user-menu button:hover, .v3-user-menu a:hover {
    background: var(--c-bg-soft);
}

/* v3 — 페이지 안 인라인 Sheets 칩 (Hero 아래, 안내문 대체) */
.v3-sheets-chip-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--c-text-sub);
}
.v3-sheets-chip-inline .v3-sheets-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

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

.topbar-user-select {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 6px;
    min-width: 0;
    width: auto;
    max-width: 140px;
}

.topbar-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.topbar-user-name {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

/* ============================================================
   Main Content
   ============================================================ */

.content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 32px;
    width: calc(100vw - var(--sidebar-width));
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.page-header {
    margin-bottom: 24px;
    padding-top: 28px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.page-desc {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.data-status-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.notice-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--c-divider);
    background: var(--c-bg-soft);
    color: var(--c-text-sub);
}

.notice-chip strong { font-weight: 600; color: var(--c-text); }

/* v3 — 상태 점만 색상 액센트로 (배경/보더는 미니멀 회색 유지) */
.notice-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-text-muted);
    flex-shrink: 0;
}
.notice-info::before    { background: var(--blue); }
.notice-warning::before { background: var(--yellow); }
.notice-muted::before   { background: var(--c-text-muted); }

/* ============================================================
   Cards
   ============================================================ */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    /* v3 Editorial Minimal — 그림자 최소, 라인 디바이더 우선 */
    box-shadow: none;
    border: 1px solid var(--c-divider);
    margin-bottom: 14px;
    min-width: 0;
    overflow: hidden;
}

.card-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--c-text);
    letter-spacing: -0.2px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.card-info {
    background: var(--c-primary-light);
    border: 1px solid var(--c-primary-mid);
    border-left: 4px solid var(--c-primary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.summary-card {
    text-align: center;
    border-top: 3px solid var(--c-primary);
}

.summary-card.card-green  { border-top-color: var(--green); }
.summary-card.card-yellow { border-top-color: var(--yellow); }
.summary-card.card-red    { border-top-color: var(--red); }

.card-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1;
    letter-spacing: -0.8px;
}

.card-label {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-top: 4px;
}

/* ============================================================
   Search Panel
   ============================================================ */

.search-panel {
    padding: 12px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    box-shadow: none;
}

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

.search-input-wrap {
    flex: 2;
    min-width: 120px;
}

.input {
    width: 100%;
    /* box-sizing 명시 — input 의 native padding/border 가 부모 폭을 넘어
       우측이 잘리던 버그 해결 (PC 모달 date/time input 우측 잘림). */
    box-sizing: border-box;
    max-width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--color-text);
    background: #fff;
    font-family: var(--font-ko);
    transition: border-color 0.15s;
    outline: none;
}

.input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(213,34,79,0.08);
}

/* iOS Safari + Chrome 의 input[type=date|time] 은 native UI 가 padding/
   indicator 를 자체 추가해서 width: 100% 안에 들어가지 않고 우측이 잘림.
   -webkit-appearance: none 으로 native styling 제거 + 명시적 min-height
   로 일관된 크기 유지. font-size 16px 미만이면 iOS 가 입력 시 자동 zoom
   하므로 16px 보장. */
.input[type="date"],
.input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #fff;
    /* native indicator 아이콘이 차지하던 우측 공간을 회수 */
    padding-right: 12px;
    display: block;
}

.select {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* ============================================================
   Selection Toolbar
   ============================================================ */

/* v3 — Floating Action Bar 스타일 (위치는 기존 sticky-top 그대로) */
.selection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #0a0a0a;
    color: #fff;
    border: 1px solid #0a0a0a;
    border-radius: 14px;
    margin-bottom: 8px;
}
.selection-toolbar .checkbox-label {
    color: rgba(255,255,255,0.85);
}
.selection-toolbar .checkbox-label input[type="checkbox"] {
    accent-color: var(--c-primary);
}
.selection-toolbar .selection-count {
    background: var(--c-primary);
    color: #fff;
    border-radius: 100px;
    padding: 2px 10px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
}
/* 검정 배경 위에서는 outline 버튼이 흰 보더로 보여야 함 */
.selection-toolbar .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}
.selection-toolbar .btn-outline:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}
.selection-toolbar .btn-primary {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}
.selection-toolbar .btn-primary:hover {
    background: rgba(255,255,255,0.2);
}
/* .btn-accent (크림슨 강조 액션) 는 검정 위에서도 시각 위계 유지 */
.selection-toolbar .btn-accent {
    border-color: var(--c-primary);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.selection-count {
    font-size: 12px;
    color: var(--color-text-sub);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-ko);
}

/* v3 — 기본 CTA: 검정 (메인 UI 흑백). 크림슨은 강조용 .btn-accent 로 분리 */
.btn-primary {
    background: var(--c-text);
    color: #fff;
    border: 1px solid var(--c-text);
}

.btn-primary:hover {
    background: #000;
    border-color: #000;
}

/* 강조 CTA (구글 폼 주문, 즐겨찾기 추가 등 핵심 액션) */
.btn-accent {
    background: var(--c-primary);
    color: #fff;
    border: 1px solid var(--c-primary);
}
.btn-accent:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* Outline — 흰 배경 + 회색 보더 (v3 미니멀) */
.btn-outline {
    background: #ffffff;
    color: var(--c-text);
    border: 1px solid var(--c-divider);
}

.btn-outline:hover {
    background: var(--c-bg-soft);
    border-color: var(--c-text-muted);
    color: var(--c-text);
}

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

.btn-remove {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
}

.btn-remove:hover {
    background: var(--red-bg);
}

.btn-edit {
    background: none;
    border: none;
    color: var(--c-text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 3px 7px;
    border-radius: 4px;
    line-height: 1;
}
.btn-edit:hover { background: #f0f0f0; color: #0a0a0a; }

.cal-detail-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* ============================================================
   Data Table
   ============================================================ */

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

.table-scroll {
    overflow: auto;
    width: 100%;
    max-height: calc(100vh - 260px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-pink-mid) var(--color-border);
}

.table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: var(--color-border); border-radius: 4px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--color-pink-mid); border-radius: 4px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }
.table-scroll::-webkit-scrollbar-corner { background: var(--color-border); }

.data-table {
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #888888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
    overflow: visible;
}

.data-table th .resize-handle {
    position: absolute;
    right: -3px;
    top: 0;
    bottom: 0;
    width: 7px;
    cursor: col-resize;
    z-index: 3;
}

.data-table th .resize-handle:hover,
.data-table th .resize-handle:active {
    background: var(--color-primary);
    opacity: 0.4;
}

.data-table tbody tr:hover td {
    background: #fafafa;
}
.data-table tbody tr[data-index] {
    cursor: pointer;
}

.data-table code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--color-primary-dark);
    font-family: var(--font-mono);
}

.col-check  { width: 40px; text-align: center !important; padding: 10px 4px !important; overflow: hidden !important; }
.col-action { width: 50px; text-align: center !important; padding: 10px 4px !important; }

.loading,
.empty {
    text-align: center;
    color: var(--color-text-sub);
    padding: 2rem !important;
}

/* 스켈레톤 로딩 */
.skeleton-row td { padding: 10px 16px !important; }

.skeleton-bar {
    height: 14px;
    background: linear-gradient(90deg, var(--color-border) 25%, #eeeeee 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s 4;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.results-info {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-bottom: 10px;
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green  { background: var(--status-ok-bg);    color: var(--status-ok-text); }
.badge-yellow { background: var(--status-low-bg);   color: var(--status-low-text); }
.badge-red    { background: var(--status-empty-bg); color: var(--status-empty-text); }
.badge-blue   { background: var(--status-check-bg); color: var(--status-check-text); }

/* legacy names */
.badge-ok    { background: var(--status-ok-bg);    color: var(--status-ok-text); }
.badge-low   { background: var(--status-low-bg);   color: var(--status-low-text); }
.badge-empty { background: var(--status-empty-bg); color: var(--status-empty-text); }
.badge-check { background: var(--status-check-bg); color: var(--status-check-text); }

/* ============================================================
   Export Page
   ============================================================ */

.column-select {
    margin-bottom: 14px;
    padding: 12px;
    background: #fafafa;
    border-radius: var(--radius);
}

.column-select-label {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-bottom: 7px;
}

.column-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.export-actions { text-align: center; }

.export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-area {
    min-height: 100px;
    overflow-x: auto;
}

.preview-area table {
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 7px;
}

.preview-area thead th {
    background: var(--color-primary);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.preview-area tbody tr:nth-child(odd) td  { background: #fdf0f3; }
.preview-area tbody tr:nth-child(even) td { background: #ffffff; }
.preview-area tbody td { padding: 9px 16px; border-bottom: 1px solid #f8f8f8; }

.preview-area h4 { color: var(--color-primary); margin-bottom: 7px; }

.empty-state {
    text-align: center;
    color: var(--color-text-sub);
    padding: 24px;
}

.empty-state a { color: var(--color-primary); }

/* ============================================================
   Settings Page
   ============================================================ */

.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-connected    { background: var(--status-ok-bg);  color: var(--status-ok-text); }
.status-disconnected { background: var(--status-low-bg); color: var(--status-low-text); }

.setup-guide {
    margin-top: 14px;
    padding: 14px;
    background: #fafafa;
    border-radius: var(--radius);
}

.setup-guide ol { padding-left: 20px; }
.setup-guide li { margin-bottom: 7px; font-size: 13px; }

.setup-guide pre {
    background: var(--color-sidebar-bg);
    color: rgba(255,255,255,0.85);
    padding: 12px;
    border-radius: var(--radius);
    margin-top: 7px;
    overflow-x: auto;
}

.setup-guide code { font-size: 12px; font-family: var(--font-mono); }

.detected-columns { margin-top: 7px; }

.column-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.column-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary-bg);
    color: var(--color-primary-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--color-primary-border);
}

/* ============================================================
   OAuth / Auth Settings
   ============================================================ */

.card-success {
    background: var(--status-ok-bg);
    border-left: 4px solid var(--green);
    color: var(--status-ok-text);
}

.auth-info-box {
    background: #fafafa;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 7px;
    font-size: 13px;
}

.auth-info-box p { margin-bottom: 4px; }

.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
}

.auth-tab {
    padding: 10px 18px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-sub);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    font-family: var(--font-ko);
}

.auth-tab:hover { color: var(--color-primary); }

.auth-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.auth-tab-content { display: none; padding-top: 14px; }
.auth-tab-content.active { display: block; }

.guide-desc {
    color: var(--color-text-sub);
    font-size: 13px;
    margin-bottom: 18px;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.step { display: flex; gap: 14px; align-items: flex-start; }

.step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.step-content { flex: 1; font-size: 13px; }
.step-content ol, .step-content ul { padding-left: 18px; margin-top: 7px; }
.step-content li { margin-bottom: 5px; }

.hint { font-size: 12px; color: var(--color-text-sub); margin-top: 7px; }

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 1px solid #dadce0;
    border-radius: var(--radius);
    background: #fff;
    color: #3c4043;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-family: var(--font-ko);
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.google-icon { flex-shrink: 0; }

.not-ready-box {
    padding: 14px;
    background: var(--status-low-bg);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 13px;
}

/* ============================================================
   Toast Notifications
   ============================================================ */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.toast {
    padding: 11px 16px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    /* v3 — 그림자 약하게, 라운드 통일 */
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    animation: slideIn 0.25s ease;
    max-width: 400px;
    letter-spacing: -0.1px;
}

/* v3 — 토스트 컬러: 검정 베이스 + 상태별 좌측 보더 액센트 (미니멀) */
.toast-success {
    background: #0a0a0a;
    border-left: 3px solid var(--green);
}
.toast-error {
    background: #0a0a0a;
    border-left: 3px solid var(--red);
}
.toast-warning {
    background: #0a0a0a;
    border-left: 3px solid var(--yellow);
}
.toast-info {
    background: #0a0a0a;
    border-left: 3px solid var(--c-text-muted);
}

@keyframes slideIn  { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ============================================================
   Favorites
   ============================================================ */

.col-fav { width: 44px; text-align: center; padding: 4px !important; overflow: hidden !important; }

.btn-fav {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    color: var(--yellow);
    transition: background 0.15s, transform 0.15s;
}

.btn-fav:hover { background: var(--status-low-bg); transform: scale(1.15); }
.btn-fav.is-fav { color: #d4a400; }

/* 연구노트 표 각 행의 즐겨찾기 토글 버튼 (★/☆) */
.btn-fav-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c9c9c9;
    transition: background 0.15s, transform 0.15s, color 0.15s;
}
.btn-fav-toggle:hover { background: var(--status-low-bg); transform: scale(1.15); }
.btn-fav-toggle.on { color: #d4a400; }
.btn-fav-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.35;
}
.btn-fav-toggle.disabled:hover { background: transparent; transform: none; }

/* 연구노트 표 — 부분 선택 toolbar + 체크박스 컬럼 */
.export-select-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    background: var(--color-primary-bg);
    border: 1px solid var(--color-primary-border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 13px;
}
.export-select-toolbar .selection-count {
    color: var(--color-text-sub);
}
#export-consumables-table .col-check,
#export-equipment-table .col-check {
    width: 56px;
    text-align: center;
    padding: 6px 4px !important;
    white-space: nowrap;
}
.export-row-check, .export-select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
}
.fav-indicator {
    color: #d4a400;
    font-size: 14px;
    margin-left: 2px;
    vertical-align: middle;
}

/* 관리자 사용량 경고 모달의 row */
.admin-usage-row {
    padding: 10px 12px;
    margin: 8px 0;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 6px;
}
.admin-usage-row-title {
    font-weight: 700;
    font-size: 13px;
    color: #b45309;
    margin-bottom: 3px;
}
.admin-usage-row-detail {
    font-size: 12px;
    color: #92400e;
    font-family: monospace;
}

/* Modal */
.fav-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* 모달 백드롭에서 배경 스크롤 차단 (모바일 줌/스크롤 충돌 방지) */
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 16px;
}
/* 모바일: 하단 탭바(82px) + status bar safe-area 영역을 비워두어
   모달이 가려지지 않게 함. backdrop 의 padding 안에서 모달이 중앙 정렬되므로
   자동으로 그 영역 위로 올라옴. */
@media (max-width: 768px) {
    .fav-modal-backdrop {
        padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px) + 16px);
    }
    /* 모바일: 상하 안전 영역 합(~200px) 빼고 모달 높이 명시.
       max-height % 가 부모 backdrop 의 padding 으로 계산이 어긋나 모달 위/
       아래가 잘리고 .fav-modal-body 스크롤이 안 먹던 버그 해결. */
    .fav-modal {
        max-height: calc(100vh - 200px);
        max-height: calc(100dvh - 200px);
    }
    .fav-modal-body {
        /* iOS 에서 overflow-y: auto + flex 자식의 스크롤 보장 */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

.fav-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    min-width: 0;
    max-width: 440px;
    width: 100%;
    /* iOS Safari 에서 max-height: 100% (% 기반) 는 flex parent 안에서 자식
       overflow-y: auto 가 작동 안 하는 버그가 있음. vh/dvh 로 명시해서 모달
       높이를 viewport 기준으로 고정하면 .fav-modal-body 의 스크롤이 정상 동작. */
    max-height: min(80vh, 640px);
    max-height: min(80dvh, 640px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fav-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-divider);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    flex-shrink: 0;
}

.fav-modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--c-text-muted);
}

.fav-modal-close:hover { color: var(--c-text); }

.fav-modal-body {
    padding: 16px;
    /* 모달 내용이 viewport 보다 길면 모달 안에서만 스크롤 */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
    flex: 1 1 auto;
}

.fav-modal-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--c-divider);
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.fav-modal-target {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--c-text);
    background: var(--c-bg-soft);
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    word-break: break-all;
}

.fav-modal-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-sub);
    margin-bottom: 4px;
    margin-top: 12px;
}

.fav-modal-user {
    padding: 7px 11px;
    background: var(--status-check-bg);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--status-check-text);
}

/* Favorites page layout */
.fav-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    align-items: start;
}

.fav-sidebar { position: sticky; top: 14px; }

.fav-side-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 7px;
}

.fav-new-project-row {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.fav-new-project-row .input { flex: 1; }

.fav-project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.fav-project-item {
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--c-text);
    border: 1px solid var(--c-divider);
    margin-bottom: 6px;
    font-size: 13px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: border-color 0.1s, background 0.1s;
}

.fav-project-item:hover {
    background: var(--c-bg-soft);
    border-color: var(--c-text-muted);
}

/* v3 — 활성 프로젝트는 검정 카드 (가이드 04번: 활성 프로젝트 검정 PC) */
.fav-project-active {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}
.fav-project-active:hover {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}
.fav-project-active .fav-project-name { color: #ffffff; }

.fav-empty {
    color: var(--c-text-muted);
    font-size: 12px;
    padding: 10px 12px;
    font-style: normal;
}

.fav-section-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: -0.1px;
    margin: 4px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border-light);
}

/* ============================================================
   Calendar
   ============================================================ */

.cal-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.cal-month-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
    min-width: 120px;
    text-align: center;
}
.cal-day-num {
    font-family: var(--font-display);
}
.cal-cell.cal-today .cal-day-num {
    font-family: var(--font-display);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--color-border-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.cal-day-header {
    background: #fafafa;
    text-align: center;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-sub);
    letter-spacing: 0.5px;
}

.cal-day-header:first-child { color: #ef4444; }
.cal-day-header:last-child  { color: #6366f1; }

.cal-cell {
    background: #fff;
    height: 90px;            /* 고정 — 일정 수와 무관하게 일정한 높이 */
    min-height: 90px;
    max-height: 90px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.1s;
    position: relative;
    overflow: hidden;        /* 초과 일정은 +N개 버튼으로 표시 */
    display: flex;
    flex-direction: column;
    min-width: 0;            /* 그리드 셀 너비 고정 보장 */
}
/* 그리드 컬럼도 명시적 1fr 고정 (텍스트 길이에 흔들리지 않음) */
.cal-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-cell:hover { background: #fafafe; }
.cal-cell.cal-empty { background: #fafafa; cursor: default; }

.cal-cell.cal-today {
    background: var(--color-primary-bg);
}

.cal-cell.cal-holiday {
    background: #fff5f5;
}
.cal-cell.cal-holiday.cal-company:not(.cal-today) {
    background: #ecfdf5;
}
.cal-cell.cal-holiday.cal-today {
    background: var(--color-primary-bg);
}
.cal-holiday-name {
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-holiday-name.cal-company-name {
    color: #0a7;
}

.cal-cell.cal-today .cal-day-num {
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-num {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cal-dots {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-event-chip {
    font-size: 10px;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.cal-event-more {
    font-size: 10px;
    color: var(--color-primary);
    background: none;
    border: none;
    padding: 0 5px;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    font-family: inherit;
}
.cal-event-more:hover { text-decoration: underline; }

/* ============================================================
   대시보드 섹션 접기/펼치기
   ============================================================ */
.dash-section-header {
    cursor: pointer;
    user-select: none;
}
.dash-section-header:hover { background: rgba(0,0,0,0.02); }
.dash-section-toggle {
    display: inline-block;
    width: 14px;
    font-size: 11px;
    color: var(--color-text-muted);
    transition: transform 0.15s;
    margin-right: 4px;
}
.dash-collapsible.collapsed .dash-section-body { display: none; }
.dash-collapsible.collapsed .dash-section-toggle { color: var(--color-primary); }
.cal-dots {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

/* Day detail panel */
.cal-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.cal-detail-item:last-child { border-bottom: none; }

.cal-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.cal-detail-info { flex: 1; }

.cal-detail-title {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-detail-time {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-top: 2px;
}

.cal-detail-desc {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-top: 4px;
    white-space: pre-line;
}

.cal-detail-author {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 4px;
}


.cal-notice-item.cal-notice-important {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}
.cal-notice-item.cal-notice-important .cal-notice-content,
.cal-notice-item.cal-notice-important .cal-notice-meta,
.cal-notice-item.cal-notice-important .cal-notice-meta span {
    color: rgba(255,255,255,0.7);
}
.cal-notice-item.cal-notice-important strong { color: #fff; }
.cal-notice-item.cal-notice-important .btn-remove {
    color: rgba(255,255,255,0.6);
}
.cal-notice-item.cal-notice-important .btn-remove:hover { color: #fff; }

.cal-notice-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 공지 중요 토글 별 버튼 */
.cal-notice-star-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    margin-right: 4px;
    color: #c9c9c9;
    vertical-align: middle;
}
.cal-notice-star-btn.on { color: #ef4444; cursor: pointer; }
.cal-notice-star-btn:hover { opacity: 0.7; }

/* 일정 메타 뱃지 (반복/알림) */
.cal-meta-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}
.cal-repeat-badge {
    background: #ede9fe;
    color: #6d28d9;
}
.cal-notify-badge {
    background: #fef3c7;
    color: #b45309;
}

.cal-notice-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

.cal-notice-content {
    font-size: 12px;
    color: var(--color-text-sub);
    margin-top: 4px;
    white-space: pre-line;
}

.cal-notice-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: auto;  /* 카드 하단 정렬 (가로 스크롤 카드의 footer 역할) */
}
.cal-notice-meta span { white-space: nowrap; }

.cal-setup-guide {
    padding: 16px;
    background: var(--color-primary-bg);
    border: 1px solid var(--color-primary-border);
    border-radius: var(--radius);
}

.cal-setup-guide ol {
    padding-left: 20px;
    margin: 10px 0;
}

.cal-setup-guide li {
    margin-bottom: 6px;
    font-size: 13px;
}

.cal-setup-guide code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: var(--font-mono);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .fav-layout { grid-template-columns: 1fr; }
    .fav-sidebar { position: static; }
}

/* ============================================================
   Mobile Responsive (prototype-based)
   ============================================================ */

/* -- Mobile-only elements: hidden on desktop -- */
.mobile-bottom-nav { display: none; }
.mobile-list-container { display: none; }
.mobile-section-title { display: none; }
.mobile-more-menu { display: none; }
.mobile-action-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 310;
    visibility: hidden;
    pointer-events: none;
}
/* 바텀시트 .open 상태 — 모바일·PC 공통 */
.mobile-action-sheet.open {
    visibility: visible;
    pointer-events: auto;
}
.mobile-action-sheet .mobile-action-dim {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.46);
    opacity: 0;
    transition: opacity 0.22s;
}
.mobile-action-sheet.open .mobile-action-dim { opacity: 1; }
/* PC: 드래그 핸들 숨김 (모바일 미디어쿼리에서 복원) */
.mobile-action-handle { display: none; }
/* PC: 항목 클릭 시 화면 중앙 다이얼로그 */
@media (min-width: 769px) {
    .mobile-action-body {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 440px;
        max-width: min(92vw, 520px);
        max-height: min(82vh, 700px);
        background: #fff;
        border-radius: 18px;
        padding: 20px 0 28px;
        overflow-y: auto;
        transform: translate(-50%, -48%) scale(0.95);
        opacity: 0;
        transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                    opacity 0.18s ease;
        box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
    }
    .mobile-action-sheet.open .mobile-action-body {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}
/* ─── Action sheet content styles — global (PC + mobile) ──────────────────── */
.mobile-action-info {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--c-divider);
}
.mobile-action-info-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: -0.3px;
}
.mobile-action-info-sub {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 4px;
}
.mobile-action-details {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mobile-action-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    line-height: 1.4;
}
.mobile-action-detail-label {
    color: #777;
    flex-shrink: 0;
    min-width: 70px;
}
.mobile-action-detail-value {
    color: #222;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.mobile-action-close-btn { display: none !important; }
.mobile-action-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    flex: none;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    padding: 0;
    border-radius: 50%;
    background: var(--c-bg-soft);
    border: none;
    font-size: 16px;
    line-height: 1;
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-family: inherit;
}
.mobile-action-close-x:active { background: var(--c-divider); }
.mobile-action-toprow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.mobile-action-cat-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #0a0a0a;
    color: #fff;
    text-transform: uppercase;
}
.mobile-action-brand {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 0.3px;
}
.mobile-action-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--c-divider);
    border-bottom: 1px solid var(--c-divider);
}
.mobile-action-metric { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mobile-action-metric-label {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.mobile-action-metric-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: -0.5px;
    line-height: 1;
    word-break: break-word;
}
.mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: calc(100% - 32px);
    margin: 8px 16px;
    padding: 14px;
    background: var(--c-bg-soft);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
.mobile-action-btn:active { background: var(--c-divider); }
.mobile-action-btn-primary { background: #0a0a0a !important; }
.mobile-action-btn-primary:active { background: #1f1f1f !important; }
.mobile-action-btn-primary .mobile-action-btn-label,
.mobile-action-btn-primary .mobile-action-btn-desc { color: #fff !important; }
.mobile-action-btn-primary .mobile-action-btn-icon {
    background: rgba(255,255,255,0.12) !important;
    color: #fff;
}
.mobile-action-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.mobile-action-btn-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: -0.1px;
}
.mobile-action-btn-desc {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.dash-hero { display: none; }
.dash-alert { display: none; }

/* ============================================================
   Dashboard Direction B — PC styles (모바일은 미디어쿼리에서 override)
   ============================================================ */
/* 콘텐츠 — 대시보드 페이지는 사이드바 숨기고 풀 폭 사용 (PC + 모바일 공통).
   사용자 요구: 와이드/패드 모두 최대 너비에 맞게 (고정비율 X).
   좌우 padding 은 clamp 로 화면 폭에 비례 (24~80px). */
body.page-index .sidebar { display: none !important; }
body.page-index .topbar { left: 0; }
body.page-index .content {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 80px clamp(24px, 5vw, 80px) 32px;
}

/* ============================================================
   Mini sidebar — 비-대시보드 페이지: 최소화 + 호버 펼침
   (사용자 요청: 다른 페이지로 이동 시 사이드바 최소화, 접었다 펼 수 있게)
   - 기본 60px (로고 + 메뉴 아이콘만)
   - 호버 시 220px 로 확장 (텍스트 노출)
   - 콘텐츠는 항상 60px 기준 마진 — 호버 시 사이드바가 콘텐츠 위로 떠 있음 (overlay)
   ⚠ PC 전용 — 모바일에선 .sidebar { display:none } 이 우선이고,
      .content margin-left: 60px 가 적용되면 콘텐츠가 우측으로 밀려 잘림.
      따라서 min-width:769px 안에서만 정의. */
@media (min-width: 769px) {
    body.has-sidebar-mini .sidebar {
        width: 60px;
        transition: width 0.22s cubic-bezier(0.32, 0.72, 0, 1);
        overflow: hidden;
        z-index: 110;
    }
    body.has-sidebar-mini .sidebar:hover {
        width: 220px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }
    body.has-sidebar-mini .sidebar-header {
        padding: 22px 14px 18px;
        gap: 10px;
        justify-content: flex-start;
    }
    body.has-sidebar-mini .logo-brand-wrap {
        opacity: 0;
        transition: opacity 0.15s;
        white-space: nowrap;
    }
    body.has-sidebar-mini .sidebar:hover .logo-brand-wrap { opacity: 1; }
    body.has-sidebar-mini .nav-menu { padding: 10px 8px; }
    body.has-sidebar-mini .nav-link {
        padding: 10px 12px;
        gap: 14px;
        border-radius: 0 8px 8px 0;
    }
    body.has-sidebar-mini .nav-text {
        opacity: 0;
        transition: opacity 0.15s;
        white-space: nowrap;
    }
    body.has-sidebar-mini .sidebar:hover .nav-text { opacity: 1; }
    /* 콘텐츠 + topbar 는 mini 폭 기준 — 호버해도 콘텐츠는 안 움직임 (overlay) */
    body.has-sidebar-mini .topbar { left: 60px; }
    body.has-sidebar-mini .content {
        margin-left: 60px;
        width: calc(100vw - 60px);
    }

    /* ── 고정 상태 — sidebar 220px, content/topbar 이동 */
    body.has-sidebar-mini.sidebar-pinned .sidebar { width: 220px; }
    body.has-sidebar-mini.sidebar-pinned .sidebar:hover { box-shadow: none; }
    body.has-sidebar-mini.sidebar-pinned .logo-brand-wrap { opacity: 1; }
    body.has-sidebar-mini.sidebar-pinned .nav-text { opacity: 1; }
    body.has-sidebar-mini.sidebar-pinned .sidebar-pin-icon { transform: scaleX(-1); }
    body.has-sidebar-mini.sidebar-pinned .topbar { left: 220px; }
    body.has-sidebar-mini.sidebar-pinned .content {
        margin-left: 220px;
        width: calc(100vw - 220px);
    }

    /* 토글 클릭 시 부드러운 전환 (초기 로드 시엔 미적용) */
    body.sidebar-ready.has-sidebar-mini .topbar {
        transition: left 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    }
    body.sidebar-ready.has-sidebar-mini .content {
        transition: margin-left 0.22s cubic-bezier(0.32, 0.72, 0, 1), width 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    }
}

/* 공통 섹션 헤더 (eyebrow + 우측 링크) */
.db-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.db-section-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1.5px;
    font-weight: 500;
    text-transform: uppercase;
}
.db-section-link {
    font-size: 11px;
    color: var(--c-text-sub);
    font-weight: 500;
    text-decoration: none;
}
.db-section-link:hover { color: var(--c-text); }

/* 공지사항 3카드 */
/* Dashboard 2-col layout (PC: notices left, upcoming right) */
.db-dashboard-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-bottom: 48px;
    align-items: start;
}
/* In 2-col, notices stack vertically (1 per row) */
.db-notice-col .db-notice-grid {
    grid-template-columns: 1fr;
}

.db-notice-section { margin-bottom: 48px; }
.db-notice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.db-notice-card {
    position: relative;
    padding: 14px 16px;
    background: #f7f7f7;
    color: #0a0a0a;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: background 0.12s;
}
.db-notice-card:hover { background: #f0f0f0; }
.db-notice-card-dark { background: #0a0a0a; color: #ffffff; }
/* IMPORTANT 공지 — 크림슨 dot + tag만 강조, 배경/테두리 없음 */
.db-notice-card-imp .db-notice-dot { background: #D5224F; }
.db-notice-card-imp .db-notice-tag { background: #D5224F; color: #fff; }
.db-notice-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #6b7280;
}
.db-notice-card-dark .db-notice-dot { background: #818cf8; }
.db-notice-body {
    flex: 1;
    min-width: 0;
}
.db-notice-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
.db-notice-tag {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ffffff;
    color: #0a0a0a;
    white-space: nowrap;
}
.db-notice-card-dark .db-notice-tag { background: var(--c-primary); color: #fff; }
.db-notice-date {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.3px;
    opacity: 0.55;
    white-space: nowrap;
}
.db-notice-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.db-notice-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.db-notice-author {
    font-size: 11px;
    opacity: 0.55;
    white-space: nowrap;
    flex-shrink: 0;
}
.db-notice-empty {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 14px 20px;
    color: var(--c-text-muted);
    font-size: 13px;
    text-align: left;
    justify-content: center;
}

/* Hero — 캡션 + 큰 인사말 */
.db-hero { margin-bottom: 48px; }
.db-hero-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1.5px;
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.db-hero-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -1.8px;
    line-height: 1.05;
    margin: 0;
    color: #0a0a0a;
}
.db-hero-sub {
    font-size: 15px;
    color: var(--c-text-sub);
    margin: 14px 0 0;
    max-width: 540px;
    line-height: 1.6;
}

/* 메뉴 그리드 — PC 3열, 셀 36px 28px padding, 우상단 → 화살표 */
.db-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #ededed;
    margin-bottom: 48px;
}
.db-menu-item {
    position: relative;
    padding: 36px 28px 32px;
    border-bottom: 1px solid #ededed;
    border-right: 1px solid #ededed;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.db-menu-item:nth-child(3n) { border-right: none; }
.db-menu-item:hover { background: #fafafa; }
.db-menu-icon {
    color: #0a0a0a;
    margin-bottom: 28px;
}
.db-menu-text { margin-top: auto; }
.db-menu-en {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}
.db-menu-label {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: #0a0a0a;
}
.db-menu-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-muted);
    background: var(--c-bg-soft);
    border-radius: 100px;
    letter-spacing: 0;
    vertical-align: middle;
}
.db-menu-arrow {
    position: absolute;
    top: 28px;
    right: 24px;
    font-size: 16px;
    color: #bbb;
}

/* 캘린더 (PC만) */
.db-cal-section { margin-bottom: 48px; }
.db-cal-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.db-cal-btn {
    background: #ffffff;
    border: 1px solid #ededed;
    color: #0a0a0a;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    line-height: 1;
    min-height: 28px;
}
.db-cal-btn:hover { background: #f7f7f7; }
.db-cal-btn-text { font-family: var(--font-body); font-size: 12px; }
.db-cal-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    min-width: 100px;
    text-align: center;
}
.db-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #f0f0f0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}
.db-cal-grid .cal-day-header {
    padding: 10px 0;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: #0a0a0a;
    background: var(--c-bg-soft);
    border-right: 1px solid #f0f0f0;
    letter-spacing: 0.5px;
}
.db-cal-grid .cal-day-header:nth-child(7n) { border-right: none; }
.db-cal-grid .cal-day-header.db-dow-sun { color: var(--c-primary); }
.db-cal-grid .cal-day-header.db-dow-sat { color: #1e40af; }
.db-cal-grid .cal-cell {
    min-height: 92px;
    padding: 8px 8px 6px;
    background: #ffffff;
    border-right: 1px solid #f0f0f0;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s;
    position: relative;
}
.db-cal-grid .cal-cell:nth-child(7n) { border-right: none; }
.db-cal-grid .cal-cell:hover { background: #fafafa; }
.db-cal-grid .cal-cell.cal-empty { background: #fafafa; cursor: default; }
.db-cal-grid .cal-cell .cal-day-num {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    color: #0a0a0a;
    line-height: 1.2;
}
.db-cal-grid .cal-cell.db-cell-sun .cal-day-num { color: var(--c-primary); }
.db-cal-grid .cal-cell.db-cell-sat .cal-day-num { color: #1e40af; }
.db-cal-grid .cal-cell.cal-today .cal-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #ffffff !important;
    font-weight: 600;
    margin: -3px 0 0 -3px;
}
.db-cal-grid .cal-cell .cal-dots {
    display: flex;
    gap: 3px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.db-cal-grid .cal-cell .cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
/* v3 — 빠른 실행 그리드: PC 3열, 모바일 미디어쿼리 안에서 2열로 override */
.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 1.5rem;
}
.dash-quick-meta {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 4px;
    font-family: var(--font-display);
    letter-spacing: 0.2px;
}
.dash-mobile-section { display: none; }
.dash-mobile-low-stock { display: none; }
.dash-mobile-notices { display: none; }

/* Desktop dashboard: notices + calendar side by side */
.dash-desktop-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.dash-desktop-top #dashboard-notices { min-height: 300px; }
.dash-desktop-top #dashboard-calendar { min-height: 300px; }

@media (max-width: 768px) {
    /* ============================================================
       Hide sidebar on mobile
       ============================================================ */
    .sidebar { display: none !important; }

    /* ============================================================
       Topbar — compact mobile style (user selector visible)
       ============================================================ */
    .topbar {
        left: 0;
        height: 52px;
        padding: 8px 16px 4px;
        gap: 8px;
    }
    /* 모바일 topbar — 좌측 brand(로고+워드마크) 표시, 중앙 검색은 숨김 */
    .topbar-left { display: flex !important; align-items: center; padding: 0; gap: 6px; }
    .topbar-center { display: none !important; }
    .v3-topbar-wordmark { display: inline-flex; }
    .v3-topbar-wordmark strong { font-size: 12px; }
    .v3-topbar-wordmark em { font-size: 8px; letter-spacing: 1.2px; }

    /* 우측 — Sheets 칩 + 사용자 칩 (둘 다 컴팩트하지만 텍스트 노출) */
    .v3-sheets-chip {
        padding: 4px 9px;
        font-size: 10px;
        /* 모바일에서 칩이 길어져 우측 Google 로그인 버튼이 잘리는 것 방지.
           JS 가 HH:MM 으로 짧게 줄여주지만 안전망 — 칩 최대 폭 + ellipsis. */
        max-width: 120px;
        min-width: 0;
        flex-shrink: 1;
    }
    .v3-sheets-text {
        display: inline;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    .v3-user-chip {
        padding: 3px 9px 3px 3px;
        max-width: none;
    }
    .v3-user-name { display: inline; font-size: 11px; }
    .v3-user-chevron { display: inline; }
    .v3-user-avatar { width: 22px; height: 22px; font-size: 10px; }
    .v3-topbar-btn {
        padding: 4px 9px;
        font-size: 11px;
        min-height: auto;
        flex-shrink: 0;  /* Google 로그인 버튼이 모바일에서 잘리지 않게 — 칩만 줄어듦 */
    }
    .v3-topbar-settings-btn { display: none; }  /* 모바일 — 사이드바/바텀내비 설정 사용 */
    .v3-user-menu { right: 8px; min-width: 160px; }
    /* topbar-right 도 flex 정리: 칩이 줄어들고 사용자칩/로그인은 본 크기 유지 */
    .topbar-right { width: auto; justify-content: flex-end; gap: 6px; flex-shrink: 0; min-width: 0; flex-wrap: nowrap; }

    /* (#5) 모바일 카드 아이콘 박스 완전 제거 — 라인 디바이더만 */
    .mobile-list-item .mobile-item-icon { display: none !important; }
    /* 카드 좌측 체크박스만 보임. body 텍스트와 right 영역 자연스럽게 */
    .mobile-list-item { gap: 14px; padding: 12px 14px; }
    .topbar-user { flex: 1; }
    .topbar-user-select {
        max-width: none;
        width: 100%;
        font-size: 13px;
        padding: 6px 10px;
        border-radius: 8px;
    }

    /* ============================================================
       Bottom tab navigation — Direction B 알약 스타일
       사용자 피드백: iOS·Android 동일하게 더 여유 있게 (알약/패딩 키움)
       ============================================================ */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--c-bg-soft);
        border-top: 1px solid #ededed;
        z-index: 200;
        align-items: flex-start;
        /* 사용자 피드백: 하단탭 세로 여유 더 (iOS·Android 동일) */
        padding: 16px 8px 14px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
    }
    .mobile-tab {
        flex: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        text-decoration: none;
        color: var(--c-text-sub);
        font-size: 11px;
        font-weight: 500;
        background: none;
        border: none;
        cursor: pointer;
        font-family: var(--font-body);
        -webkit-tap-highlight-color: transparent;
    }
    /* 기존 SVG 아이콘은 숨기고 알약(::before) + 가운데 점(radial-gradient) 으로 대체.
       radial-gradient 로 점을 그리면 ::after 위치 계산 불필요 — 항상 알약 중앙. */
    .mobile-tab svg { display: none; }
    .mobile-tab::before {
        content: '';
        display: inline-flex;
        padding: 6px 24px;
        border-radius: 20px;
        background-color: transparent;
        background-image: radial-gradient(circle, var(--c-text-sub) 2.5px, transparent 3px);
        background-repeat: no-repeat;
        background-position: center;
        transition: background-color 0.18s, background-image 0.18s;
    }
    .mobile-tab.active { color: var(--c-text); font-weight: 600; }
    .mobile-tab.active::before {
        background-color: #0a0a0a;
        background-image: radial-gradient(circle, #ffffff 2.5px, transparent 3px);
    }
    .mobile-tab span { white-space: nowrap; line-height: 1.2; }

    /* ============================================================
       Content area
       ============================================================ */
    .content {
        margin-left: 0;
        width: 100%;
        /* v3 — 모바일 상단바 52px + 8px breathing room = 60px padding-top.
           padding-bottom 은 하단 탭바 (≈80px + safe area) 가리지 않도록 100px. */
        padding: 60px 16px 100px 16px;
        overflow-x: hidden;
    }
    /* v3 — 모바일 리스트 엣지투엣지: 리스트를 감싸는 .card 자체의 둥근 박스
       (margin/padding/radius/bg/shadow)를 제거해서 화면 좌우 100% 사용.
       즐겨찾기는 카드 안에 헤더/여러 섹션이 들어가므로 .fav-main 에서 원복. */
    .card:has(> .mobile-list-container) {
        margin: 0 -16px !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    .mobile-list-container {
        padding: 0;
        margin: 0;
    }
    .mobile-list-item { margin: 0 !important; }

    /* ============================================================
       Page header
       ============================================================ */
    .page-header {
        background: white;
        padding: 20px 20px 16px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 0;
    }
    .page-header h2 {
        font-size: 20px;
        font-weight: 700;
        color: #111;
        letter-spacing: -0.5px;
    }
    .page-desc { font-size: 13px; color: #999; margin-top: 2px; }

    /* ============================================================
       Search panel
       ============================================================ */
    .search-panel {
        background: white;
        border-radius: 14px;
        margin: 14px 16px;
        padding: 12px 14px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .search-row { flex-direction: column; gap: 8px; }
    .search-input-wrap, .select { width: 100%; }
    .input {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
        background: #f7f7f8;
        border-color: #f0f0f0;
    }
    .input:focus { background: #fff; }
    .select { font-size: 13px; padding: 10px 12px; border-radius: 10px; }
    .btn { padding: 12px 16px; font-size: 14px; border-radius: 12px; }
    .btn-sm { padding: 10px 14px; font-size: 13px; }

    /* ============================================================
       Cards
       ============================================================ */
    .card {
        border-radius: 16px;
        margin: 0 16px 12px;
        padding: 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .card-title { font-size: 15px; }

    /* ============================================================
       Hide table, show mobile cards
       ============================================================ */
    .table-scroll { display: none !important; }

    /* 모바일에서 selection-toolbar 를 보이게 변경 — 다중 선택 후
       '연구노트 표에 추가' 등 일괄 작업을 모바일에서도 가능하게 한다. */
    .selection-toolbar {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .selection-toolbar .toolbar-left,
    .selection-toolbar .toolbar-right {
        flex-wrap: wrap;
        gap: 8px;
    }
    .selection-toolbar .btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .mobile-list-container {
        display: block;
        padding: 4px 0;
    }

    /* 모바일 카드 좌측 체크박스 — 같은 .row-check 클래스를 사용해서
       PC 와 동일한 getSelectedItems / toggleSelectAll 함수가 작동한다. */
    .mobile-list-item .row-check {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        margin: 0;
        cursor: pointer;
    }

    /* ============================================================
       Mobile list items — optimized rendering
       ============================================================ */
    /* v3 — 엣지투엣지 카드: 그림자/마진 없음, 디바이더 선만 */
    .mobile-list-item {
        background: #ffffff;
        margin: 0;
        border-radius: 0;
        padding: 14px 20px;
        box-shadow: none;
        border-bottom: 1px solid var(--c-divider);
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        content-visibility: auto;
        contain-intrinsic-size: auto 72px;
    }
    .mobile-list-item:first-child { border-top: 1px solid var(--c-divider); }
    .mobile-list-item:active { background: var(--c-bg-soft); }

    .mobile-item-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 20px;
    }
    .mobile-item-body { flex: 1; min-width: 0; }
    .mobile-item-name {
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text);
        letter-spacing: -0.1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-item-sub {
        font-size: 11px;
        color: var(--c-text-muted);
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-item-location {
        font-size: 11px;
        color: #bbb;
        margin-top: 3px;
    }
    .mobile-item-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        flex-shrink: 0;
    }
    .mobile-item-value { font-size: 12px; color: #999; }

    .mobile-badge {
        display: inline-flex;
        padding: 3px 10px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
    }
    .mobile-badge-ok    { background: #ecfdf5; color: #065f46; }
    .mobile-badge-low   { background: #fffbeb; color: #92400e; }
    .mobile-badge-empty { background: #fef2f2; color: #991b1b; }
    .mobile-badge-check { background: #eff6ff; color: #1e40af; }
    .mobile-badge-normal { background: #f5f5f5; color: #555; }

    .mobile-section-title {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #888;
        padding: 16px 16px 8px;
        letter-spacing: 0.3px;
    }

    /* Load more button */
    .mobile-load-more {
        display: block;
        width: calc(100% - 32px);
        margin: 4px 16px 12px;
        padding: 14px;
        background: white;
        border: 1.5px solid #e8e8e8;
        border-radius: 14px;
        font-size: 14px;
        font-weight: 600;
        color: var(--color-primary);
        cursor: pointer;
        font-family: inherit;
        text-align: center;
    }
    .mobile-load-more:active { background: #f7f7f8; }

    /* ============================================================
       "더보기" bottom sheet menu
       ============================================================ */
    .mobile-more-menu {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 300;
        visibility: hidden;
        pointer-events: none;
    }
    .mobile-more-menu.open {
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-more-dim {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        transition: opacity 0.25s;
    }
    .mobile-more-menu.open .mobile-more-dim { opacity: 1; }
    .mobile-more-body {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-radius: 24px 24px 0 0;
        padding: 12px 0 calc(40px + env(safe-area-inset-bottom, 0));
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .mobile-more-menu.open .mobile-more-body { transform: translateY(0); }
    .mobile-more-handle {
        width: 36px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        margin: 0 auto 12px;
    }
    .mobile-more-title {
        font-size: 15px;
        font-weight: 700;
        color: #111;
        padding: 0 20px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    .mobile-more-link {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 20px;
        text-decoration: none;
        color: #111;
        font-size: 15px;
        font-weight: 500;
        border-bottom: 1px solid #f8f8f8;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-more-link:active { background: #f7f7f8; }
    .mobile-more-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }

    /* ============================================================
       Mobile action bottom sheet (item tap)
       ============================================================ */
    .mobile-action-body {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-radius: 24px 24px 0 0;
        padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0));
        /* 시트의 *아래단*은 화면 bottom 에 anchored (bottom:0).
           위로 차오를 때는 항상 상단 160px (상태바 + 여백)는 비워둔다.
           → 콘텐츠가 짧으면 시트도 짧고 자연스럽게 아래에 붙음.
           → 콘텐츠가 길면 그 한도까지만 차오르고 내부 스크롤. */
        max-height: calc(100vh - 160px);
        max-height: calc(100dvh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }
    /* 드래그 중에는 CSS transition 끄고 inline transform 만 적용 */
    .mobile-action-body.dragging { transition: none; }
    .mobile-action-sheet.open .mobile-action-body { transform: translateY(0); }
    .mobile-action-handle {
        display: block;
        width: 36px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        margin: 0 auto 16px;
    }
    /* ============================================================
       Dashboard mobile hero
       ============================================================ */
    /* v3 Editorial Minimal — dash-hero 라이트 톤 (다크 → 화이트, 크림슨은 액센트만) */
    .dash-hero {
        display: block;
        background: #ffffff;
        padding: 28px 20px 24px;
        position: relative;
        overflow: hidden;
        border-bottom: 1px solid var(--c-divider);
    }
    .dash-hero-circle1, .dash-hero-circle2 { display: none; }
    .dash-hero-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
        position: relative;
    }
    .dash-hero-brand span {
        font-family: var(--font-display);
        font-size: 11px;
        font-weight: 500;
        color: var(--c-text-muted);
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }
    .dash-hero-greeting {
        font-family: var(--font-display);
        font-size: 28px;
        font-weight: 600;
        color: var(--c-text);
        letter-spacing: -1px;
        line-height: 1.05;
        position: relative;
    }
    .dash-hero-sub {
        font-size: 13px;
        color: var(--c-text-sub);
        margin-top: 6px;
        position: relative;
    }
    .dash-hero-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 16px;
        background: var(--c-bg-soft);
        padding: 7px 11px;
        border-radius: 100px;
        position: relative;
    }
    .dash-hero-status-dot {
        width: 7px; height: 7px;
        border-radius: 50%;
    }
    .dash-hero-status span {
        font-size: 11px;
        color: var(--c-text-sub);
        letter-spacing: 0;
        font-family: var(--font-body);
    }
    .dash-alert {
        display: flex;
        margin: 14px 16px 0;
        background: #fff5f7;
        border-radius: 14px;
        padding: 12px 14px;
        border: 1px solid #EBB4C2;
        align-items: center;
        gap: 10px;
    }
    .dash-alert-icon { font-size: 20px; flex-shrink: 0; }
    .dash-alert-title { font-size: 13px; font-weight: 600; color: #D5224F; }
    .dash-alert-sub { font-size: 12px; color: #c06; margin-top: 1px; }
    .dash-alert-link {
        margin-left: auto;
        font-size: 12px;
        color: #D5224F;
        background: none;
        border: none;
        font-weight: 600;
        white-space: nowrap;
        text-decoration: none;
    }
    .dash-mobile-section {
        display: block;
        font-family: var(--font-display);
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text);
        padding: 18px 16px 8px;
        letter-spacing: -0.1px;
    }
    .dash-mobile-low-stock { display: block; }
    .dash-mobile-notices { display: block; }
    .dash-desktop-top { display: none; }
    /* v3 — 빠른 실행 카드 미니멀 (컬러풀 배경 → 흰 카드 + 작은 컬러 아이콘) */
    .dash-quick-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 16px;
        margin-bottom: 24px;
    }
    .dash-quick-item {
        background: #ffffff !important;
        border: 1px solid var(--c-divider);
        border-radius: 14px;
        padding: 16px;
        cursor: pointer;
        text-align: left;
        text-decoration: none;
        display: block;
        transition: border-color 0.1s;
    }
    .dash-quick-item:active { border-color: var(--c-text-muted); background: var(--c-bg-soft) !important; }
    .dash-quick-icon {
        width: 32px; height: 32px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        margin-bottom: 10px;
    }
    .dash-quick-label {
        font-family: var(--font-display);
        font-size: 13px;
        font-weight: 600;
        color: var(--c-text);
        letter-spacing: -0.1px;
    }
    body.page-index .page-header { display: none; }

    /* ============================================================
       Dashboard Direction B — Mobile overrides
       ============================================================ */
    body.page-index .content {
        max-width: none;
        margin: 0;
        padding: 60px 0 100px;
    }

    /* 모바일: 공지 + 다가오는 일정 섹션 숨김 — 깔끔한 히어로 + 메뉴만 표시 */
    .db-dashboard-2col { display: none; }
    .db-section-eyebrow { font-size: 10px; }

    /* Hero — 모바일 컴팩트 */
    .db-hero {
        padding: 8px 24px 28px;
        margin-bottom: 0;
    }
    .db-hero-eyebrow { font-size: 10px; margin-bottom: 8px; }
    .db-hero-title {
        font-size: 28px;
        letter-spacing: -1px;
        line-height: 1.1;
    }
    .db-hero-sub { display: none; }

    /* 메뉴 — 세로 리스트 */
    .db-menu-grid {
        display: block;
        border-top: 1px solid #ededed;
        margin-bottom: 16px;
    }
    .db-menu-item {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 18px 24px;
        border-right: none !important;
        border-bottom: 1px solid #ededed;
        min-height: 0;
    }
    .db-menu-item:hover { background: transparent; }
    .db-menu-item:active { background: #fafafa; }
    .db-menu-icon {
        margin-bottom: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    .db-menu-icon svg { width: 24px; height: 24px; }
    .db-menu-text {
        flex: 1;
        min-width: 0;
        margin-top: 0;
    }
    .db-menu-en {
        font-size: 10px;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .db-menu-label {
        font-size: 16px;
        letter-spacing: -0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .db-menu-arrow {
        position: static;
        color: #bbb;
        font-size: 18px;
        flex-shrink: 0;
    }

    /* PC 캘린더는 모바일에서 숨김 (메뉴의 "일정 · 공지" 클릭으로 진입) */
    .db-cal-section { display: none; }


    /* ============================================================
       Favorites overflow fix
       ============================================================ */
    .fav-layout { overflow: hidden; max-width: 100%; }
    .fav-main { overflow: hidden; min-width: 0; }
    .fav-sidebar { overflow: hidden; min-width: 0; }
    .fav-main .card { overflow: hidden; }
    .fav-main .mobile-list-item { margin-left: 0; margin-right: 0; }
    /* 즐겨찾기 카드는 엣지투엣지 적용 대상에서 제외 — 원래 카드 형태 유지 */
    .fav-main .card:has(> .mobile-list-container) {
        margin: 0 16px 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        background: #fff !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
        overflow: hidden !important;
    }

    /* ============================================================
       Summary cards (horizontal scroll)
       ============================================================ */
    .summary-cards {
        display: flex !important;
        gap: 10px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .summary-cards::-webkit-scrollbar { display: none; }
    .summary-card {
        border-radius: 16px;
        padding: 14px 16px;
        min-width: 110px;
        flex-shrink: 0;
    }
    .card-value { font-size: 26px; line-height: 1; margin-bottom: 4px; }
    .card-label { font-size: 11px; }
    .summary-cards + .summary-cards { margin-top: 8px !important; }

    /* ============================================================
       Calendar, Notices, Data status
       ============================================================ */
    .cal-cell {
        height: 70px;
        min-height: 70px;
        max-height: 70px;
        padding: 4px;
    }
    .cal-event-chip {
        font-size: 9px;
        padding: 0 3px;
    }
    .cal-event-more {
        font-size: 9px;
        padding: 0 3px;
    }
    .cal-holiday-name {
        font-size: 9px;
    }
    .cal-event-chip { font-size: 9px; }
    .cal-toolbar { flex-wrap: wrap; }
    .data-status-notice { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
    .notice-chip { font-size: 10px !important; }
    .results-info { padding: 8px 16px; font-size: 12px; color: #999; }

    /* ============================================================
       Favorites / Export / Toast
       ============================================================ */
    .fav-layout { grid-template-columns: 1fr; }
    .fav-sidebar { position: static; }
    .export-buttons { flex-direction: column; }
    .export-buttons .btn { width: 100%; justify-content: center; }
    #toast-container { bottom: 92px; right: 16px; left: 16px; }
    .toast { max-width: 100%; }
}

/* ============================================================
   v3 Editorial Minimal — 공통 컴포넌트
   (storage-seeker-v3.md 디자인 시스템)
   ============================================================ */

/* 영문 라벨 (HERO 위, 섹션 헤더 등) — letter-spacing 강조 */
.v3-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--c-text-muted);
    text-transform: uppercase;
}
.v3-label .v3-label-num {
    color: var(--c-text);
    font-weight: 600;
    margin-left: 6px;
}
/* 카드 그룹 위 섹션 헤더 (설정 페이지 등) */
.v3-section-group {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid var(--c-divider);
    margin-bottom: 10px;
    font-size: 11px;
    color: var(--c-text-sub);
}

/* 페이지 제목 — display 폰트 */
.v3-page-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--c-text);
    margin: 6px 0 10px;
}
.v3-page-desc {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--c-text-sub);
    line-height: 1.5;
}

/* 카운터 페어 (TOTAL / SELECTED) — Hero 우측 */
.v3-counter-pair {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 4px;
}
.v3-counter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 76px;
}
.v3-counter-label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    color: var(--c-text-muted);
    text-transform: uppercase;
}
.v3-counter-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--c-text);
    line-height: 1;
}
.v3-counter.v3-counter-accent .v3-counter-value { color: var(--c-primary); }
.v3-counter-divider {
    width: 1px;
    height: 28px;
    background: var(--c-divider);
}

/* 검색바 v3 — 회색 박스 + 돋보기 좌측 */
.v3-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--c-bg-soft);
    border-radius: 10px;
    padding: 11px 14px;
    min-height: 40px;
}
.v3-search-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--c-text-muted);
    font-size: 14px;
    line-height: 1;
}
.v3-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--c-text);
    outline: none;
}
.v3-search-kbd {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--c-text-muted);
    border: 1px solid var(--c-divider);
    border-radius: 4px;
    padding: 1px 6px;
    background: #fff;
}

/* 필터 칩 v3 — pill, 활성 검정 */
.v3-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-family: var(--font-body);
    background: #fff;
    border: 1px solid var(--c-divider);
    color: var(--c-text);
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, border-color 0.1s;
    flex-shrink: 0;
}
.v3-chip:hover { border-color: var(--c-text-muted); }
.v3-chip.v3-chip-active {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}
.v3-chip::after { content: "▾"; font-size: 9px; opacity: 0.7; }
.v3-chip.v3-chip-noarrow::after { content: ""; }

/* NSE 배지 — 분석장치 식별자 강조 */
.v3-nse-badge {
    font-family: var(--font-display);
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--c-primary-light);
    color: var(--c-primary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* KIND 배지 — 즐겨찾기/노트 분류 */
.v3-kind-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}
.v3-kind-consumable { background: #fff5f7; color: #D5224F; }
.v3-kind-equipment  { background: #eff6ff; color: #1e40af; }
.v3-kind-pipette    { background: #f7f7f7; color: #0a0a0a; }

/* monospace 식별자 (Cat#/Serial/NSE 등) */
.v3-mono {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--c-text-sub);
}

/* 인사말 Hero (대시보드) */
.v3-hero-greeting {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -1.5px;
    line-height: 1.05;
    color: var(--c-text);
    margin: 8px 0 4px;
}

/* Floating Action Bar (선택 시 하단 sticky) */
.v3-fab {
    position: sticky;
    bottom: 12px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 50;
}
.v3-fab-count {
    background: var(--c-primary);
    color: #fff;
    border-radius: 100px;
    padding: 2px 10px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.v3-fab-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.v3-fab-action {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
}
.v3-fab-action.v3-fab-primary { background: var(--c-primary); }
.v3-fab-action:hover { background: rgba(255,255,255,0.18); }
.v3-fab-action.v3-fab-primary:hover { background: #b91c42; }

/* 페이지 헤더 좌우 분할 (좌: 라벨/제목/설명, 우: 카운터 페어) */
.v3-header-flex {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.v3-header-text { flex: 1; min-width: 280px; }

/* ============================================================
   v3 Consumables Page — 7단계 구조 컴포넌트
   ============================================================ */

/* (2) Breadcrumb */
.v3-breadcrumb {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 28px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.v3-breadcrumb a {
    color: var(--c-text-muted);
    text-decoration: none;
}
.v3-breadcrumb a:hover { color: var(--c-text); }
.v3-breadcrumb-sep { color: var(--c-divider); }
.v3-breadcrumb-current { color: var(--c-text); font-weight: 500; }

/* (3) Hero */
.v3-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    /* v3 표준 상단 여유 — 캘린더의 .page-header { padding-top: 28px } 와 통일.
       breadcrumb 제거 이전에는 breadcrumb 자체가 여유를 만들었지만 제거 후
       상단바에 카테고리 라벨(eyebrow) 이 붙어 보이던 현상 해결.
       모바일은 .content padding-top: 60px 안에서 자체 여유가 있으므로 0 으로 override. */
    padding-top: 28px;
}
.v3-hero-text { flex: 1; min-width: 280px; }

/* (4) Search Panel — 회색 박스 안에 검색바 + 칩 */
.v3-search-panel {
    background: var(--c-bg-soft);
    border: 1px solid var(--c-divider);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin-bottom: 1rem;
}
.v3-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.v3-search-icon {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--c-text-muted);
    line-height: 1;
}
.v3-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--c-text);
    padding: 4px 0;
}
.v3-search-row .btn { flex-shrink: 0; }

/* 필터 칩 (native select 를 chip 모양으로) */
.v3-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px;
}
.v3-chip-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 26px 6px 12px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 13px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' stroke='%23999' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid var(--c-divider);
    color: var(--c-text);
    cursor: pointer;
    min-height: 30px;
    flex-shrink: 0;
}
.v3-chip-select:hover { border-color: var(--c-text-muted); }
/* 값이 선택되어 있으면 (기본 옵션 제외) 검정 활성 톤 — JS 로 .has-value 부착 */
.v3-chip-select.has-value {
    background-color: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' stroke='white' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
}

/* (5) 결과 카운트 + 전체 선택 */
.v3-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 4px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--c-text-sub);
}
.v3-result-info { flex: 1; min-width: 0; }
.v3-select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--c-text);
    user-select: none;
    flex-shrink: 0;
}
.v3-select-all-label input[type="checkbox"] {
    accent-color: var(--c-primary);
}

/* (6) 선택된 row 핑크 강조 (PC 테이블) */
.data-table tbody tr:has(.row-check:checked) {
    background: var(--c-primary-light);
}

/* (7) Floating Action Bar — 선택 시에만 표시.
   PC: viewport 하단에 fixed (스크롤과 무관하게 항상 화면 아래 고정).
   모바일: 하단 탭바 위에 fixed. */
.v3-fab-mode {
    display: none !important;          /* 0개 선택 시 숨김. !important 로
                                          .selection-toolbar 의 display 보다 우선 */
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 820px;
    margin: 0;
    z-index: 50;
}
.v3-fab-mode.v3-fab-visible { display: flex !important; }

/* PC 사이드바 너비만큼 좌측 보정 (사이드바 옆 콘텐츠 영역 가운데 정렬) */
@media (min-width: 769px) {
    .v3-fab-mode {
        left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .v3-breadcrumb { display: none; }   /* 모바일은 페이지 헤더에서 정체성 충분 */
    .page-notices .v3-breadcrumb { display: flex; }  /* 공지사항은 모바일에도 경로 표시 */
    .page-notices .v3-hero { padding-top: 0; }
    .v3-hero { gap: 12px; align-items: flex-start; padding-top: 0; }
    .v3-hero-text { min-width: 0; flex: 1 1 100%; }
    /* 검색 패널 컴팩트 (사용자 피드백: 검색창 더 작게) */
    .v3-search-panel { padding: 6px; }
    .v3-search-row { padding: 5px 8px; min-height: 36px; gap: 6px; }
    .v3-search-input { font-size: 13px; padding: 2px 0; }
    .v3-search-row .btn { padding: 5px 11px; font-size: 12px; min-height: 30px; }
    /* 모바일 필터 칩 — 짧은 라벨 + 너비 제한으로 한 줄에 3~5개 노출.
       모바일 필터 화면 너비 부족 시 가로 스크롤로 자동 전환. */
    .v3-filter-chips {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .v3-filter-chips::-webkit-scrollbar { display: none; }
    .v3-chip-select {
        padding: 5px 22px 5px 10px;
        font-size: 11px;
        min-height: 28px;
        background-position: right 8px center;
        max-width: 110px;          /* 옵션 텍스트가 길어져도 칩 너비 폭주 안 함 */
        text-overflow: ellipsis;
        flex-shrink: 0;
    }
    /* FAB 모바일: 하단 탭바 위 floating.
       .selection-toolbar 의 모바일 sticky-top 룰을 override (top:auto, bottom 고정) */
    .v3-fab-mode {
        display: none !important;
        position: fixed !important;
        top: auto !important;
        bottom: calc(92px + var(--safe-bottom, 0px)) !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 18px !important;
        padding: 6px 10px !important;
        transform: none !important;
        z-index: 200 !important;
        /* 컴팩트한 단일 줄 */
        align-items: center !important;
        gap: 6px !important;
    }
    .v3-fab-mode.v3-fab-visible { display: flex !important; }

    /* 모바일 FAB 카운트 배지 — 핑크 알약, 작게 */
    .v3-fab-mode .toolbar-left { flex-shrink: 0; }
    .v3-fab-mode .selection-count {
        font-size: 11px;
        padding: 4px 9px;
        font-family: var(--font-display);
    }

    /* 모바일 FAB 액션들 — 가로 스크롤 + 작은 사각 버튼 */
    .v3-fab-mode .toolbar-right {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px !important;
        flex: 1;
        min-width: 0;
    }
    .v3-fab-mode .toolbar-right::-webkit-scrollbar { display: none; }
    .v3-fab-mode .fab-action {
        flex-shrink: 0;
        min-height: 32px;
        min-width: auto;
        padding: 6px 10px !important;
        font-size: 11px !important;
        gap: 4px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        line-height: 1;
        white-space: nowrap;
    }
    .v3-fab-mode .fab-icon { font-size: 12px; }

    /* 라벨 토글: 모바일에서는 짧은 라벨만 */
    .fab-label-pc { display: none; }
    .fab-label-mb { display: inline; }
}

/* PC 에서는 긴 라벨 표시 */
@media (min-width: 769px) {
    .fab-label-pc { display: inline; }
    .fab-label-mb { display: none; }
    .v3-fab-mode .fab-icon { display: none; }
}

/* 모바일 조정 */
@media (max-width: 768px) {
    .v3-page-title { font-size: 24px; letter-spacing: -0.6px; }
    .v3-page-desc { font-size: 12px; }
    .v3-hero-greeting { font-size: 28px; letter-spacing: -1px; }
    .v3-counter-value { font-size: 22px; letter-spacing: -0.6px; }
    .v3-counter-pair { gap: 14px; padding: 4px 0; align-self: stretch; }
    .v3-counter { min-width: 60px; gap: 2px; }
    .v3-counter-label { font-size: 9px; }
    .v3-counter-divider { height: 22px; }
    .v3-header-flex { gap: 12px; align-items: flex-start; }
    .v3-header-text { min-width: 0; flex: 1 1 100%; }
    .v3-fab { bottom: calc(72px + var(--safe-bottom, 0px)); margin: 0 12px; }
}

/* ============================================================
   v3 Direction B — 캘린더 페이지 (PCSchedule 레퍼런스)
   ⚠ JS 함수(renderMonth/updateCalendarDots/loadEvents/loadNotices/showDayDetail)
      는 무수정. CSS 만으로 새 디자인 적용. .cal-grid / .cal-cell / .cal-day-num
      / .cal-dots / .cal-event-chip / .cal-holiday-name 클래스명 그대로 유지.
   ============================================================ */

/* Hero — 우측 액션 버튼 2개 (공지 작성 / 일정 추가) */
.v3-hero-with-actions { align-items: flex-end; }
.v3-hero-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.db-btn-outline,
.db-btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.db-btn-outline {
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #ededed;
}
.db-btn-outline:hover { background: #f7f7f7; border-color: #d9d9d9; }
.db-btn-dark {
    background: #0a0a0a;
    color: #ffffff;
    border: 1px solid #0a0a0a;
    padding: 10px 18px;
}
.db-btn-dark:hover { background: #1a1a1a; }
.db-btn-plus { font-weight: 400; opacity: 0.85; }

/* 2열 레이아웃 — 좌(캘린더) + 우(공지·UPCOMING)
   ⚠ grid items 에 min-width: 0 명시 — 자식 콘텐츠가 grid track 폭을 강제로
   늘려 우측이 잘리던 버그(SAT 열 / UPCOMING 카드 우측 컬러바 짤림) 해결. */
.db-cal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.db-cal-layout > * { min-width: 0; max-width: 100%; }

/* 좌측 — 캘린더 카드 */
.db-cal-card {
    border: 1px solid #ededed;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}
.db-cal-card-head {
    padding: 20px 24px;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.db-cal-month-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}
.db-cal-month-ko {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.8px;
    color: #0a0a0a;
}
.db-cal-month-en {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
}
.db-cal-controls-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.db-cal-icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ededed;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}
.db-cal-icon-btn:hover { background: #f7f7f7; }
.db-cal-text-btn {
    padding: 6px 14px;
    border: 1px solid #ededed;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    line-height: 1;
    min-height: 32px;
}
.db-cal-text-btn:hover { background: #f7f7f7; }
.db-cal-divider {
    width: 1px;
    height: 20px;
    background: #ededed;
    margin: 0 4px;
}
.db-cal-view-toggle {
    display: inline-flex;
    background: var(--c-bg-soft);
    border-radius: 8px;
    padding: 2px;
}
.db-cal-view-toggle button {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--c-text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background 0.12s, color 0.12s;
}
.db-cal-view-toggle button.active {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.db-cal-view-toggle button[disabled] { cursor: not-allowed; opacity: 0.5; }

/* 요일 헤더 */
.db-cal-week-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #ededed;
}
.db-dow {
    padding: 10px 12px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    color: var(--c-text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.db-dow-sun { color: var(--c-primary); }
.db-dow-sat { color: #1e40af; }

/* 일자 그리드 — .cal-grid + .cal-cell 룰을 v3 디자인에 맞춰 override.
   기존 .cal-grid 가 가지던 gap:1px + border:1px + overflow:hidden + radius
   를 모두 제거. box-sizing 명시 안 하면 모바일에서 우측 1~2px 잘림. */
.db-cal-days {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    grid-auto-rows: 108px;
    background: #ffffff !important;
    border-radius: 0 !important;
    border: none !important;
    gap: 0 !important;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}
.db-cal-days .cal-day-header { display: none; } /* 기존 헤더 칸 제거 — db-cal-week-head 사용 */
.db-cal-days .cal-cell {
    border-right: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    padding: 8px 10px;
    background: #ffffff;
    position: relative;
    cursor: pointer;
    transition: background 0.1s;
    /* 기존 .cal-cell { height: 90px; min/max-height: 90px } 강제 해제 —
       grid-auto-rows (108px PC / 72px 모바일) 가 셀 높이를 결정하게 함. */
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box;
}
.db-cal-days .cal-cell:nth-child(7n) { border-right: none; }
.db-cal-days .cal-cell:hover:not(.cal-empty) { background: #fafafa; }
.db-cal-days .cal-cell.cal-empty { background: #fafafa; cursor: default; }
.db-cal-days .cal-cell.cal-today { background: #fff5f7; }

.db-cal-days .cal-day-num {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    color: #0a0a0a;
    line-height: 1.2;
    margin: 0;
}
.db-cal-days .cal-cell.cal-today .cal-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #ffffff !important;
    font-weight: 600;
    margin: -2px 0 0 -3px;
}

/* 공휴일 라벨 (홀리데이 텍스트) */
.db-cal-days .cal-holiday-name {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--c-primary);
    vertical-align: middle;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.db-cal-days .cal-holiday-name.cal-company-name { color: #0a7; }

/* 이벤트 chip */
.db-cal-days .cal-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}
.db-cal-days .cal-event-chip {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    cursor: pointer;
}
.db-cal-days .cal-event-more {
    padding: 1px 6px;
    background: transparent;
    border: none;
    font-size: 10px;
    color: var(--c-text-sub);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
}
.db-cal-days .cal-event-more:hover { color: var(--c-text); }

/* 우측 — 사이드 영역 */
.db-cal-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.db-cal-side-section { min-width: 0; max-width: 100%; }
.db-cal-notices, .db-cal-upcoming { max-width: 100%; }
.db-up-item { max-width: 100%; min-width: 0; }
.db-notice-side-card { max-width: 100%; min-width: 0; }
.db-cal-side-head {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.db-cal-side-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}
.db-cal-side-viewall {
    font-size: 11px;
    color: var(--c-text-sub);
    font-weight: 500;
    text-decoration: none;
}
.db-cal-side-viewall:hover { color: var(--c-text); }
/* Actions (star/del) inside compact notice card */
.db-notice-side-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

/* 공지 카드 (사이드) — PC 는 세로 stack (PCSchedule 레퍼런스).
   모바일에서만 가로 스크롤로 override (아래 @media (max-width: 768px)).
   PC leak 방어: PC 룰에 명시적 column. */
.db-cal-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
}
.db-notice-side-card {
    padding: 14px 16px;
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #ededed;
    border-radius: 10px;
    position: relative;
    cursor: default;
}
.db-notice-side-dark {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}
.db-notice-side-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}
.db-notice-side-tag {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}
/* Direction B PCSchedule 레퍼런스: 태그 종류별 색상 — important 만 크림슨,
   일반 NOTICE 는 회색 톤. 검정 카드(첫 카드) 안에선 별도 톤. */
.db-notice-side-tag.tag-important {
    background: #fff5f7;
    color: var(--c-primary);
}
.db-notice-side-tag.tag-notice {
    background: var(--c-bg-soft);
    color: var(--c-text-sub);
}
.db-notice-side-dark .db-notice-side-tag.tag-important {
    background: var(--c-primary);
    color: #ffffff;
}
.db-notice-side-dark .db-notice-side-tag.tag-notice {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
}
/* 부제가 author 만 있을 때 — 살짝 더 옅게 (이름 vs 본문 톤 구분) */
.db-notice-side-sub-author { opacity: 0.55; }
.db-notice-side-date {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.5px;
    opacity: 0.55;
}
.db-notice-side-actions {
    display: inline-flex;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}
.db-side-star,
.db-side-del {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    color: inherit;
    opacity: 0.5;
    line-height: 1;
    font-family: inherit;
}
.db-side-star.on { opacity: 1; color: var(--c-primary); }
.db-side-star:hover, .db-side-del:hover { opacity: 1; }
.db-notice-side-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-notice-side-sub {
    font-size: 11px;
    opacity: 0.65;
    margin-top: 3px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.db-notice-side-author {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 6px;
    font-family: var(--font-display);
    letter-spacing: 0.3px;
}

/* UPCOMING */
.db-cal-upcoming {
    border: 1px solid #ededed;
    border-radius: 10px;
    overflow: hidden;
}
.db-up-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    background: #ffffff;
    transition: background 0.1s;
}
.db-up-item:last-child { border-bottom: none; }
.db-up-item:hover { background: #fafafa; }
.db-up-date {
    width: 50px;
    text-align: center;
    flex-shrink: 0;
    border-right: 1px solid #ededed;
    padding-right: 12px;
}
.db-up-month {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    letter-spacing: 0.3px;
    margin-bottom: 1px;
}
.db-up-day {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.8px;
    line-height: 1;
    color: #0a0a0a;
}
.db-up-dow {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    margin-top: 3px;
    letter-spacing: 0.5px;
}
.db-up-body { flex: 1; min-width: 0; }
.db-up-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0a0a0a;
}
.db-up-meta {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 2px;
    white-space: nowrap;
}
.db-up-meta.is-time { font-family: var(--font-mono); }
.db-up-bar {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--c-text-muted);
}

/* 모바일 — 캘린더 1열 + 컴팩트
   ⚠ minmax(0, 1fr) 명시: 1fr default 가 minmax(auto, 1fr) 이라 자식 콘텐츠
   최소 폭이 커지면 트랙도 늘어나 viewport 폭을 넘김. minmax(0, 1fr) 로
   강제해야 캘린더/UPCOMING 우측 짤림 방지. */
@media (max-width: 900px) {
    .db-cal-layout { grid-template-columns: minmax(0, 1fr); }
    .db-cal-side { order: -1; }  /* 모바일은 공지 위로 */
}
@media (max-width: 768px) {
    .v3-hero-with-actions { flex-direction: column; align-items: stretch; }
    .v3-hero-actions { width: 100%; }
    .v3-hero-actions .db-btn-outline,
    .v3-hero-actions .db-btn-dark { flex: 1; justify-content: center; padding: 12px 14px; }
    .db-cal-card-head { padding: 14px 16px; gap: 10px; }
    .db-cal-month-ko { font-size: 18px; letter-spacing: -0.5px; }
    .db-cal-month-en { display: none; }
    .db-cal-controls-row { gap: 4px; }
    .db-cal-divider, .db-cal-view-toggle { display: none; }
    .db-cal-days { grid-auto-rows: 72px; }
    .db-cal-days .cal-cell { padding: 6px 6px; }
    .db-cal-days .cal-day-num { font-size: 11px; }
    .db-cal-days .cal-event-chip { font-size: 9px; padding: 1px 4px; }
    .db-cal-days .cal-holiday-name { display: none; }
    .db-dow { padding: 8px 6px; font-size: 9px; }
    .db-cal-side-section { padding: 0 4px; }

    /* 모바일 공지 — 가로 스크롤 (최대 3건, db-notice-card 스타일) */
    .db-cal-notices {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 6px;
    }
    .db-cal-notices::-webkit-scrollbar { display: none; }
    .db-cal-notices .db-notice-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
        width: 220px;
        scroll-snap-align: start;
        background: #ffffff;
        border: 1px solid #ededed;
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        overflow: hidden;
    }
    .db-cal-notices .db-notice-card .db-notice-dot { display: none; }

    /* 모바일 다가오는 일정 — 가로 스크롤 카드 (최대 3건) */
    .db-cal-upcoming {
        display: flex;
        flex-direction: row;
        border: none;
        border-radius: 0;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 6px;
    }
    .db-cal-upcoming::-webkit-scrollbar { display: none; }
    .db-cal-upcoming .db-up-item {
        flex: 0 0 150px;
        scroll-snap-align: start;
        flex-direction: column;
        align-items: flex-start;
        border-bottom: none;
        border-radius: 10px;
        background: #ffffff;
        border: 1px solid #ededed;
        padding: 14px;
        gap: 6px;
    }
    .db-cal-upcoming .db-up-date {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        border-right: none;
        padding-right: 0;
        width: auto;
        text-align: left;
    }
    .db-cal-upcoming .db-up-month { font-size: 9px; margin-bottom: 0; }
    .db-cal-upcoming .db-up-day { font-size: 20px; }
    .db-cal-upcoming .db-up-dow { margin-top: 1px; }
    .db-cal-upcoming .db-up-body { flex: 1; min-width: 0; width: 100%; }
    .db-cal-upcoming .db-up-bar { width: 100%; height: 3px; margin-top: 2px; }
}

/* ============================================================
   v3 Direction B — 즐겨찾기 (PCFavorites 레퍼런스)
   ⚠ 기존 JS (loadProjects/selectProject/loadItems/renderItems 등) 가
   의존하는 id/클래스: fav-current-user, fav-project-list, fav-project-item,
   fav-project-active, fav-project-name, fav-empty, fav-main-title,
   fav-delete-project-btn, fav-consumables-body, fav-consumables-mobile,
   fav-equipment-body, fav-equipment-mobile, fav-new-project-input — 무수정.
   외곽 디자인만 db-fav-* 으로 추가하고 기존 클래스에 추가 룰만 얹음.
   ============================================================ */

/* Hero 카운터 (PROJECTS / SAVED) */
.v3-hero-with-counter { align-items: flex-end; }
.db-fav-counter-pair {
    display: flex;
    align-items: baseline;
    gap: 24px;
    flex-shrink: 0;
}
.db-fav-counter { text-align: right; }
.db-fav-counter-label {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    font-weight: 500;
}
.db-fav-counter-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1;
    color: #0a0a0a;
    margin-top: 4px;
}
.db-fav-counter-accent { color: var(--c-primary); }
.db-fav-counter-divider {
    width: 1px;
    height: 36px;
    background: #ededed;
    align-self: center;
}

/* 2열 레이아웃 */
.db-fav-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.db-fav-layout > * { min-width: 0; max-width: 100%; }

/* LEFT — PROJECTS aside */
.db-fav-aside {
    /* 기존 .fav-sidebar 가 position: sticky 였음 — overlay 모드의 mini sidebar
       와 시각적 안정성 위해 sticky 유지하되 padding 만 일관화 */
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.db-fav-side-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2px;
}
.db-fav-side-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}
.db-fav-side-user {
    font-size: 11px;
    color: var(--c-text-sub);
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 새 프로젝트 입력 — 라운드 회색 박스 */
.db-fav-new-proj {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--c-bg-soft);
    border-radius: 10px;
    border: 1px solid #ededed;
    margin: 0;
}
.db-fav-new-proj-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-body);
    color: #0a0a0a;
}
.db-fav-new-proj-input::placeholder { color: var(--c-text-muted); }
.db-fav-new-proj-btn {
    padding: 8px 14px;
    background: #0a0a0a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    white-space: nowrap;
    line-height: 1;
}
.db-fav-new-proj-btn:hover { background: #1a1a1a; }

/* 프로젝트 리스트 — 기존 .fav-project-item 를 카드형으로 (이모지/이니셜 + 이름) */
.db-fav-project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: none;
    overflow: visible;
}
.db-fav-project-list .fav-project-item {
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #ededed;
    color: #0a0a0a;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.db-fav-project-list .fav-project-item:hover {
    background: #fafafa;
    border-color: #d9d9d9;
}
.db-fav-project-list .fav-project-active {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
}
.db-fav-project-list .fav-project-active:hover {
    background: #0a0a0a;
    border-color: #0a0a0a;
}
.db-fav-proj-emoji {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--c-bg-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-display);
    flex-shrink: 0;
    color: #0a0a0a;
}
.db-fav-project-list .fav-project-active .db-fav-proj-emoji {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}
.db-fav-proj-name {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-fav-empty {
    color: var(--c-text-muted);
    font-size: 12px;
    padding: 14px 12px;
    text-align: center;
}
.db-fav-init-btn {
    margin-top: auto;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed #ededed;
    border-radius: 8px;
    color: var(--c-text-muted);
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-body);
}
.db-fav-init-btn:hover {
    color: var(--c-text);
    border-color: var(--c-text-muted);
}

/* RIGHT — main 카드 */
.db-fav-main {
    border: 1px solid #ededed;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    /* 기존 .fav-main 가 .card 안에 들었지만 새 디자인에선 자체 카드 */
}
.db-fav-main > .card { box-shadow: none; border: none; border-radius: 0; padding: 0; }

.db-fav-main-head {
    padding: 20px 24px;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.db-fav-main-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.db-fav-main-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--c-primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.db-fav-main-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0;
    color: #0a0a0a;
    line-height: 1.2;
}
.db-fav-main-sub {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.db-fav-main-head-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.db-fav-action {
    padding: 7px 12px;
    border: 1px solid #ededed;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    color: #0a0a0a;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.12s;
}
.db-fav-action:hover { background: #f7f7f7; }

/* 섹션 (CONSUMABLES / EQUIPMENT) */
.db-fav-section { padding: 20px 24px 16px; }
.db-fav-section + .db-fav-section { padding-top: 4px; }
.db-fav-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}
.db-fav-section-head-left {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.db-fav-section-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}
.db-fav-section-title-ko {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    letter-spacing: -0.2px;
}
.db-fav-section-count {
    font-family: var(--font-display);
    font-size: 11px;
    color: #0a0a0a;
    font-weight: 700;
}
.db-fav-section-add {
    font-size: 11px;
    color: var(--c-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.db-fav-section-add:hover { text-decoration: underline; }

/* 우측 액션 (+ 추가 / 📋 복사 / 🗑 선택 삭제) — 연구노트 db-nb-section-head-right
   와 동일 패턴. 모바일에선 헤더 아래로 풀폭 가로 분배. */
.db-fav-section-head-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* 테이블 — 기존 data-table 위에 라운드 + 헤더 톤 + 한 줄 ellipsis */
.db-fav-table-wrap {
    border: 1px solid #ededed;
    border-radius: 10px;
    overflow: hidden;
}
.db-fav-table thead th {
    background: var(--c-bg-soft);
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 1px solid #ededed;
}
.db-fav-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.db-fav-table tbody tr:last-child td { border-bottom: none; }
.db-fav-table tbody tr:hover td { background: #fafafa; cursor: pointer; }
.db-fav-table tbody td.empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--c-text-muted);
    font-size: 12px;
}

/* 모바일 — 1열 + sticky 해제 */
@media (max-width: 900px) {
    .db-fav-layout { grid-template-columns: minmax(0, 1fr); }
    .db-fav-aside { position: static; }
}
@media (max-width: 768px) {
    .v3-hero-with-counter { flex-direction: column; align-items: stretch; }
    .db-fav-counter-pair { gap: 16px; padding: 4px 0; align-self: stretch; }
    .db-fav-counter { text-align: left; }
    .db-fav-counter-value { font-size: 22px; }
    .db-fav-counter-divider { height: 22px; }
    .db-fav-main-head { padding: 14px 16px; }
    .db-fav-main-icon { width: 36px; height: 36px; font-size: 18px; }
    .db-fav-main-title { font-size: 16px; }
    .db-fav-section { padding: 14px 16px 10px; }
    .db-fav-table-wrap { border-radius: 8px; }
    /* 섹션 헤더 모바일 — 연구노트(db-nb-section-head) 와 동일 패턴.
       제목 영역 위, 액션 3개 가로 풀폭 분배. */
    .db-fav-section-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .db-fav-section-head-left { flex-wrap: wrap; }
    .db-fav-section-title-ko { font-size: 13px; }
    .db-fav-section-head-right {
        width: 100%;
        flex-wrap: nowrap;
    }
    .db-fav-section-head-right .db-nb-action {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 7px 8px;
        font-size: 11px;
    }
}

/* ============================================================
   v3 Direction B — 연구노트 표 생성 (PCNotebook 레퍼런스)
   ⚠ JS 의존 id (consumables-list-empty/table-wrap/thead/tbody/sel-count,
   equipment-list-empty/table-wrap/thead/tbody/sel-count, preview-area,
   export-consumables-table, export-equipment-table) + .export-select-toolbar,
   .export-select-all, .checkbox-label, .selection-count 클래스 모두 무수정.
   db-nb-* 클래스를 외곽 래퍼로만 추가.
   ============================================================ */

/* 섹션 카드 — 라운드 박스 (소모품 / 장비 / 미리보기 공통) */
.db-nb-section {
    border: 1px solid #ededed;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    margin-top: 20px;
}
.db-nb-section:first-of-type { margin-top: 0; }

.db-nb-section-head {
    padding: 16px 20px;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.db-nb-section-head-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}
.db-nb-section-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}
.db-nb-section-title-ko {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    letter-spacing: -0.2px;
}
.db-nb-section-count {
    font-family: var(--font-display);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--c-bg-soft);
    color: #0a0a0a;
    font-weight: 600;
}
.db-nb-section-head-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* 섹션 액션 버튼 (작은 outline) */
.db-nb-action {
    padding: 7px 12px;
    border: 1px solid #ededed;
    background: #ffffff;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-body);
    color: #0a0a0a;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.12s, border-color 0.12s;
    line-height: 1;
    white-space: nowrap;
}
.db-nb-action:hover { background: #f7f7f7; border-color: #d9d9d9; }
.db-nb-action-muted { color: var(--c-text-sub); }
.db-nb-action-muted:hover { color: var(--c-text); }

/* 섹션 빈 상태 */
.db-nb-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--c-text-muted);
    font-size: 13px;
}
.db-nb-empty a { color: var(--c-primary); font-weight: 600; text-decoration: none; }
.db-nb-empty a:hover { text-decoration: underline; }

/* 테이블 래퍼 — 섹션 카드 안 padding 없이 풀폭 (헤더 라운드만) */
.db-nb-table-wrap {
    padding: 0;
    background: transparent;
}
/* 셀렉션 툴바 — 회색 띠 (헤더 아래 첫 줄) */
.db-nb-table-wrap .db-nb-toolbar {
    padding: 10px 20px;
    background: var(--c-bg-soft);
    /* 기존 .export-select-toolbar 의 핑크 border + radius + margin 모두 해제 */
    border: none;
    border-bottom: 1px solid #ededed;
    border-radius: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
}
.db-nb-table-wrap .db-nb-toolbar .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #0a0a0a;
}
.db-nb-table-wrap .selection-count {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* 테이블 자체 — 라운드 카드 안에 풀폭, header 회색, hover 라이트.
   ⚠ .data-table 글로벌 룰의 table-layout: fixed 가 컬럼 폭을 부모에 강제
   고정해서 모바일 가로 스크롤(min-width: max-content) 이 무시됐음.
   여기서 table-layout: auto + width: auto + min-width: 100% 로 풀어줌.
   PC 에선 콘텐츠가 부모 폭보다 작으면 100% 차지 → 그대로 보임. */
.db-nb-table {
    table-layout: auto !important;
    width: auto !important;
    min-width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}
.db-nb-table thead th {
    background: var(--c-bg-soft);
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--c-text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 20px;
    border-bottom: 1px solid #ededed;
    text-align: left;
}
.db-nb-table tbody td {
    padding: 12px 20px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
    color: #0a0a0a;
}
.db-nb-table tbody tr:last-child td { border-bottom: none; }
.db-nb-table tbody tr:hover td { background: #fafafa; }

/* 하단 CTA 바 — READY TO EXPORT */
.db-nb-export-bar {
    margin-top: 24px;
    padding: 18px 24px;
    background: var(--c-bg-soft);
    border: 1px solid #ededed;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.db-nb-export-bar-left { min-width: 0; }
.db-nb-export-eyebrow {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.db-nb-export-text {
    font-size: 13px;
    color: #0a0a0a;
}
.db-nb-export-total {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--c-primary);
    font-size: 16px;
    letter-spacing: -0.3px;
}
.db-nb-export-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* 메인 CTA — 검정 + arrow */
.db-nb-cta {
    padding: 11px 22px;
    background: #0a0a0a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s;
    white-space: nowrap;
    line-height: 1;
}
.db-nb-cta:hover { background: #1a1a1a; }
.db-nb-cta-arrow { opacity: 0.5; }

/* 미리보기 섹션 — 라운드 카드 안 콘텐츠 */
.db-nb-section-preview .db-nb-section-head { padding-bottom: 12px; }
.db-nb-preview {
    padding: 20px;
}
.db-nb-preview .empty-state {
    color: var(--c-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 30px 0;
}

/* v3 미리보기 표 — buildPreviewTable() 가 생성하는 마크업.
   회색 헤더 + 흰색 행 + 라운드 카드. 모바일에선 가로 스크롤. */
.db-nb-preview-block + .db-nb-preview-block { margin-top: 24px; }
.db-nb-preview-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}
.db-nb-preview-scroll {
    border: 1px solid #ededed;
    border-radius: 10px;
    overflow: hidden;
}
.db-nb-preview-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 13px;
}
.db-nb-preview-table thead th {
    background: var(--c-bg-soft);
    color: var(--c-text-muted);
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid #ededed;
    text-align: left;
    white-space: nowrap;
}
.db-nb-preview-table tbody td {
    padding: 10px 14px;
    color: #0a0a0a;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: top;
}
.db-nb-preview-table tbody tr:last-child td { border-bottom: none; }
.db-nb-preview-table tbody tr:hover td { background: #fafafa; }

/* 모바일 — 섹션 패딩 축소 + Hero 카운터 가로 + CTA 풀폭
   사용자 피드백: 데스크탑 테이블이 가로 폭 부족으로 정보 잘림 →
   모바일에선 가로 스크롤로 전환 + thead 다시 표시 (소모품/장비 페이지의
   .table-scroll 패턴과 동일). 글로벌 룰 .table-scroll display:none 가
   .db-nb-table-scroll 에는 적용 안 됨. */
@media (max-width: 768px) {
    .db-nb-section { border-radius: 10px; margin-top: 16px; }
    .db-nb-section-head { padding: 12px 14px; gap: 10px; }
    .db-nb-section-head-right { width: 100%; }
    .db-nb-section-head-right .db-nb-action { flex: 1; justify-content: center; }

    /* 데스크탑 테이블 영역 모바일 표시 보장 (글로벌 .table-scroll 룰 영향 X) */
    .db-nb-section .db-nb-table-wrap { display: block !important; }
    .db-nb-table-wrap .db-nb-toolbar { padding: 10px 14px; font-size: 11px; }
    .db-nb-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .db-nb-table-scroll::-webkit-scrollbar { height: 6px; }
    .db-nb-table-scroll::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
    .db-nb-table {
        /* min-width: max-content 가 작동하려면 table-layout: auto 필요 — 위 룰에서 처리 */
        min-width: max-content !important;
        width: max-content !important;
    }
    .db-nb-table thead { display: table-header-group; }  /* 모바일에서도 헤더 표시 */
    /* 컴팩트 — 행 세로 높이를 줄이는 게 핵심 (사용자 피드백).
       padding 세로 4px + line-height 1.2 로 행 높이 최소화.
       max-width + ellipsis 는 가로 폭 안정용. */
    .db-nb-table thead th,
    .db-nb-table tbody td {
        padding: 6px 10px;      /* 사용자 피드백: 행 높이 살짝 더 — 너무 좁지 않게 */
        font-size: 12px;
        line-height: 1.3;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .db-nb-table thead th {
        padding: 7px 10px;      /* 헤더는 살짝 더 — eyebrow 가독성 */
        font-size: 9px;
    }
    /* 체크박스/삭제 컬럼은 가로/세로 둘 다 좁게 */
    .db-nb-table .col-check,
    .db-nb-table .col-action { max-width: 36px; padding: 4px 4px; }
    /* 체크박스 + 삭제 버튼 자체도 컴팩트 */
    .db-nb-table .export-row-check { width: 14px; height: 14px; }
    .db-nb-table .btn-remove { padding: 2px 6px; font-size: 12px; line-height: 1; }

    .db-nb-preview { padding: 14px; }
    .db-nb-preview-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .db-nb-preview-table { min-width: max-content; }
    .db-nb-preview-table thead th { font-size: 9px; padding: 8px 12px; }
    .db-nb-preview-table tbody td { padding: 8px 12px; font-size: 12px; white-space: nowrap; }

    .db-nb-export-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }
    .db-nb-export-actions { width: 100%; }
    .db-nb-export-actions > * { flex: 1; justify-content: center; }
    .db-nb-cta { padding: 12px 16px; }
}

/* ============================================================
   Settings Page — Sidebar Layout
   ============================================================ */

/* 설정 로그인 페이지 */
.settings-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--topbar-height) - 64px);
    padding: 40px 16px;
}
.settings-login-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.settings-login-icon {
    width: 52px;
    height: 52px;
    background: #fff5f7;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}
.settings-login-eyebrow {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.settings-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 8px;
    line-height: 1.2;
}
.settings-login-desc {
    font-size: 13px;
    color: var(--color-text-sub);
    margin-bottom: 24px;
    line-height: 1.6;
}
.settings-login-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.settings-login-field { margin-bottom: 16px; }
.settings-login-label {
    display: block;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.settings-login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.settings-login-input:focus {
    outline: none;
    border-color: #0a0a0a;
}
.settings-login-btn {
    width: 100%;
    padding: 14px;
    background: #0a0a0a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}
.settings-login-btn:hover { background: #222; }
.settings-login-note {
    margin-top: 20px;
    padding: 12px 14px;
    background: #fffbeb;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.6;
}

/* 설정 메인 — 2열 레이아웃 */
.settings-layout {
    display: flex;
    align-items: stretch;
    /* .content 의 padding(32px) 을 상쇄해 사이드바를 왼쪽 끝까지 */
    margin: calc(0px - var(--topbar-height)) -32px 0;
    padding-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
}

/* 사이드바 */
.settings-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fafafa;
    border-right: 1px solid #ededed;
    display: flex;
    flex-direction: column;
    padding: 28px 0 0;
    overflow: hidden;
}
.settings-sidebar-label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    padding: 0 20px 16px;
}
.settings-nav { flex: 1; overflow-y: auto; padding-bottom: 72px; }
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    margin: 2px 8px;
    width: calc(100% - 16px);
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}
.settings-nav-item:hover { background: #f0f0f0; }
.settings-nav-item.active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.settings-nav-icon { font-size: 16px; flex-shrink: 0; }
.settings-nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.settings-nav-title {
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.settings-nav-sub {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.settings-sidebar-footer {
    position: fixed;
    bottom: 24px;
    left: 60px;          /* 메인 네비 mini(접힘) 너비 */
    width: 220px;
    padding: 0 16px;
    z-index: 100;        /* 메인 네비 사이드바(110)보다 낮게 — hover 시 네비가 덮음 */
    transition: left 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
/* 메인 네비 고정(핀) 상태 */
body.sidebar-pinned .settings-sidebar-footer {
    left: 220px;
}
.settings-lock-btn {
    width: 100%;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-text-sub);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}
.settings-lock-btn:hover { background: #f5f5f5; color: #0a0a0a; }

/* 메인 콘텐츠 */
.settings-main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px 40px;
    overflow-y: auto;
}
.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-section-header {
    margin-bottom: 24px;
}
.settings-section-title {
    font-size: 26px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 6px 0 6px;
    line-height: 1.2;
}
.settings-section-desc {
    font-size: 13px;
    color: var(--color-text-sub);
    margin: 0;
}

/* 설정 카드 */
.settings-card {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 1px;
}
.settings-card + .settings-card { margin-top: 12px; }
.settings-card-eyebrow {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.settings-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.settings-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0a0a0a;
}
.settings-badge-ok {
    font-size: 11px;
    font-weight: 600;
    background: #f0fdf4;
    color: #15803d;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.settings-columns-detail summary {
    font-size: 13px;
    color: var(--color-text-sub);
    cursor: pointer;
    user-select: none;
}
.settings-columns-detail summary:hover { color: #0a0a0a; }

/* 연결 상태 */
.settings-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.settings-status-connected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #0a0a0a;
}
.settings-status-disconnected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-sub);
}
.settings-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.settings-dot.connected { background: #16a34a; }
.settings-dot.disconnected { background: #9ca3af; }
.settings-shared-badge {
    font-size: 11px;
    font-weight: 500;
    background: #f0fdf4;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 20px;
}
.settings-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}
.settings-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.settings-info-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    text-transform: uppercase;
}
.settings-info-value {
    font-size: 13px;
    color: #0a0a0a;
    font-weight: 500;
}
.settings-info-box {
    margin-top: 12px;
    margin-bottom: 16px;
    background: #f7f9ff;
    border: 1px solid #dde6ff;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--c-text-sub);
    line-height: 1.6;
}
.settings-info-box .settings-info-title {
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 8px;
    font-size: 13px;
}
.settings-info-box ul {
    margin: 6px 0 0 16px;
    padding: 0;
}
.settings-info-box li {
    margin-bottom: 4px;
}
.settings-info-box strong { color: #0a0a0a; }
.settings-warning-box {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 13px;
    color: #9a3412;
    line-height: 1.6;
}

/* 팁 카드 */
.settings-tip-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 12px;
}
.settings-tip-icon { font-size: 18px; flex-shrink: 0; }
.settings-tip-text { flex: 1; font-size: 13px; color: #92400e; line-height: 1.6; }
.settings-tip-text small { font-size: 11px; }
.settings-tip-btn {
    flex-shrink: 0;
    background: #0a0a0a !important;
    color: #fff !important;
    border-color: #0a0a0a !important;
    white-space: nowrap;
}

/* 모바일 설정 — iOS 스타일 목록 */
.settings-mb-shell { display: none; }

@media (max-width: 768px) {
    .settings-mb-shell {
        display: block;
        padding-bottom: 40px;
    }
    /* 모바일 사용자 카드 */
    .settings-mb-user-card {
        display: flex;
        align-items: center;
        gap: 14px;
        background: #0a0a0a;
        border-radius: 16px;
        padding: 18px 20px;
        margin: 0 16px 24px;
        color: #fff;
    }
    .settings-mb-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #D5224F;
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-family: var(--font-display);
    }
    .settings-mb-user-info { flex: 1; min-width: 0; }
    .settings-mb-user-name {
        font-size: 15px;
        font-weight: 700;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .settings-mb-user-email {
        font-size: 11px;
        color: rgba(255,255,255,0.55);
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .settings-mb-admin-badge {
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 1px;
        padding: 3px 8px;
        background: #D5224F;
        color: #fff;
        border-radius: 6px;
        flex-shrink: 0;
        font-family: var(--font-display);
    }
    /* 그룹 라벨 */
    .settings-mb-group-label {
        font-family: var(--font-display);
        font-size: 10px;
        font-weight: 600;
        color: var(--c-text-muted);
        letter-spacing: 1.2px;
        text-transform: uppercase;
        padding: 0 20px 8px;
        margin-top: 4px;
    }
    /* 그룹 컨테이너 */
    .settings-mb-group {
        background: #ffffff;
        border-radius: 14px;
        margin: 0 16px 20px;
        overflow: hidden;
    }
    /* 개별 행 */
    .settings-mb-row {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 13px 16px;
        background: none;
        border: none;
        border-bottom: 1px solid #f2f2f2;
        cursor: pointer;
        text-align: left;
        min-height: 56px;
        font-family: var(--font-body);
        transition: background 0.1s;
    }
    .settings-mb-row:last-child { border-bottom: none; }
    .settings-mb-row:active { background: #f5f5f5; }
    .settings-mb-row-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .settings-mb-row-body { flex: 1; min-width: 0; }
    .settings-mb-row-title {
        font-size: 14px;
        font-weight: 500;
        color: #0a0a0a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .settings-mb-row-title-danger { color: #ef4444; }
    .settings-mb-row-sub {
        font-size: 11px;
        color: var(--c-text-muted);
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .settings-mb-row-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    .settings-mb-row-danger { border: none; }
    .settings-mb-chevron {
        font-size: 18px;
        color: #ccc;
        flex-shrink: 0;
        line-height: 1;
    }
    .settings-mb-status-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    /* 상세 뷰 헤더 */
    .settings-mb-detail-bar {
        position: sticky;
        top: calc(var(--topbar-height) + 0px);
        background: #fff;
        border-bottom: 1px solid #ededed;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        z-index: 10;
        margin-bottom: 4px;
    }
    .settings-mb-back-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 14px;
        color: var(--c-text-muted);
        padding: 0;
        font-family: var(--font-body);
        white-space: nowrap;
        flex-shrink: 0;
    }
    .settings-mb-back-btn:hover { color: #0a0a0a; }
    .settings-mb-detail-title {
        font-size: 14px;
        font-weight: 600;
        color: #0a0a0a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 상세 뷰에서 settings-layout 조정 */
    #settings-layout-wrap .settings-layout {
        flex-direction: column;
        margin: 0;
        padding-top: 0;
    }
    #settings-layout-wrap .settings-sidebar { display: none; }
    #settings-layout-wrap .settings-sidebar-footer { display: none; }
    #settings-layout-wrap .settings-main { padding: 12px 16px 40px; }
    #settings-layout-wrap .settings-section-header { padding-top: 8px; }
    .settings-info-grid { grid-template-columns: 1fr; }
    .settings-status-row { flex-direction: column; align-items: flex-start; }
    .settings-login-card { padding: 28px 20px; }
    .settings-tip-card { flex-direction: column; align-items: flex-start; }
    /* section heading 크기 축소 */
    #settings-layout-wrap .settings-section-title { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════
   Dashboard — 다가오는 일정
═══════════════════════════════════════════════════════════ */
.db-upcoming-section { margin-bottom: 48px; }
.db-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.db-upcoming-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f7f7f7;
    border-radius: 10px;
    text-decoration: none;
    color: #0a0a0a;
    transition: background 0.12s;
}
.db-upcoming-row:hover { background: #f0f0f0; }
.db-upcoming-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.db-upcoming-info { flex: 1; min-width: 0; }
.db-upcoming-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-upcoming-meta {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-upcoming-cat {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font-display);
    letter-spacing: 0.3px;
}
.db-upcoming-empty {
    padding: 14px 16px;
    color: var(--c-text-muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   Notices page
═══════════════════════════════════════════════════════════ */
.nt-shell {
    max-width: 720px;
}
.nt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nt-loading, .nt-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--c-text-muted);
    font-size: 14px;
}
.nt-card {
    width: 100%;
    text-align: left;
    background: #f7f7f7;
    border: none;
    border-radius: 14px;
    padding: 20px 22px;
    cursor: pointer;
    transition: background 0.12s;
    font-family: var(--font-body);
}
.nt-card:hover { background: #f0f0f0; }
.nt-card-important { background: #fff0f4; }
.nt-card-important:hover { background: #ffe0e9; }
.nt-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.nt-tag {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}
.nt-tag-notice { background: #e9e9e9; color: #444; }
.nt-tag-important { background: #D5224F; color: #fff; }
.nt-card-date {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--c-text-muted);
    letter-spacing: 0.3px;
}
.nt-card-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.3;
    color: #0a0a0a;
    margin-bottom: 6px;
}
.nt-card-preview {
    font-size: 13px;
    color: var(--c-text-sub);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nt-card-author {
    font-size: 11px;
    color: var(--c-text-muted);
    margin-top: 10px;
    font-family: var(--font-display);
    letter-spacing: 0.2px;
}

/* detail panel */
.nt-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.nt-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-edit-btn, .nt-del-btn {
    background: none;
    border: 1px solid var(--c-divider);
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--c-text-sub);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.nt-edit-btn:hover { background: #f0f0f0; color: #0a0a0a; }
.nt-del-btn { border-color: #f5c6d3; color: #D5224F; }
.nt-del-btn:hover { background: #fff0f4; }
.nt-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--c-text-muted);
    padding: 0;
    transition: color 0.12s;
}
.nt-back-btn:hover { color: #0a0a0a; }
.nt-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.nt-detail-date {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--c-text-muted);
    letter-spacing: 0.5px;
}
.nt-detail-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
    color: #0a0a0a;
    margin: 0 0 10px;
}
.nt-detail-author {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-bottom: 28px;
    font-family: var(--font-display);
    letter-spacing: 0.3px;
}
.nt-detail-divider {
    border: none;
    border-top: 1px solid var(--c-divider);
    margin-bottom: 28px;
}
.nt-detail-content { max-width: 600px; }
.nt-detail-para {
    font-size: 15px;
    line-height: 1.7;
    color: #222;
    margin: 0 0 14px;
}
.nt-detail-empty { color: var(--c-text-muted); }

@media (max-width: 768px) {
    .nt-detail-title { font-size: 22px; }
    .nt-card { padding: 16px 18px; }
    .nt-card-title { font-size: 15px; }
}
