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

/* ============================================================
   MAGACHEM PORTAL — 디자인 시스템 (navy)
   로고 네이비 중심 / 화이트 상단바 / 여유 있는 밀도
   ============================================================ */

:root {
    /* Brand */
    --navy:        #1F3F7F;   /* 로고 마크 블루 — primary */
    --navy-deep:   #16233F;   /* 로고 워드마크 — ink */
    --navy-dark:   #182F60;   /* primary hover */
    --navy-soft:   #EDF1F9;   /* primary tint */
    --navy-line:   #C9D5EA;

    /* Neutrals */
    --ink:         #16233F;
    --ink-2:       #37465C;
    --muted:       #6B7788;
    --muted-2:     #96A0AF;
    --line:        #E4E8F0;
    --line-2:      #EFF2F7;
    --bg:          #F5F7FA;
    --surface:     #FFFFFF;
    --surface-2:   #FAFBFD;

    /* Semantic */
    --ok:          #17795F;
    --ok-bg:       #EDF8F3;
    --ok-line:     #BFE3D5;
    --warn:        #93601A;
    --warn-bg:     #FDF7EA;
    --warn-line:   #EFD9A8;
    --danger:      #A5322F;
    --danger-bg:   #FDF2F2;
    --danger-line: #F0CFCF;
    --info:        #2A5CA8;
    --info-bg:     #EEF3FB;

    /* Legacy aliases (기존 마크업 호환) */
    --navy-light:  #24488E;
    --teal:        #1F3F7F;
    --teal-dark:   #16233F;
    --white:       #FFFFFF;
    --gray-50:     #F5F7FA;
    --gray-100:    #EFF2F7;
    --gray-200:    #E4E8F0;
    --gray-300:    #CBD3E0;
    --gray-400:    #96A0AF;
    --gray-500:    #6B7788;
    --gray-600:    #4E5C70;
    --gray-700:    #37465C;
    --gray-800:    #16233F;
    --green:       #17795F;
    --green-bg:    #EDF8F3;
    --orange:      #93601A;
    --orange-bg:   #FDF7EA;
    --blue:        #2A5CA8;
    --blue-bg:     #EEF3FB;
    --red:         #A5322F;

    --r-sm: 6px;
    --r:    9px;
    --r-lg: 14px;
    --sh-1: 0 1px 2px rgba(22,35,63,.05);
    --sh-2: 0 1px 3px rgba(22,35,63,.06), 0 8px 24px -16px rgba(22,35,63,.18);
    --sh-3: 0 24px 60px -28px rgba(8,15,28,.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum';
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-deep); text-decoration: underline; }
::selection { background: rgba(31,63,127,.16); }

/* ============================================================
   아이콘 (이모지 대체) — <i class="ic ic-save"></i>
   ============================================================ */
.ic {
    display: inline-block;
    width: 1.05em; height: 1.05em;
    vertical-align: -0.16em;
    background-color: currentColor;
    -webkit-mask: var(--ic) center / contain no-repeat;
            mask: var(--ic) center / contain no-repeat;
    flex: 0 0 auto;
}
.ic-lg { width: 1.3em; height: 1.3em; vertical-align: -0.28em; }
.ic-flame   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5Z'/%3E%3C/svg%3E"); }
.ic-list    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.ic-sliders { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E"); }
.ic-award   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M15.5 13.5 17 22l-5-3-5 3 1.5-8.5'/%3E%3C/svg%3E"); }
.ic-check   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ic-alert   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ic-save    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/svg%3E"); }
.ic-plus    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ic-printer { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 14h12v8H6z'/%3E%3C/svg%3E"); }
.ic-clip    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E"); }
.ic-search  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
.ic-file    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); }
.ic-copy    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
.ic-download{ --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E"); }
.ic-upload  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/%3E%3C/svg%3E"); }
.ic-folder  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E"); }
.ic-layers  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z'/%3E%3Cpath d='M22 17.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65M22 12.65l-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'/%3E%3C/svg%3E"); }
.ic-roll    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ic-box     { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18M9 21V9'/%3E%3C/svg%3E"); }
.ic-building{ --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3E%3Cpath d='M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2M10 6h4M10 10h4M10 14h4'/%3E%3C/svg%3E"); }
.ic-info    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.ic-user    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.ic-logout  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
.ic-back    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E"); }
.ic-gauge   { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20a8 8 0 1 0-8-8'/%3E%3Cpath d='M12 12 7 8M2 12h2M12 4v2M20 12h2M19 5l-1.4 1.4'/%3E%3C/svg%3E"); }
.ic-lock    { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }

/* ============================================================
   상단바 (화이트) + 네비게이션
   ============================================================ */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-left .logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 800; letter-spacing: -.02em;
    color: var(--navy-deep); text-decoration: none;
}
.header-left .logo:hover { text-decoration: none; }
.header-left .logo img { height: 20px; width: auto; display: block; }
.header-left .badge {
    white-space: nowrap;
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    color: var(--navy); background: var(--navy-soft);
    border: 1px solid var(--navy-line);
    border-radius: 20px; padding: 2px 10px;
}
.header-divider { width: 1px; height: 22px; background: var(--line); }
.header-app { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-right .user-name,
.header-right a.user-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ink-2);
    text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm);
}
.header-right a.user-link:hover { background: var(--line-2); text-decoration: none; }
.header-right .btn-logout {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 7px 13px;
    background: var(--surface); color: var(--ink-2);
    border: 1px solid var(--line); border-radius: var(--r-sm);
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    text-decoration: none; font-family: inherit;
    transition: background .15s, border-color .15s;
}
.header-right .btn-logout:hover { background: var(--line-2); border-color: var(--navy-line); color: var(--navy-deep); text-decoration: none; }

.nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
    position: sticky; top: 62px; z-index: 99;
}
.nav a {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 12px 12px 11px;
    font-size: 13.5px; font-weight: 600; letter-spacing: -.01em;
    color: var(--muted); text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--navy-deep); text-decoration: none; }
.nav a.on { color: var(--navy); border-bottom-color: var(--navy); }

/* ============================================================
   레이아웃
   ============================================================ */
.container { max-width: 1140px; margin: 0 auto; padding: 34px 24px 56px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 34px 24px 56px; }
.fs-wrap { max-width: 1600px; margin: 0 auto; padding: 28px 24px 72px; }
.fs-h1 {
    font-size: 24px; font-weight: 700; letter-spacing: -.025em; color: var(--ink);
    margin: 0 0 6px; display: flex; align-items: center; gap: 10px;
}
.fs-h1 .ic { color: var(--navy); }
.fs-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; line-height: 1.7; }
.fs-sub a { font-weight: 600; }

/* ============================================================
   카드
   ============================================================ */
.fs-card, .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    padding: 22px;
    margin-bottom: 18px;
}
.card { padding: 0; overflow: hidden; }
.card-header {
    padding: 18px 22px; border-bottom: 1px solid var(--line-2);
    display: flex; justify-content: space-between; align-items: center;
}
.card-header h2 { font-size: 15px; font-weight: 700; color: var(--ink); }
.card-body { padding: 22px; }

.fs-title {
    font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: var(--ink);
    margin: 0 0 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fs-title .ic { color: var(--navy); }
.fs-note { font-size: 12.5px; color: var(--muted); font-weight: 400; letter-spacing: -.005em; }
.section-title {
    font-size: 14px; font-weight: 700; color: var(--ink);
    margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.section-title .count {
    font-size: 11px; font-weight: 700; color: var(--muted);
    background: var(--line-2); padding: 2px 9px; border-radius: 10px;
}

/* ============================================================
   폼
   ============================================================ */
.fs-grid { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.fs-f { display: flex; flex-direction: column; gap: 6px; }
.fs-f label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.fs-f input, .fs-f select,
.form-group input, .form-group select, .form-group textarea {
    border: 1px solid #DDE3EC;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-2);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-group { margin-bottom: 18px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 13px; font-size: 14px; }
.fs-f input:focus, .fs-f select:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--navy); background: var(--surface);
    box-shadow: 0 0 0 3px rgba(31,63,127,.12);
}
.form-group textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #A9B2C0; }
select { appearance: none; -webkit-appearance: none; background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7788' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; padding-right: 28px; }
input[type="checkbox"] { accent-color: var(--navy); width: 15px; height: 15px; }

.fs-mini { width: 66px; border: 1px solid #DDE3EC; border-radius: 6px; padding: 5px; text-align: center; font-size: 12.5px; font-family: inherit; color: var(--ink); background: var(--surface); }
.fs-mini:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(31,63,127,.12); }
.fs-qty { width: 60px; border: 1px solid var(--navy-line); background: var(--navy-soft); border-radius: 6px; padding: 5px; text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); font-family: inherit; }
.fs-qty:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(31,63,127,.14); }
.fs-in { width: 88px; border: 1px solid #DDE3EC; border-radius: 6px; padding: 5px 7px; text-align: right; font-size: 12.5px; font-family: inherit; color: var(--ink); background: var(--surface); }
.fs-in:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 2px rgba(31,63,127,.12); }
.fs-in.s { width: 62px; text-align: center; }

/* ============================================================
   버튼
   ============================================================ */
.fs-btn, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; border-radius: 8px;
    padding: 9px 16px;
    font-size: 13.5px; font-weight: 600; font-family: inherit; letter-spacing: -.01em;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--navy); color: #fff;
    transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.fs-btn:hover, .btn:hover { background: var(--navy-dark); color: #fff; text-decoration: none; }
.fs-btn:active, .btn:active { transform: translateY(1px); }
.fs-btn:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
.fs-btn.o, .btn-outline {
    background: var(--surface); color: var(--navy); border-color: var(--navy-line);
}
.fs-btn.o:hover, .btn-outline:hover { background: var(--navy-soft); color: var(--navy-deep); border-color: var(--navy); }
.fs-btn.g, .btn-gray {
    background: var(--surface); color: var(--ink-2); border-color: var(--line);
}
.fs-btn.g:hover, .btn-gray:hover { background: var(--line-2); color: var(--ink); border-color: #D3DAE6; }
.fs-btn.b { background: var(--navy-deep); }
.fs-btn.b:hover { background: #0F1A31; }
.fs-btn.r { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.fs-btn.r:hover { background: var(--danger-bg); color: #8A2724; }
.fs-btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-primary { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; }
.btn-outline { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; }
.btn-teal { background: var(--navy); color: #fff; }
.btn-green { background: var(--ok); color: #fff; }
.btn-small { padding: 5px 12px; font-size: 12px; }

.fs-cp {
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    border: 1px solid var(--line); background: var(--surface);
    border-radius: 6px; cursor: pointer;
    font-size: 11.5px; font-weight: 600; font-family: inherit;
    padding: 3px 8px; color: var(--ink-2); text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.fs-cp:hover { background: var(--navy); color: #fff; border-color: var(--navy); text-decoration: none; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; color: var(--muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 0; margin-bottom: 16px; text-decoration: none; font-family: inherit;
}
.back-link:hover { color: var(--navy); }

/* ============================================================
   탭
   ============================================================ */
.fs-tabs { display: flex; gap: 6px; margin: 0 0 -1px; flex-wrap: wrap; position: relative; z-index: 1; }
.fs-tab {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 10px 17px;
    border: 1px solid var(--line); border-bottom-color: transparent;
    border-radius: 10px 10px 0 0;
    background: var(--surface-2); color: var(--muted);
    font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.fs-tab:hover { color: var(--ink); }
.fs-tab.on { background: var(--surface); color: var(--navy); border-color: var(--line); box-shadow: inset 0 2px 0 var(--navy); }

/* ============================================================
   표
   ============================================================ */
.fs-scroll { overflow-x: auto; border-radius: var(--r); }
table.fs-t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; white-space: nowrap; }
table.fs-t th, table.fs-t td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 9px 11px; text-align: center; }
table.fs-t th:last-child, table.fs-t td:last-child { border-right: 0; }
table.fs-t thead th {
    background: var(--surface-2); border-bottom: 1px solid var(--line);
    font-weight: 600; color: var(--ink-2); font-size: 11.5px; letter-spacing: .01em;
    position: relative;
}
table.fs-t thead th a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
table.fs-t thead th a:hover { color: var(--navy); }
table.fs-t td.l { text-align: left; }
table.fs-t td.r { text-align: right; font-variant-numeric: tabular-nums; }
table.fs-t tbody tr:hover { background: #FAFBFE; }
table.fs-t td.sum { background: var(--surface-2); font-weight: 700; color: var(--ink); }
table.fs-t tbody tr:last-child td { border-bottom: 0; }

.fs-total {
    display: flex; justify-content: flex-end; gap: 30px; align-items: baseline;
    padding: 18px 4px 0; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2);
}
.fs-total b { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fs-total span:last-child b { font-size: 24px; color: var(--navy); letter-spacing: -.02em; }
.fs-empty { padding: 34px; text-align: center; color: var(--muted-2); font-size: 13px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.info-row .label { color: var(--muted); }
.info-row .value { color: var(--ink); font-weight: 600; }

/* ============================================================
   태그 · 배지 · 메시지
   ============================================================ */
.fs-tag {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    background: var(--navy-soft); color: var(--navy);
    border: 1px solid var(--navy-line);
    border-radius: 20px; padding: 2px 9px;
    font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.fs-tag.ok   { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.fs-tag.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.fs-tag.no   { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-blue  { background: var(--info-bg); color: var(--info); }
.badge-green { background: var(--ok-bg); color: var(--ok); }
.badge-orange{ background: var(--warn-bg); color: var(--warn); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-blue .dot { background: var(--info); }
.badge-green .dot { background: var(--ok); }
.badge-orange .dot { background: var(--warn); }

.fs-msg, .success-msg {
    display: flex; align-items: flex-start; gap: 9px;
    background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok);
    border-radius: var(--r); padding: 12px 15px; font-size: 13px; font-weight: 500;
    margin-bottom: 16px; line-height: 1.6;
}
.fs-warn {
    background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn);
    border-radius: var(--r); padding: 13px 15px; font-size: 12.5px; line-height: 1.7;
    margin-bottom: 18px;
}
.error-msg {
    display: flex; align-items: flex-start; gap: 9px;
    background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger);
    padding: 12px 15px; border-radius: var(--r); font-size: 13px; margin-bottom: 18px;
}
.fs-x { color: var(--danger); cursor: pointer; font-weight: 700; }
.fs-x:hover { color: #8A2724; }

/* 상태 셀렉트 (견적 목록) */
select.st-sel {
    border: 1px solid transparent; border-radius: 20px;
    padding: 3px 22px 3px 10px; font-size: 11.5px; font-weight: 600; font-family: inherit;
    background-position: right 5px center; background-size: 12px; cursor: pointer;
}
.st-draft { background-color: var(--line-2); color: var(--ink-2); }
.st-sent  { background-color: var(--info-bg); color: var(--info); }
.st-order { background-color: var(--ok-bg); color: var(--ok); }
.st-hold  { background-color: var(--warn-bg); color: var(--warn); }
.st-done  { background-color: #E7EBF2; color: var(--ink-2); }

/* ============================================================
   업로드 / 드롭존
   ============================================================ */
.fs-drop, .upload-area {
    border: 1.5px dashed #CFD7E4; border-radius: var(--r);
    padding: 26px 20px; text-align: center;
    color: var(--muted); font-size: 13.5px; cursor: pointer;
    background: var(--surface-2);
    transition: border-color .15s, background .15s, color .15s;
    display: block; width: 100%;
}
.fs-drop b { color: var(--ink); font-weight: 600; }
.fs-drop.over, .upload-area:hover, .upload-area.dragover {
    border-color: var(--navy); background: var(--navy-soft); color: var(--navy);
}
.upload-area .icon { font-size: 22px; margin-bottom: 6px; color: var(--navy); }
.upload-area .text { font-size: 13px; color: var(--muted); font-weight: 500; }
.upload-area .hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.upload-preview .thumb { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.upload-preview .thumb img { height: 80px; max-width: 140px; object-fit: cover; display: block; }
.upload-preview .remove {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(22,35,63,.65); color: #fff; border: 0; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.fs-cand {
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 11px 13px; margin-top: 9px; font-size: 12.5px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.fs-cand.best { border-color: var(--navy-line); background: var(--navy-soft); }

/* NAS 경로 */
.fs-nas { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 16px; font-size: 13px; }
.fs-nas-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.fs-nas code {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 6px; padding: 4px 9px; font-size: 12px;
    user-select: all; word-break: break-all; color: var(--ink-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============================================================
   토스트 · 스피너 · 페이지네이션
   ============================================================ */
.fs-toast {
    position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
    background: var(--navy-deep); color: #fff;
    padding: 11px 20px; border-radius: 22px;
    font-size: 13px; font-weight: 600;
    box-shadow: 0 12px 30px -12px rgba(8,15,28,.6);
    opacity: 0; transition: opacity .18s; pointer-events: none; z-index: 9999;
}
.fs-toast.on { opacity: .97; }
.fs-spin {
    display: inline-block; width: 13px; height: 13px;
    border: 2px solid var(--line); border-top-color: var(--navy);
    border-radius: 50%; animation: fsr .7s linear infinite; vertical-align: -2px;
}
@keyframes fsr { to { transform: rotate(360deg); } }

.pg { display: flex; gap: 6px; justify-content: center; margin-top: 18px; font-size: 13px; }
.pg a, .pg b {
    min-width: 32px; text-align: center;
    padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px;
    text-decoration: none; color: var(--ink-2); font-weight: 500;
}
.pg a:hover { border-color: var(--navy-line); background: var(--navy-soft); color: var(--navy); }
.pg b { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 700; }

.stat { display: flex; gap: 26px; font-size: 13.5px; color: var(--ink-2); margin: 0 0 16px; flex-wrap: wrap; }
.stat b { color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--sh-1); }
.stat-card .label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.stat-card .value { font-size: 27px; font-weight: 700; letter-spacing: -.02em; }

/* ============================================================
   기타 (프로젝트 카드 · 타임라인 · 이력 · 리비전 · 라이트박스)
   ============================================================ */
.project-row {
    padding: 18px 22px; border-bottom: 1px solid var(--line-2);
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: background .15s; text-decoration: none; color: inherit;
}
.project-row:hover { background: var(--surface-2); }
.project-row .title { font-size: 14px; font-weight: 600; color: var(--ink); }
.project-row .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.project-row .right { display: flex; align-items: center; gap: 16px; }
.project-row .stage { font-size: 12px; color: var(--muted); }
.project-row .arrow { color: var(--muted-2); font-size: 18px; }
.project-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 22px; margin-bottom: 16px; box-shadow: var(--sh-1);
    cursor: pointer; transition: box-shadow .2s, transform .15s, border-color .2s;
    text-decoration: none; display: block; color: inherit;
}
.project-card:hover { box-shadow: var(--sh-2); border-color: var(--navy-line); transform: translateY(-1px); }

.timeline-wrapper { padding: 24px 0; }
.timeline { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.timeline-bar { position: absolute; top: 20px; left: 7%; right: 7%; height: 2px; background: var(--line); }
.timeline-bar-active { position: absolute; top: 20px; left: 7%; height: 2px; background: var(--navy); transition: width .5s ease; }
.timeline-step { display: flex; flex-direction: column; align-items: center; z-index: 2; flex: 1; }
.timeline-dot { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all .3s ease; }
.timeline-dot.completed { background: var(--navy); border: 2px solid var(--navy); color: #fff; }
.timeline-dot.active { background: var(--navy-deep); border: 2px solid var(--navy-deep); color: #fff; box-shadow: 0 0 0 4px rgba(31,63,127,.16); }
.timeline-dot.pending { background: var(--surface); border: 2px solid var(--line); color: var(--muted-2); }
.timeline-label { margin-top: 9px; font-size: 11px; text-align: center; max-width: 82px; line-height: 1.35; color: var(--ink-2); }
.timeline-label.active { font-weight: 700; color: var(--navy); }
.timeline-label.pending { color: var(--muted-2); }

.history-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.history-dot.done { background: var(--navy); }
.history-dot.active { background: var(--warn); }
.history-dot.pending { background: var(--line); }
.history-date { font-size: 12px; color: var(--muted-2); width: 56px; flex-shrink: 0; }
.history-text { font-size: 13px; }
.history-text.done { color: var(--muted); text-decoration: line-through; }
.history-text.active { color: var(--navy); font-weight: 700; }
.history-text.pending { color: var(--muted-2); }

.write-box { padding: 20px; background: var(--surface-2); border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 20px; }
.write-box .title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.revision-item { padding: 17px; background: var(--surface-2); border-radius: var(--r); margin-bottom: 12px; border: 1px solid var(--line); }
.revision-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.revision-author { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.revision-date { font-size: 11px; color: var(--muted-2); margin-left: 10px; }
.revision-content { font-size: 13px; color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; }
.revision-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.revision-images img { height: 100px; max-width: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.revision-admin { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.revision-reply { margin-top: 10px; padding: 12px; background: var(--surface); border-radius: 8px; border-left: 3px solid var(--navy); }
.revision-reply .author { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.revision-reply .text { font-size: 13px; color: var(--ink-2); }

.video-container { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r); overflow: hidden; background: var(--navy-deep); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-tip { margin-top: 12px; padding: 11px 14px; background: var(--info-bg); border-radius: 8px; font-size: 12px; color: var(--info); display: flex; align-items: center; gap: 8px; }
.video-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

.lightbox { position: fixed; inset: 0; background: rgba(8,15,28,.88); z-index: 1000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: var(--sh-3); }
.lightbox .close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; border: 0; font-size: 20px; cursor: pointer; }

.footer { text-align: center; padding: 28px; font-size: 11.5px; color: var(--muted-2); }

/* ============================================================
   인쇄
   ============================================================ */
@media print {
    body { background: #fff; }
    .header, .nav, .fs-noprint { display: none !important; }
    .fs-card, .card { border: 0; box-shadow: none; padding: 0; margin-bottom: 10px; }
    .fs-wrap { padding: 0; max-width: none; }
    table.fs-t { font-size: 10.5px; }
    table.fs-t th, table.fs-t td { padding: 4px 6px; border: 1px solid #9AA4B4; }
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 900px) {
    .header { padding: 0 16px; height: 58px; }
    .nav { padding: 0 10px; top: 58px; }
    .nav a { padding: 11px 9px; font-size: 13px; }
    .header-app, .header-divider { display: none; }
    .fs-wrap { padding: 20px 14px 56px; }
    .fs-h1 { font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .container, .container-narrow { padding: 22px 16px 44px; }
    .fs-card, .card-body { padding: 17px; }
    .timeline-dot { width: 32px; height: 32px; font-size: 14px; }
    .timeline-label { font-size: 10px; max-width: 62px; }
}

/* ============================================================
   진행 상태 배지 · 상태 탭 · 실시간 표시
   ============================================================ */
.st-badge {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    border-radius: 20px; padding: 3px 11px 3px 9px;
    font-size: 11.5px; font-weight: 700; letter-spacing: -.01em;
    border: 1px solid transparent;
}
.st-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.st-badge.st-draft, .st-tabs a.st-draft.on, .db-step.st-draft { background: var(--line-2); color: var(--ink-2); border-color: #DCE2EC; }
.st-badge.st-sent,  .st-tabs a.st-sent.on,  .db-step.st-sent  { background: var(--info-bg); color: var(--info); border-color: #C9D8F0; }
.st-badge.st-order, .st-tabs a.st-order.on, .db-step.st-order { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.st-badge.st-hold,  .st-tabs a.st-hold.on,  .db-step.st-hold  { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.st-badge.st-done,  .st-tabs a.st-done.on,  .db-step.st-done  { background: #E7EBF2; color: #4E5C70; border-color: #D3DAE6; }
select.st-change {
    border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
    padding: 2px 4px 2px 6px; font-size: 11px; font-weight: 600; color: var(--muted); font-family: inherit;
    margin-left: 4px; cursor: pointer; max-width: 72px;
}
select.st-change:hover { color: var(--navy); border-color: var(--navy-line); }
.st-tabs {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin: 0 0 14px;
}
.st-tabs a {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 7px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
    color: var(--muted); background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.st-tabs a b { font-weight: 800; }
.st-tabs a .st-dot { opacity: .45; }
.st-tabs a.on { color: var(--navy); border-color: var(--navy); background: var(--navy-soft); }
.st-tabs a.on .st-dot { opacity: 1; }
.st-tabs a:hover { text-decoration: none; border-color: var(--navy-line); }
.live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--muted-2); margin-right: 5px; vertical-align: middle;
}
.live-dot.ok { background: var(--ok); box-shadow: 0 0 0 0 rgba(23,121,95,.5); animation: livepulse 2.4s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(23,121,95,.45); } 70% { box-shadow: 0 0 0 7px rgba(23,121,95,0); } 100% { box-shadow: 0 0 0 0 rgba(23,121,95,0); } }

/* ============================================================
   대시보드
   ============================================================ */
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.db-live { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.db-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.db-step {
    flex: 1 1 150px; min-width: 150px; text-decoration: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 16px 18px 14px; box-shadow: var(--sh-1); transition: transform .12s, box-shadow .12s;
    display: flex; flex-direction: column; gap: 3px;
}
.db-step:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
.db-step-n { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.db-step-n small { font-size: 13px; font-weight: 600; margin-left: 3px; opacity: .8; }
.db-step-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; }
.db-step-a { font-size: 12px; opacity: .75; font-weight: 600; }
.db-step.db-step-sm { flex: 0 1 130px; min-width: 120px; }
.db-step.db-step-total { flex: 0 1 160px; background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.db-arrow { align-self: center; font-size: 26px; color: var(--muted-2); font-weight: 300; padding: 0 2px; }
.db-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; position: relative; }
.db-kpi {
    flex: 1 1 180px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
    padding: 12px 15px;
}
.db-kpi-t { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.db-kpi-t .ic { color: var(--navy); }
.db-kpi-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }
.db-kpi-s { font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.db-kpi-ym { position: absolute; right: 4px; top: -20px; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .db-grid { grid-template-columns: 1fr; } }
.db-main .fs-card, .db-side .fs-card { margin-bottom: 16px; }
.db-main .fs-title, .db-side .fs-title { display: flex; align-items: center; gap: 8px; }
.db-log { list-style: none; margin: 0; padding: 0; max-height: 620px; overflow-y: auto; }
.db-log li { padding: 9px 0 9px 14px; border-left: 2px solid var(--line); font-size: 12.5px; line-height: 1.55; position: relative; }
.db-log li::before { content: ''; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.db-log li.lg-quote_new::before, .db-log li.lg-import::before, .db-log li.lg-cert::before, .db-log li.lg-cert_import::before { background: var(--ok); }
.db-log li.lg-status::before { background: var(--info); }
.db-log li.lg-quote_delete::before, .db-log li.lg-import_fail::before { background: var(--danger); }
.db-log li.lg-login::before { background: var(--muted-2); }
.db-log-t { font-size: 11px; font-weight: 700; color: var(--muted); }
.db-log-d { font-size: 11.5px; white-space: normal; word-break: break-all; }
.db-master .db-m { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.db-master .db-m span { color: var(--muted); font-weight: 600; }
.db-master .db-m b { font-size: 16px; font-weight: 800; }
.db-master .db-m b small { font-size: 11.5px; font-weight: 600; color: var(--muted-2); }
.db-master .db-m.warn b { color: var(--warn); }
.db-master .db-m-links { padding-top: 10px; font-size: 12.5px; font-weight: 600; }
.db-trend { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 6px 6px 0; position: relative; }
.db-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.db-bar-v { font-size: 11px; font-weight: 700; color: var(--ink-2); height: 16px; }
.db-bar-b { width: 100%; max-width: 54px; background: #C9D5EA; border-radius: 6px 6px 0 0; min-height: 3px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; flex: none; }
.db-bar-o { background: var(--navy); width: 100%; }
.db-bar-l { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.db-bar-a { font-size: 10.5px; color: var(--muted-2); font-weight: 600; height: 14px; }
.db-legend { position: absolute; right: 8px; top: -2px; display: flex; gap: 12px; font-size: 11px; color: var(--muted); font-weight: 600; }
.db-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }

/* 견적 목록 — 견적번호 아래 문서 링크 */
.doc-links { display: flex; gap: 4px; margin-top: 4px; }
.doc-links a { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 5px; padding: 2px 6px; text-decoration: none; }
.doc-links a:hover { color: var(--navy); background: var(--navy-soft); text-decoration: none; }
.doc-links .ic { width: .95em; height: .95em; }
