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

/* =========================================================
   ERP Intranet — Design System  v2 "Quiet Precision"
   Refined enterprise console: indigo identity, hairline
   borders, layered soft shadows, calm motion.
   (Class & variable names preserved so every page inherits.)
   ========================================================= */

:root {
    /* surfaces */
    --bg: #F6F7FB;
    --bg-deep: #EEF0F7;
    --panel: #FFFFFF;
    --panel-2: #FBFBFE;

    /* ink */
    --ink: #151A28;
    --ink-soft: #2C3242;
    --muted: #707889;
    --muted-2: #9AA1B2;

    /* lines */
    --line: #E7E9F2;
    --line2: #EFF1F7;

    /* brand */
    --accent: #4F46E5;
    --accent-ink: #4338CA;
    --accent-2: #6366F1;
    --accent-soft: #EEF0FF;
    --accent-grad: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);

    /* semantic */
    --good: #0D9488;
    --good-soft: #E5F6F3;
    --warn: #D97706;
    --warn-soft: #FCF1E2;
    --bad: #E11D48;
    --bad-soft: #FCE9EE;

    /* elevation */
    --shadow-xs: 0 1px 2px rgba(20,24,48,.05);
    --shadow: 0 1px 2px rgba(20,24,48,.04), 0 10px 26px -12px rgba(20,24,48,.16);
    --shadow-lg: 0 8px 18px -8px rgba(20,24,48,.18), 0 30px 60px -24px rgba(20,24,48,.22);

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 22px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(99,102,241,.06), transparent 60%),
        var(--bg);
    color: var(--ink);
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;
}

::selection { background: rgba(79,70,229,.18); }

/* slim, modern scrollbars */
* { scrollbar-width: thin; scrollbar-color: #D3D7E4 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #D3D7E4; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #B9BFD2; background-clip: content-box; }

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

/* ---------- headings / page intro ---------- */
.section-title { margin: 0 0 14px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
    background: var(--accent-grad); color: #fff;
    padding: 10px 17px; border-radius: var(--r-sm);
    font-weight: 700; font-size: 14px; letter-spacing: -0.01em;
    border: none; cursor: pointer;
    box-shadow: 0 1px 1px rgba(20,24,48,.04), 0 8px 18px -10px rgba(79,70,229,.7);
    transition: transform .14s ease, box-shadow .18s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 2px rgba(20,24,48,.05), 0 14px 26px -10px rgba(79,70,229,.6); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-ghost {
    background: var(--panel); color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 9px 15px; border-radius: var(--r-sm);
    font-weight: 600; font-size: 14px;
    cursor: pointer; transition: background .15s, border-color .15s, transform .14s;
    text-decoration: none; display: inline-block;
}
.btn-ghost:hover { background: var(--panel-2); border-color: #D7DBE8; transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }

/* ---------- fields ---------- */
.field {
    width: 100%; padding: 11px 13px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: #fff; outline: none; font-size: 14px; color: var(--ink);
    transition: border .15s, box-shadow .15s, background .15s;
}
.field::placeholder { color: var(--muted-2); }
.field:hover { border-color: #D7DBE8; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,.14); background: #fff; }
textarea.field { resize: vertical; min-height: 76px; line-height: 1.6; }

.lbl { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: block; letter-spacing: .01em; }

/* ---------- cards ---------- */
.card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ---------- chips / badges ---------- */
.chip {
    font-size: 11px; font-weight: 700; border-radius: 7px;
    padding: 3px 8px; color: #fff; line-height: 1.3; display: inline-block;
    letter-spacing: .01em; box-shadow: 0 1px 1px rgba(20,24,48,.08);
}
.badge {
    font-size: 11px; font-weight: 800; padding: 3px 9px;
    border-radius: 999px; display: inline-block; letter-spacing: .01em;
}

/* ---------- tables ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
table th {
    text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 800;
    padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
    text-transform: uppercase; letter-spacing: .04em;
    background: linear-gradient(180deg, #FBFBFE, #F7F8FC);
}
table td {
    font-size: 14px; padding: 12px; border-bottom: 1px solid var(--line2);
    white-space: nowrap; color: var(--ink-soft);
}
table tbody tr { transition: background .12s; }
table tbody tr:hover td { background: #F7F8FE; }
table tbody tr:last-child td { border-bottom: none; }

/* ---------- info banner ---------- */
.info {
    background: linear-gradient(180deg, #F2F3FF, var(--accent-soft));
    color: var(--accent-ink);
    padding: 12px 15px; border-radius: var(--r-sm); font-size: 12.5px; margin: 12px 0;
    border: 1px solid #E3E5FB;
}

/* ---------- KPI cards ---------- */
.kpi {
    position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 17px 18px 18px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.kpi::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-grad); opacity: .9;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #DEE1EE; }
.kpi .k-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .k-value { font-size: 27px; font-weight: 800; margin-top: 7px; letter-spacing: -.03em; color: var(--ink); }
a.kpi { text-decoration: none; color: inherit; }

/* ---------- tabs ---------- */
.tabbar { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
    background: var(--bg-deep); padding: 5px; border-radius: 12px; width: fit-content;
    border: 1px solid var(--line2); }
.tab { padding: 8px 15px; border-radius: 9px; font-size: 14px; font-weight: 700;
       color: var(--muted); background: transparent; text-decoration: none; border: none; cursor: pointer;
       transition: color .15s, background .15s, box-shadow .15s; }
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--accent-ink); background: #fff; box-shadow: var(--shadow-xs); }

/* ---------- progress bars ---------- */
.bar-track { background: var(--bg-deep); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent-grad);
    transition: width .5s cubic-bezier(.22,.61,.36,1); }

/* ---------- entrance motion ---------- */
main { animation: pageIn .4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
    .hide-sm { display: none !important; }
    .kpi .k-value { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
