@import url("/fonts/pretendard/pretendard.css");

/* 
px	rem
8px		0.5rem
10px	0.625rem
12px	0.75rem
14px	0.875rem
16px	1rem
18px	1.125rem
20px	1.25rem
24px	1.5rem
32px	2rem 
*/

:root {
    --bs-body-font-family: "pretendard", sans-serif;

    /* ── Gray Scale ── */
    --gray-50: #fafbfc;
    --gray-100: #f5f6fa;
    --gray-200: #eef1f6;
    --gray-300: #e7e7e8;
    --gray-400: #d1d5db;
    --gray-500: #a1acb8;
    --gray-600: #8b8b8e;
    --gray-700: #6b7280;
    --gray-800: #4b5563;
    --gray-900: #333333;

    /* ── Radius ── */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 15px;
    --radius-pill: 25px;
    --radius-full: 50%;

    /* ── Font Size ── */
    --fs-3xs: 0.625rem; /* 10px */
    --fs-2xs: 0.6875rem; /* 11px */
    --fs-xs: 0.75rem; /* 12px */
    --fs-sm: 0.8125rem; /* 13px */
    --fs-md: 0.875rem; /* 14px */
    --fs-lg: 0.9375rem; /* 15px */
    --fs-xl: 1rem; /* 16px */
    --fs-2xl: 1.25rem; /* 20px */
    --fs-3xl: 1.5rem; /* 24px */
    --fs-4xl: 2rem; /* 32px */

    /* ── Font Weight ── */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    --fw-black: 900;

    /* ── Theme Colors ── */
    --primary: #696cff;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --sub: #37bc9b;
    --secondary: #6b7280;

    --primary-rgb: 105, 108, 255;
    --success-rgb: 34, 197, 94;
    --danger-rgb: 239, 68, 68;
    --warning-rgb: 245, 158, 11;
    --info-rgb: 14, 165, 233;
    --sub-rgb: 55, 188, 155;
    --secondary-rgb: 107, 114, 128;

    /* Soft (pastel bg) */
    --primary-soft: #eef0ff;
    --success-soft: #e9f9f0;
    --danger-soft: #fdecec;
    --warning-soft: #fff6e5;
    --info-soft: #e6f4fc;
    --secondary-soft: #f3f4f6;

    /* Solid hover / active */
    --primary-hov: #5a5dff;
    --primary-act: #4f52e6;

    --success-hov: #1fb157;
    --success-act: #19984a;

    --danger-hov: #dc3d3d;
    --danger-act: #c93434;

    --warning-hov: #e58f09;
    --warning-act: #cf7f08;

    --info-hov: #0996d3;
    --info-act: #0885bb;

    --secondary-hov: #5f6673;
    --secondary-act: #535966;

    --sub-hov: #2fa88b;

    /* Soft hover / active */
    --primary-soft-hov: #e4e7ff;
    --primary-soft-act: #d8ddff;

    --success-soft-hov: #dcf7e7;
    --success-soft-act: #cdefda;

    --danger-soft-hov: #fde1e1;
    --danger-soft-act: #fbcfcf;

    --warning-soft-hov: #fff0d6;
    --warning-soft-act: #ffe6bf;

    --info-soft-hov: #d9f1fb;
    --info-soft-act: #c7e9f9;

    --secondary-soft-hov: #e5e7eb;
    --secondary-soft-act: #d1d5db;

    /* Focus ring */
    --primary-ring: rgba(105, 108, 255, 0.25);
    --success-ring: rgba(34, 197, 94, 0.22);
    --danger-ring: rgba(239, 68, 68, 0.22);
    --warning-ring: rgba(245, 158, 11, 0.22);
    --info-ring: rgba(14, 165, 233, 0.22);
    --secondary-ring: rgba(107, 114, 128, 0.25);

    /* ── Global (semantic → gray 참조) ── */
    --white: #ffffff;
    --bg: var(--gray-100);
    --surface: #ffffff;
    --border: var(--gray-300);
    --border-light: #ccc;
    --text-main: var(--gray-900);
    --text-muted: var(--gray-500);
    --text-sub: var(--gray-600);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 6px rgba(47, 43, 61, 0.08);
    --radius: var(--radius-lg);

    /* Semantic backgrounds */
    --info-bg: #f0f7ff;
    --danger-bg: #fff3f3;
    --warning-bg: #fffdf5;

    /* ── Component: checkbox ── */
    --chk-size: 1.125rem;
    --chk-radius: 0.375rem;
    --chk-border: var(--gray-300);
    --chk-bg: #fff;
    --chk-hover: var(--gray-100);
    --chk-focus: rgba(105, 108, 255, 0.18);

    /* ── Component: input (formx) ── */
    --fx-bg: var(--surface);
    --fx-border: var(--border);
    --fx-text: var(--text-main);
    --fx-muted: rgba(51, 51, 51, 0.6);

    --fx-radius: var(--radius);
    --fx-h: 2.5rem;
    /* 40px */
    --fx-px: 0.875rem;
    /* 14px */
    --fx-font: 0.875rem;
    /* 14px */

    --fx-ring: rgba(105, 108, 255, 0.22);
    --fx-border-focus: rgba(105, 108, 255, 0.55);

    --fx-bg-disabled: var(--gray-100);
    --fx-border-disabled: rgba(231, 231, 232, 0.9);

    --fx-bg-readonly: var(--gray-50);

    --fx-danger: var(--danger);
    --fx-danger-ring: rgba(239, 68, 68, 0.2);

    --fx-gap: 0.875rem;
    --fx-pad: 1rem;
    --fx-pad-x: 1.25rem;

    --fx-item-basis: 16rem;
    --fx-item-min: 14rem;

    /* ── Component: radio (radx) ── */
    --rad-size: 1.125rem;
    --rad-border: var(--border);
    --rad-bg: #fff;
    --rad-dot: var(--primary);
    --rad-focus: rgba(105, 108, 255, 0.18);

    /* ── Component: toast (toastx) ── */
    --toast-z: 2000;
    --toast-w: 22rem;
}

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
ul,
li,
a,
p,
textarea,
iframe {
    margin: 0;
    padding: 0;
}

a {
    color: var(--text-main);
    text-decoration: none;
    outline: none;
}

a:hover,
a:active {
    text-decoration: none;
}

html,
body {
    font-size: 16px;
    height: 100%;
    min-width: 285px;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
}

body {
    margin: 0;
    font-family: "pretendard", sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}

.cursor-pointer {
    cursor: pointer;
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-light {
    color: var(--light) !important;
}

.text-dark {
    color: var(--dark) !important;
}

/* ================================
   Font Size Utilities
   ================================ */
.fs-10 {
    font-size: var(--fs-3xs) !important;
}
.fs-11 {
    font-size: var(--fs-2xs) !important;
}
.fs-12 {
    font-size: var(--fs-xs) !important;
}
.fs-13 {
    font-size: var(--fs-sm) !important;
}
.fs-14 {
    font-size: var(--fs-md) !important;
}
.fs-15 {
    font-size: var(--fs-lg) !important;
}
.fs-16 {
    font-size: var(--fs-xl) !important;
}
.fs-20 {
    font-size: var(--fs-2xl) !important;
}
.fs-24 {
    font-size: var(--fs-3xl) !important;
}
.fs-32 {
    font-size: var(--fs-4xl) !important;
}

/* ================================
   Font Weight Utilities
   ================================ */
.fw-400 {
    font-weight: var(--fw-regular) !important;
}
.fw-500 {
    font-weight: var(--fw-medium) !important;
}
.fw-600 {
    font-weight: var(--fw-semibold) !important;
}
.fw-700 {
    font-weight: var(--fw-bold) !important;
}
.fw-800 {
    font-weight: var(--fw-extrabold) !important;
}
.fw-900 {
    font-weight: var(--fw-black) !important;
}

/* ================================
   Common Dropdown Skin (Project)
   ================================ */

/* 공통: dropdown-menu */
.dropdown-menu.dropdown-skin {
    min-width: 12rem;
    padding: 0.375rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.dropdown-menu.dropdown-skin .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    transition:
        background 0.12s ease,
        color 0.12s ease;
}

.dropdown-menu.dropdown-skin .dropdown-item:hover,
.dropdown-menu.dropdown-skin .dropdown-item:focus {
    background: var(--bg);
    color: var(--text-main);
}

.dropdown-menu.dropdown-skin .dropdown-item.active,
.dropdown-menu.dropdown-skin .dropdown-item:active {
    background: var(--primary-soft);
    color: var(--primary);
}

.dropdown-menu.dropdown-skin .dropdown-divider {
    margin: 0.375rem 0;
    border-top: 1px solid var(--border);
}

.dropdown-menu.dropdown-skin .dd-icon {
    width: 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.dropdown-menu.dropdown-skin .dropdown-item.is-danger {
    color: var(--danger);
}

.dropdown-menu.dropdown-skin .dropdown-item.is-danger .dd-icon {
    color: var(--danger);
}

.dropdown-menu.dropdown-skin .dropdown-item.is-danger:hover,
.dropdown-menu.dropdown-skin .dropdown-item.is-danger:focus {
    background: var(--danger-soft);
}

/* =========================
   Common Buttons (Project)
   ========================= */
.btnx {
    --btn-bg: transparent;
    --btn-color: var(--text-main);
    --btn-border: var(--border);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;

    padding: 0.5rem 0.875rem;
    border: 1px solid var(--btn-border);
    border-radius: var(--radius);
    background: var(--btn-bg);
    color: var(--btn-color);

    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease;
}

.btnx-group {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btnx:active {
    transform: translateY(1px);
}

.btnx:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.1rem rgba(105, 108, 255, 0.18);
}

.btnx:disabled,
.btnx.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.btnx-outline-primary:disabled,
.btnx-outline-success:disabled,
.btnx-outline-danger:disabled,
.btnx-outline-warning:disabled,
.btnx-outline-info:disabled,
.btnx-outline-secondary:disabled {
    background: transparent;
}

.btnx-outline-primary:disabled,
.btnx-outline-success:disabled,
.btnx-outline-danger:disabled,
.btnx-outline-warning:disabled,
.btnx-outline-info:disabled {
    background: transparent;
}

.btnx-primary-soft:disabled,
.btnx-success-soft:disabled,
.btnx-danger-soft:disabled,
.btnx-warning-soft:disabled,
.btnx-info-soft:disabled,
.btnx-secondary-soft:disabled {
    background: var(--btn-bg);
}

.modal-header .btnx-close {
    margin-top: calc(-0.5 * var(--bs-modal-header-padding-y));
    margin-right: calc(-0.5 * var(--bs-modal-header-padding-x));
    margin-bottom: calc(-0.5 * var(--bs-modal-header-padding-y));
    margin-left: auto;
    width: 1.5em;
    height: 1.5em;
    font-size: 1.25rem;
}

.btnx-icon {
    width: 2.25rem;
    padding: 0;
}

.btnx-icon.btnx-xs {
    width: 1.75rem;
}

.btnx-icon.btnx-sm {
    width: 2rem;
}

.btnx-icon.btnx-lg {
    width: 2.5rem;
}

/* Sizes */
.btnx-xs {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.btnx-sm {
    padding: 0.4375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-lg);
}

.btnx-lg {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
}

/* Ghost */
.btnx-ghost {
    --btn-bg: transparent;
    --btn-color: var(--text-main);
    --btn-border: transparent;
}

.btnx-ghost:hover {
    background: var(--bg);
}

.btnx-ghost:active {
    background: var(--gray-200);
}

.btnx-ghost:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.1rem rgba(105, 108, 255, 0.18);
}

/* Primary */
.btnx-primary {
    --btn-bg: var(--primary);
    --btn-color: #fff;
    --btn-border: var(--primary);
}

.btnx-primary:hover {
    background: var(--primary-hov);
    border-color: var(--primary-hov);
}

.btnx-primary:active {
    background: var(--primary-act);
    border-color: var(--primary-act);
}

.btnx-primary:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--primary-ring);
}

/* Primary soft */
.btnx-primary-soft {
    --btn-bg: var(--primary-soft);
    --btn-color: var(--primary);
    --btn-border: transparent;
}

.btnx-primary-soft:hover {
    background: var(--primary-soft-hov);
    color: var(--primary);
}

.btnx-primary-soft:active {
    background: var(--primary-soft-act);
    color: var(--primary);
}

.btnx-primary-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--primary-ring);
}

/* Primary outline */
.btnx-outline-primary {
    --btn-bg: transparent;
    --btn-color: var(--primary);
    --btn-border: var(--primary);
}

.btnx-outline-primary:hover {
    background: var(--primary-soft-hov);
    color: var(--primary);
    border-color: var(--primary);
}

.btnx-outline-primary:active {
    background: var(--primary-soft-act);
    color: var(--primary);
    border-color: var(--primary);
}

.btnx-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--primary-ring);
}

/* Success */
.btnx-success {
    --btn-bg: var(--success);
    --btn-color: #fff;
    --btn-border: var(--success);
}

.btnx-success:hover {
    background: var(--success-hov);
    border-color: var(--success-hov);
}

.btnx-success:active {
    background: var(--success-act);
    border-color: var(--success-act);
}

.btnx-success:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--success-ring);
}

/* Success soft */
.btnx-success-soft {
    --btn-bg: var(--success-soft);
    --btn-color: var(--success);
    --btn-border: transparent;
}

.btnx-success-soft:hover {
    background: var(--success-soft-hov);
    color: var(--success);
}

.btnx-success-soft:active {
    background: var(--success-soft-act);
    color: var(--success);
}

.btnx-success-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--success-ring);
}

/* Success outline */
.btnx-outline-success {
    --btn-bg: transparent;
    --btn-color: var(--success);
    --btn-border: var(--success);
}

.btnx-outline-success:hover {
    background: var(--success-soft-hov);
    color: var(--success);
    border-color: var(--success);
}

.btnx-outline-success:active {
    background: var(--success-soft-act);
    color: var(--success);
    border-color: var(--success);
}

.btnx-outline-success:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--success-ring);
}

/* Danger */
.btnx-danger {
    --btn-bg: var(--danger);
    --btn-color: #fff;
    --btn-border: var(--danger);
}

.btnx-danger:hover {
    background: var(--danger-hov);
    border-color: var(--danger-hov);
}

.btnx-danger:active {
    background: var(--danger-act);
    border-color: var(--danger-act);
}

.btnx-danger:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--danger-ring);
}

/* Danger soft */
.btnx-danger-soft {
    --btn-bg: var(--danger-soft);
    --btn-color: var(--danger);
    --btn-border: transparent;
}

.btnx-danger-soft:hover {
    background: var(--danger-soft-hov);
    color: var(--danger);
}

.btnx-danger-soft:active {
    background: var(--danger-soft-act);
    color: var(--danger);
}

.btnx-danger-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--danger-ring);
}

/* Danger outline */
.btnx-outline-danger {
    --btn-bg: transparent;
    --btn-color: var(--danger);
    --btn-border: var(--danger);
}

.btnx-outline-danger:hover {
    background: var(--danger-soft-hov);
    color: var(--danger);
    border-color: var(--danger);
}

.btnx-outline-danger:active {
    background: var(--danger-soft-act);
    color: var(--danger);
    border-color: var(--danger);
}

.btnx-outline-danger:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--danger-ring);
}

/* Warning */
.btnx-warning {
    --btn-bg: var(--warning);
    --btn-color: #fff;
    --btn-border: var(--warning);
}

.btnx-warning:hover {
    background: var(--warning-hov);
    border-color: var(--warning-hov);
}

.btnx-warning:active {
    background: var(--warning-act);
    border-color: var(--warning-act);
}

.btnx-warning:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--warning-ring);
}

/* Warning soft */
.btnx-warning-soft {
    --btn-bg: var(--warning-soft);
    --btn-color: var(--warning);
    --btn-border: transparent;
}

.btnx-warning-soft:hover {
    background: var(--warning-soft-hov);
    color: var(--warning);
}

.btnx-warning-soft:active {
    background: var(--warning-soft-act);
    color: var(--warning);
}

.btnx-warning-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--warning-ring);
}

/* Warning outline */
.btnx-outline-warning {
    --btn-bg: transparent;
    --btn-color: var(--warning);
    --btn-border: var(--warning);
}

.btnx-outline-warning:hover {
    background: var(--warning-soft-hov);
    color: var(--warning);
    border-color: var(--warning);
}

.btnx-outline-warning:active {
    background: var(--warning-soft-act);
    color: var(--warning);
    border-color: var(--warning);
}

.btnx-outline-warning:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--warning-ring);
}

/* Info */
.btnx-info {
    --btn-bg: var(--info);
    --btn-color: #fff;
    --btn-border: var(--info);
}

.btnx-info:hover {
    background: var(--info-hov);
    border-color: var(--info-hov);
}

.btnx-info:active {
    background: var(--info-act);
    border-color: var(--info-act);
}

.btnx-info:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--info-ring);
}

/* Info soft */
.btnx-info-soft {
    --btn-bg: var(--info-soft);
    --btn-color: var(--info);
    --btn-border: transparent;
}

.btnx-info-soft:hover {
    background: var(--info-soft-hov);
    color: var(--info);
}

.btnx-info-soft:active {
    background: var(--info-soft-act);
    color: var(--info);
}

.btnx-info-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--info-ring);
}

/* Info outline */
.btnx-outline-info {
    --btn-bg: transparent;
    --btn-color: var(--info);
    --btn-border: var(--info);
}

.btnx-outline-info:hover {
    background: var(--info-soft-hov);
    color: var(--info);
    border-color: var(--info);
}

.btnx-outline-info:active {
    background: var(--info-soft-act);
    color: var(--info);
    border-color: var(--info);
}

.btnx-outline-info:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--info-ring);
}

/* Secondary */
.btnx-secondary {
    --btn-bg: var(--secondary);
    --btn-color: #fff;
    --btn-border: var(--secondary);
}

.btnx-secondary:hover {
    background: var(--secondary-hov);
    border-color: var(--secondary-hov);
}

.btnx-secondary:active {
    background: var(--secondary-act);
    border-color: var(--secondary-act);
}

.btnx-secondary:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--secondary-ring);
}

/* Secondary soft */
.btnx-secondary-soft {
    --btn-bg: var(--secondary-soft);
    --btn-color: var(--secondary);
    --btn-border: var(--secondary-soft-hov);
}

.btnx-secondary-soft:hover {
    background: var(--secondary-soft-hov);
    color: var(--secondary);
    border-color: var(--secondary-soft-hov);
}

.btnx-secondary-soft:active {
    background: var(--secondary-soft-act);
    color: var(--secondary);
    border-color: var(--secondary-soft-act);
}

.btnx-secondary-soft:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--secondary-ring);
}

/* Secondary outline */
.btnx-outline-secondary {
    --btn-bg: transparent;
    --btn-color: var(--secondary);
    --btn-border: var(--secondary);
}

.btnx-outline-secondary:hover {
    background: var(--secondary-soft-hov);
    color: var(--secondary);
    border-color: var(--secondary);
}

.btnx-outline-secondary:active {
    background: var(--secondary-soft-act);
    color: var(--secondary);
    border-color: var(--secondary);
}

.btnx-outline-secondary:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--secondary-ring);
}

.btnx-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
}

.btnx-remove:hover {
    color: var(--danger-hov);
}

.btnx-remove:active {
    color: var(--danger-act);
}

.btnx-remove:focus-visible {
    box-shadow: 0 0 0 0.1rem var(--danger-ring);
}

/* =========================
   Common Links (Project)
   ========================= */
.linkx {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition:
        color 0.12s ease,
        background 0.12s ease;
}

.linkx:hover {
    text-decoration: underline;
}

.linkx-muted {
    color: rgba(51, 51, 51, 0.7);
    font-weight: 600;
}

.linkx-muted:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* =========================
   Badges (Project)
   ========================= */
.badgex {
    --bd-bg: var(--bg);
    --bd-color: var(--text-main);
    --bd-border: transparent;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;

    height: 1.5rem;
    /* 24px */
    padding: 0 0.5rem;
    /* 8px */
    border-radius: 999px;

    background: var(--bd-bg);
    color: var(--bd-color);
    border: 1px solid var(--bd-border);

    font-size: 0.75rem;
    /* 12px */
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* sizes */
.badgex-xs {
    height: 1.25rem;
    /* 20px */
    padding: 0 0.375rem;
    /* 6px */
    font-size: 0.6875rem;
    /* 11px */
}

.badgex-sm {
    height: 1.375rem;
    /* 22px */
    padding: 0 0.4375rem;
    /* 7px */
    font-size: 0.75rem;
    /* 12px */
}

.badgex-lg {
    height: 1.625rem;
    /* 26px */
    padding: 0 0.625rem;
    /* 10px */
    font-size: 0.8125rem;
    /* 13px */
}

/* Primary */
.badgex-primary {
    --bd-bg: var(--primary);
    --bd-color: #fff;
    --bd-border: var(--primary);
}

.badgex-primary-soft {
    --bd-bg: var(--primary-soft);
    --bd-color: var(--primary);
    --bd-border: transparent;
}

.badgex-outline-primary {
    --bd-bg: transparent;
    --bd-color: var(--primary);
    --bd-border: var(--primary);
}

/* Success */
.badgex-success {
    --bd-bg: var(--success);
    --bd-color: #fff;
    --bd-border: var(--success);
}

.badgex-success-soft {
    --bd-bg: var(--success-soft);
    --bd-color: var(--success);
    --bd-border: transparent;
}

.badgex-outline-success {
    --bd-bg: transparent;
    --bd-color: var(--success);
    --bd-border: var(--success);
}

/* Danger */
.badgex-danger {
    --bd-bg: var(--danger);
    --bd-color: #fff;
    --bd-border: var(--danger);
}

.badgex-danger-soft {
    --bd-bg: var(--danger-soft);
    --bd-color: var(--danger);
    --bd-border: transparent;
}

.badgex-outline-danger {
    --bd-bg: transparent;
    --bd-color: var(--danger);
    --bd-border: var(--danger);
}

/* Warning */
.badgex-warning {
    --bd-bg: var(--warning);
    --bd-color: #fff;
    --bd-border: var(--warning);
}

.badgex-warning-soft {
    --bd-bg: var(--warning-soft);
    --bd-color: var(--warning);
    --bd-border: transparent;
}

.badgex-outline-warning {
    --bd-bg: transparent;
    --bd-color: var(--warning);
    --bd-border: var(--warning);
}

/* Info */
.badgex-info {
    --bd-bg: var(--info);
    --bd-color: #fff;
    --bd-border: var(--info);
}

.badgex-info-soft {
    --bd-bg: var(--info-soft);
    --bd-color: var(--info);
    --bd-border: transparent;
}

.badgex-outline-info {
    --bd-bg: transparent;
    --bd-color: var(--info);
    --bd-border: var(--info);
}

.badgex-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.9;
}

/* Clickable badge (button/link) */
.badgex-action {
    cursor: pointer;
    transition:
        filter 0.12s ease,
        transform 0.08s ease;
}
.badgex-action:hover {
    filter: brightness(0.92);
}
.badgex-action:active {
    transform: translateY(1px);
}

/* =========================
   Table (Project)
   ========================= */
.tablex-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    /* radius ?��? */
}

/* ?�단 ?�더 */
.tablex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tablex-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
}

.tablex-desc {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: rgba(51, 51, 51, 0.65);
}

/* ?�이�??�역 ?�백 */
.tablex-body {
    padding: 0.75rem 1.25rem;
}

.tablex-footer {
    display: flex;
    justify-content: end;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
}

/* ?�이�??�크�?컨테?�너(가�??�로) */
.tablex-scroll {
    overflow: auto;
}

/* ?�이�?기본 */
.tablex {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-main);
}

.tablex td,
.tablex th {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* thead */
.tablex thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    /* 12px */
    font-weight: 700;
    color: rgba(51, 51, 51, 0.75);
    text-transform: none;
    letter-spacing: 0.2px;
    padding: 0.75rem 0.875rem;
    /* 12px 14px */
    white-space: nowrap;
}

/* tbody */
.tablex tbody {
    background: var(--surface);
}

.tablex tbody td {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
    /* 14px */
    vertical-align: middle;
}

/* hover */
.tablex tbody tr:hover td {
    background: var(--gray-50);
}

.tablex tbody tr:last-child td {
    border-bottom: 0;
}

.tablex .td-muted {
    color: var(--text-muted);
}

.tablex .td-left {
    text-align: left;
}

.tablex .td-right {
    text-align: right;
}

.tablex .td-center {
    text-align: center;
}

.tablex .td-nowrap {
    white-space: nowrap;
}

.tablex .td-clip {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tablex.is-compact thead th {
    padding: 0.625rem 0.75rem;
}

.tablex.is-compact tbody td {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
}

.tablex-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.375rem;
}

.tablex-col-check {
    width: 44px;
}

.tablex-col-actions {
    width: 120px;
}

/* 모바??좁�? ?�면?�서 카드 박스 ?��? */
/* @media (max-width: 768px) {
    .tablex {
        min-width: 640px;
    }
} */

/* =========================
   Pagination (Project)
   ========================= */
.paginex {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    /* 6px */
    user-select: none;
}

/* 버튼(?�이지/?�동) 공통 */
.paginex-btn {
    min-width: 2rem;
    height: 2rem;
    /* 32px */
    padding: 0 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease,
        transform 0.08s ease;
}

.paginex-btn:hover {
    background: var(--bg);
    text-decoration: none;
}

.paginex-btn:active {
    transform: translateY(1px);
    background: var(--gray-200);
}

/* active page */
.paginex-btn.is-active {
    background: var(--primary-soft);
    border-color: transparent;
    color: var(--primary);
    font-weight: 900;
}

/* disabled */
.paginex-btn.is-disabled,
.paginex-btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
    background-color: var(--gray-100);
}

/* ellipsis */
.paginex-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding: 0 0.25rem;
    color: rgba(51, 51, 51, 0.55);
    font-weight: 700;
}

/* sizes (?�택) */
.paginex.is-sm .paginex-btn {
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
}

/* =========================
   Checkbox (Project) - chkx
   ========================= */

/* checkbox */
.chkx {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
    line-height: 1;
    vertical-align: middle;
}

.chkx-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.chkx-box {
    width: var(--chk-size);
    height: var(--chk-size);
    border-radius: var(--chk-radius);
    border: 1px solid var(--border);
    background: var(--chk-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.08s ease;
}

.chkx-label {
    font-size: 0.875rem;
    /* 14px */
    font-weight: 600;
}

.chkx:hover .chkx-box {
    background: var(--chk-hover);
}

.chkx-input:checked + .chkx-box {
    background: var(--primary);
    border-color: var(--primary);
}

.chkx-input:checked + .chkx-box::after {
    content: "";
    width: 0.55rem;
    height: 0.3rem;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    margin-top: -1px;
}

.chkx-input:focus-visible + .chkx-box {
    box-shadow: 0 0 0 0.1rem var(--chk-focus);
}

.chkx-input:disabled + .chkx-box,
.chkx.is-disabled .chkx-box {
    opacity: 0.55;
    cursor: not-allowed;
}

.chkx-input:disabled:not(:checked) + .chkx-box {
    background: #fff;
}

.chkx-input:disabled:checked + .chkx-box {
    background: var(--primary);
    border-color: var(--primary);
}

.chkx-input:disabled ~ .chkx-label,
.chkx.is-disabled .chkx-label {
    opacity: 0.55;
    cursor: not-allowed;
}

.chkx-input:disabled,
.chkx.is-disabled {
    pointer-events: none;
}

.chkx-only {
    gap: 0;
}

.chkx-only .chkx-label {
    display: none;
}

.formx-group {
    display: grid;
    gap: 0.375rem;
}

/* =========================
   Input (Project) - formx
   ========================= */

/* label */
.formx-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: rgba(51, 51, 51, 0.75);
}

/* 필수 표시 — 라벨 뒤에 빨간 별표 */
.formx-label.is-required::after {
    content: "*";
    color: var(--danger, #dc3545);
    margin-left: 0.25rem;
    font-weight: 700;
}

/* help text */
.formx-help {
    font-size: 0.75rem;
    /* 12px */
    color: var(--fx-muted);
}

/* input / textarea / select 공통 */
.formx-control {
    width: 100%;
    height: var(--fx-h);
    padding: 0 var(--fx-px);
    border-radius: var(--fx-radius);
    border: 1px solid var(--fx-border);
    background: var(--fx-bg);
    color: var(--fx-text);
    font-size: var(--fx-font);
    font-weight: 500;
    outline: none;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease,
        background 0.12s ease;
}

/* Small */
.formx-control-sm {
    --fx-h: 2rem;
    --fx-px: 0.75rem;
    --fx-font: 0.8125rem;
    --fx-radius: var(--radius-lg);
}

/* Large */
.formx-control-lg {
    --fx-h: 2.75rem;
    --fx-px: 1rem;
    --fx-font: 0.9375rem;
    --fx-radius: var(--radius-lg);
}

/* Plaintext (읽기 전용 텍스트처럼) */
.formx-control-plaintext {
    min-height: auto;
    padding: 0.375rem;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
}

/* textarea */
textarea.formx-control {
    min-height: 8rem;
    padding: 0.75rem var(--fx-px);
    resize: none;
    line-height: 1.5;
}

textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
    margin: 5px 0;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.6);
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.8);
}

/* placeholder */
.formx-control::placeholder {
    color: rgba(51, 51, 51, 0.38);
    font-weight: 500;
}

/* focus */
.formx-control:focus {
    border-color: var(--fx-border-focus);
    box-shadow: 0 0 0 0.1rem var(--fx-ring);
}

/* disabled */
.formx-control:disabled {
    background: var(--fx-bg-disabled);
    border-color: var(--fx-border-disabled);
    color: rgba(51, 51, 51, 0.45);
    cursor: not-allowed;
}

/* error state (?�버/?�라 검�? */
.formx-control.is-invalid {
    border-color: rgba(239, 68, 68, 0.65);
    box-shadow: 0 0 0 0.2rem var(--fx-danger-ring);
}

.formx-error {
    font-size: 0.75rem;
    /* 12px */
    font-weight: 700;
    color: var(--fx-danger);
}

/* sizes */
.formx-sm {
    --fx-h: 2.25rem;
    --fx-font: 0.8125rem;
    --fx-px: 0.75rem;
}

/* 36px / 13px */
.formx-lg {
    --fx-h: 2.75rem;
    --fx-font: 0.9375rem;
    --fx-px: 1rem;
}

/* 44px / 15px */

/* input group (prefix/suffix) */
.formx-addon-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.formx-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 0.75rem;
    border: 1px solid var(--fx-border);
    background: var(--gray-50);
    color: rgba(51, 51, 51, 0.65);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.formx-addon.is-left {
    border-right: 0;
    border-top-left-radius: var(--fx-radius);
    border-bottom-left-radius: var(--fx-radius);
}

.formx-addon.is-right {
    border-left: 0;
    border-top-right-radius: var(--fx-radius);
    border-bottom-right-radius: var(--fx-radius);
}

.formx-addon-wrap .formx-control {
    border-radius: 0;
}

.formx-addon-wrap .formx-control.is-left {
    border-top-right-radius: var(--fx-radius);
    border-bottom-right-radius: var(--fx-radius);
}

.formx-addon-wrap .formx-control.is-right {
    border-top-left-radius: var(--fx-radius);
    border-bottom-left-radius: var(--fx-radius);
}

/* focus ??addon??같이 강조?�게 */
.formx-addon-wrap:focus-within .formx-addon {
    border-color: var(--fx-border-focus);
}

.formx-addon-wrap:focus-within .formx-addon.is-left {
    border-right: 0;
}

.formx-addon-wrap:focus-within .formx-addon.is-right {
    border-left: 0;
}

/* =========================
   Select (Project) - formx
   ========================= */

.formx-select {
    position: relative;
    width: 100%;
}

.formx-select select.formx-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.75rem;
    /* ?�살??공간 */
}

.formx-select::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid rgba(51, 51, 51, 0.55);
    border-bottom: 2px solid rgba(51, 51, 51, 0.55);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

/* focus ???�상 */
.formx-select:focus-within::after {
    border-color: var(--primary);
}

/* disabled */
.formx-select:has(select:disabled)::after {
    opacity: 0.4;
}

/* =========================
   Accordion - accordionx
   Bootstrap collapse JS 와 함께 사용:
     <div class="accordionx" id="myAcc">
       <div class="accordionx-item">
         <button class="accordionx-button collapsed" type="button"
                 data-bs-toggle="collapse" data-bs-target="#a1" aria-expanded="false">
           <span class="accordionx-title">제목</span>
           <span class="accordionx-meta">부가</span>
         </button>
         <div id="a1" class="accordionx-collapse collapse" data-bs-parent="#myAcc">
           <div class="accordionx-body">내용</div>
         </div>
       </div>
     </div>
   ========================= */

.accordionx {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.accordionx-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.accordionx-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 0;
    background: var(--gray-50);
    color: var(--gray-800, #2c3e50);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.accordionx-button:hover {
    background: var(--primary-soft);
}

.accordionx-button:not(.collapsed) {
    background: var(--primary-soft);
    color: var(--primary);
}

.accordionx-button:focus {
    outline: none;
    box-shadow: 0 0 0 0.1rem var(--primary-ring);
}

/* 화살표 (chevron) */
.accordionx-button::after {
    content: "";
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    opacity: 0.7;
}
.accordionx-button:not(.collapsed)::after {
    transform: rotate(-135deg);
    margin-top: 0.25rem;
}

/* 제목 / 부가 정보 영역 */
.accordionx-title {
    flex-grow: 1;
}

.accordionx-meta {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.accordionx-button:not(.collapsed) .accordionx-meta {
    color: var(--primary);
    opacity: 0.75;
}

.accordionx-body {
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

/* =========================
   Searchable Select - selectx
   ========================= */

.selectx {
    position: relative;
    width: 100%;
}

.selectx-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    background: var(--fx-bg);
    cursor: pointer;
}

.selectx-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selectx-value.is-placeholder {
    color: rgba(51, 51, 51, 0.38);
    font-weight: 600;
}

/* caret (???�로?�트 ?? */
.selectx-caret {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid rgba(51, 51, 51, 0.55);
    border-bottom: 2px solid rgba(51, 51, 51, 0.55);
    transform: rotate(45deg);
    transition:
        transform 0.14s ease,
        border-color 0.14s ease;
    flex: 0 0 auto;
}

/* open ?�태 */
.selectx.is-open .selectx-caret {
    transform: rotate(225deg);
    border-color: var(--primary);
}

/* dropdown */
.selectx-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    z-index: 1200;
    display: none;
    overflow: hidden;
}

.selectx.is-open .selectx-menu {
    display: block;
}

/* ── 비활성 상태 (is-disabled) ── */
.selectx.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}
.selectx.is-disabled .selectx-trigger {
    background-color: var(--gray-50, #f5f6fa);
    cursor: not-allowed;
}

/* ── 필수 검증 실패 (is-invalid) ── */
.selectx.is-invalid .selectx-trigger {
    border-color: var(--danger, #dc3545);
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.15);
}

/* ── 그룹 헤더 옵션 (is-group, 클릭 불가) ── */
.selectx-option.is-group {
    pointer-events: none;
    color: #888 !important;
    font-size: 0.6875rem;
    font-weight: 700;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    background: transparent !important;
}
.selectx-option.is-group:first-child {
    border-top: 0;
}

/* ── 자식 옵션 (is-child, 그룹 아래 들여쓰기) ── */
.selectx-option.is-child {
    padding-left: 1.5rem;
}

/* ── 키보드 강조 (is-highlight) ── */
.selectx-option.is-highlight {
    background: #f5f6fa;
}

/* search bar (내부 wrapper — selectx-search modifier 와 충돌 방지 위해 별도 이름) */
.selectx-searchbar {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}

.selectx-search-input {
    width: 100%;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
}

.selectx-search-input:focus {
    border-color: var(--fx-border-focus);
    box-shadow: 0 0 0 0.1rem var(--fx-ring);
}

/* options list */
.selectx-options {
    max-height: 16rem;
    /* 256px */
    overflow: auto;
    padding: 0.5rem;
}

.selectx-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.selectx-option.is-selected {
    background: var(--primary-soft);
    color: var(--primary);
}

.selectx-empty {
    display: none;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: rgba(51, 51, 51, 0.55);
}

/* ?�크롤바(?�택) */
.selectx-options::-webkit-scrollbar {
    width: 6px;
}

.selectx-options::-webkit-scrollbar-thumb {
    background: rgba(86, 106, 127, 0.25);
    border-radius: var(--radius);
}

.selectx-options::-webkit-scrollbar-track {
    background: transparent;
}

/* PC hover�?*/
@media (hover: hover) and (pointer: fine) {
    .selectx-option:hover {
        background: var(--bg);
    }
}

/* =========================
   Radio (Project) - radx
   ========================= */

/* wrapper */
.radx {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
    line-height: 1;
}

/* ?�제 input ?��? (?�근???��?) */
.radx-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* circle */
.radx-circle {
    width: var(--rad-size);
    height: var(--rad-size);
    border-radius: 999px;
    border: 1px solid var(--rad-border);
    background: var(--rad-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

/* inner dot */
.radx-circle::after {
    content: "";
    width: 0.5rem;
    /* 8px */
    height: 0.5rem;
    border-radius: 999px;
    background: var(--rad-dot);
    transform: scale(0);
    transition: transform 0.12s ease;
}

/* checked */
.radx-input:checked + .radx-circle {
    border-color: var(--primary);
}

.radx-input:checked + .radx-circle::after {
    transform: scale(1);
}

/* label text */
.radx-label {
    font-size: 0.875rem;
    /* 14px */
    font-weight: 600;
}

/* focus-visible (?�보???�근?? */
.radx-input:focus-visible + .radx-circle {
    box-shadow: 0 0 0 0.2rem var(--rad-focus);
}

/* disabled */
.radx-input:disabled + .radx-circle,
.radx.is-disabled .radx-circle {
    opacity: 0.55;
    cursor: not-allowed;
}

.radx-input:disabled ~ .radx-label,
.radx.is-disabled .radx-label {
    opacity: 0.55;
}

.radx-input:disabled,
.radx.is-disabled {
    pointer-events: none;
}

/* only circle (?�벨 ?�거) */
.radx-only {
    gap: 0;
}

.radx-only .radx-label {
    display: none;
}

/* sizes */
.radx.is-xs {
    --rad-size: 1rem;
}

/* 16px */
.radx.is-lg {
    --rad-size: 1.25rem;
}

/* 20px */

/* =========================
   Toast (toastx)
   ========================= */

.toastx-stack {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: var(--toast-z);
    display: grid;
    gap: 0.625rem;
    width: min(var(--toast-w), calc(100vw - 2rem));
}

.toastx {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0.875rem 0.875rem;
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.75rem;
    align-items: start;
    animation: toastx-in 0.16s ease;
}

@keyframes toastx-in {
    from {
        transform: translateY(-6px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toastx-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.toastx-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.toastx-desc {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: rgba(51, 51, 51, 0.65);
    line-height: 1.35;
}

.toastx-close {
    border: 0;
    background: transparent;
    color: rgba(51, 51, 51, 0.55);
    font-size: 1.125rem;
    line-height: 1;
    padding: 0.125rem 0.25rem;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .toastx-close:hover {
        color: rgba(51, 51, 51, 0.85);
    }
}

/* variants */
.toastx.is-success .toastx-icon {
    background: var(--success-soft);
    color: var(--success);
}

.toastx.is-danger .toastx-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.toastx.is-warning .toastx-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

.toastx.is-info .toastx-icon {
    background: var(--info-soft);
    color: var(--info);
}

/* mobile position */
@media (max-width: 768px) {
    .toastx-stack {
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 1rem;
        width: auto;
    }
}

.toastx.is-leaving {
    animation: toastx-out 0.25s ease forwards;
}

@keyframes toastx-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-6px);
        opacity: 0;
    }
}

/* =========================
   Empty State (emptystatex)
   ========================= */
.emptystatex {
    padding: 2.25rem 1.5rem;
    text-align: center;
    display: grid;
    gap: 0.5rem;
    place-items: center;
    background: var(--surface);
    border: 1px dashed rgba(231, 231, 232, 0.9);
    border-radius: var(--radius);
}

.emptystatex-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
    font-size: 1.25rem;
}

.emptystatex-title {
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
    font-weight: 900;
}

.emptystatex-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: rgba(51, 51, 51, 0.6);
    max-width: 34rem;
}

.emptystatex-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================
   Skeleton (skeletonx)
   ========================= */
.skeletonx {
    position: relative;
    overflow: hidden;
    background: var(--gray-200);
    border-radius: var(--radius-lg);
}

.skeletonx::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent
    );
    animation: skeletonx-shimmer 1.1s infinite;
}

@keyframes skeletonx-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* table skeleton block */
.tablex-skeleton {
    padding: 1rem 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.tablex-skeleton-row {
    display: grid;
    grid-template-columns: 1.5rem 2fr 3fr 1.5fr 1.5fr 2rem;
    gap: 0.75rem;
    align-items: center;
}

.tablex-skeleton-row .skeletonx {
    height: 1rem;
}

.tablex-skeleton-row .skeletonx.is-pill {
    height: 1.25rem;
    border-radius: 999px;
}

/* =========================
   Filter Box (Base - Flexible)
   ========================= */
.filterx {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filterx-header {
    padding: 0.875rem var(--fx-pad-x);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.filterx-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
}

.filterx-sub {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: rgba(51, 51, 51, 0.6);
}

.filterx-body {
    padding: var(--fx-pad) var(--fx-pad-x);
}

.filterx-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fx-gap);
    align-items: flex-end;
}

/* actions */
.filterx-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 0.75rem var(--fx-pad-x);
    border-top: 1px solid var(--border);
    background: var(--gray-50);
}

/* chips */
.filterx-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem var(--fx-pad-x);
    border-top: 1px solid var(--border);
}

.filterx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
}

.filterx-chip .chipx-x {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 900;
    line-height: 1;
    padding: 0 0.125rem;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .filterx-chip .chipx-x:hover {
        filter: brightness(0.9);
    }
}

/* mobile: padding 축소 */
@media (max-width: 768px) {
    .filterx {
        --fx-pad: 0.875rem;
        --fx-pad-x: 1rem;
        --fx-gap: 0.75rem;
    }
}

/* =========================
   Formx Width Utilities
   (Variable-based)
   ========================= */

.formx-item {
    flex: 1 1 var(--fx-item-basis);
    min-width: var(--fx-item-min);
}

.formx-item.is-grow {
    flex: 2 1 var(--fx-item-basis);
}

.formx-item.is-full {
    flex: 1 1 100%;
    min-width: 0;
}

/* 1 per row (full width) */
.formx-item.is-1 {
    --fx-item-basis: 100%;
    min-width: 0;
}

/* 2 per row */
.formx-item.is-2 {
    --fx-item-basis: calc((100% - var(--fx-gap)) / 2);
}

/* 3 per row */
.formx-item.is-3 {
    --fx-item-basis: calc((100% - (var(--fx-gap) * 2)) / 3);
}

@media (max-width: 768px) {
    .formx-item.is-2,
    .formx-item.is-3 {
        --fx-item-basis: 100%;
        min-width: 0;
    }
}

.formx-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fx-gap);
}

.formx-zip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.formx-zip .formx-control {
    flex: 1 1 auto;
    min-width: 0;
}

.formx-zip .btnx {
    flex: 0 0 auto;
    white-space: nowrap;
    height: calc(2.375rem);
}

@media (max-width: 575.98px) {
    .formx-zip {
        gap: 0.375rem;
    }
}

/* ================================
   File Upload (filex)

   기본형:       .filex > .filex-area (클릭 업로드)
   컴팩트:       .filex.filex-compact (모달/좁은 영역)
   드래그:       .filex.filex-drop (드래그 앤 드롭)
   목록:         .filex-list > .filex-item
================================ */

/* ── 래퍼 ── */
.filex {
    width: 100%;
}

/* ── 클릭 영역 (label → input 연결) ── */
.filex-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.15s ease;
}
.filex-area:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* 숨겨진 input */
.filex-input {
    display: none;
}

/* 아이콘 */
.filex-icon {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.7;
}
.filex-area:hover .filex-icon {
    opacity: 1;
}

/* 텍스트 */
.filex-text {
    flex-grow: 1;
    text-align: left;
}
.filex-text strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800, #2c3e50);
}
.filex-text span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ── compact 변형 (모달/좁은 영역) ── */
.filex-compact .filex-area {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
}
.filex-compact .filex-icon {
    font-size: 1.125rem;
}
.filex-compact .filex-text strong {
    font-size: 0.8125rem;
}
.filex-compact .filex-text span {
    font-size: 0.75rem;
}

/* ── drop 변형 (드래그 앤 드롭) ── */
.filex-drop .filex-area {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
}
.filex-drop .filex-area.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.filex-drop .filex-icon {
    font-size: 2rem;
}
.filex-drop .filex-text {
    text-align: center;
}

/* ── 파일 목록 ── */
.filex-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filex-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
}

.filex-left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.filex-ico {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.filex-meta {
    min-width: 0;
}

.filex-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filex-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.filex-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.filex-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* 삭제된 상태 */
.filex-item.is-deleted {
    opacity: 0.4;
    text-decoration: line-through;
}

/* =========================
   Search Pair (type + keyword + btn)
   ========================= */

.searchx {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.searchx-type {
    flex: 0 0 auto;
    width: 130px;
    min-width: 100px;
}

.searchx-keyword {
    display: flex;
    flex: 1 1 auto;
    min-width: 12rem;
    position: relative;
}

.searchx-keyword .formx-control {
    width: 100%;
}

.searchx-btn {
    flex: 0 0 auto;
}

/* joined (???�어�? */
.searchx.is-joined {
    gap: 0;
    border-radius: var(--fx-radius);
}

.searchx.is-joined .searchx-type .formx-control,
.searchx.is-joined .searchx-type .selectx-trigger {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    z-index: 2;
}

.searchx.is-joined .searchx-type .formx-control:focus,
.searchx.is-joined .searchx-type .selectx-trigger:focus {
    z-index: 5;
}

.searchx.is-joined .searchx-keyword .formx-control {
    border-radius: 0;
    z-index: 1;
}

.searchx.is-joined .searchx-keyword .formx-control:focus {
    z-index: 5;
    position: relative;
}

.searchx.is-joined .searchx-btn .btnx {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    height: 100%;
}

/* Common Focus Ring Handling in Joined Mode */
/* If you want a single ring around the whole group, use :focus-within on .searchx.is-joined */
/* But here we allow individual focus rings to show on top via z-index */

/* Mobile Responsive */
@media (max-width: 768px) {
    .searchx {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .searchx-type,
    .searchx-keyword,
    .searchx-btn {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .searchx-btn .btnx {
        width: 100%;
    }

    .searchx.is-joined {
        gap: 0.75rem;
    }

    .searchx.is-joined .searchx-type .formx-control,
    .searchx.is-joined .searchx-type .selectx-trigger {
        border-radius: var(--fx-radius);
    }

    .searchx.is-joined .searchx-keyword .formx-control {
        border-radius: var(--fx-radius);
    }

    .searchx.is-joined .searchx-btn .btnx {
        border-radius: var(--fx-radius);
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* =========================
   Autocomplete Dropdown
   ========================= */
.autocomplete-dropdown {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.1s ease;
}

.autocomplete-item:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

.autocomplete-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
}

.autocomplete-item-sub {
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.filex-list--existing {
    max-height: 180px;
    overflow: auto;
    padding-right: 4px;
}

.filex-item.is-existing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}

.filex-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.filex-ico {
    font-size: 18px;
    opacity: 0.8;
}

.filex-meta {
    min-width: 0;
}

.filex-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

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

.filex-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.filex-empty {
    padding: 12px 10px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-sub);
    font-size: 13px;
}

/* =========================
   Tree View (treex)
   ========================= */
.treex-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    height: 100%;
    overflow: auto;
    min-height: 600px;
}

.treex,
.treex ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.treex ul {
    margin-left: 1.25rem;
    position: relative;
    display: none;
    /* Initially collapsed */
}

.treex ul.is-open {
    display: block;
}

.treex-item {
    position: relative;
}

/* Connector Lines */
.treex ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: -0.75rem;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.treex-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.12s ease;
}

.treex-content:hover {
    background: var(--bg);
}

.treex-content.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

/* Toggle Icon */
.treex-toggle {
    width: 1.125rem;
    height: 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition:
        transform 0.15s ease,
        background 0.12s ease;
    flex-shrink: 0;
    border: 1px solid var(--text-muted);
    background: #fff;
}

.treex-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.treex-toggle.is-open {
    transform: rotate(90deg);
}

.treex-toggle.is-empty {
    visibility: hidden;
    pointer-events: none;
}

/* Icons */
.treex-icon {
    color: var(--primary);
    opacity: 0.8;
}

.treex-text {
    font-size: 0.9375rem;
    line-height: 1;
}

/* Utility to connect horizontal line */
.treex ul .treex-item::before {
    content: "";
    position: absolute;
    top: 1.125rem;
    left: -0.75rem;
    width: 0.75rem;
    height: 1px;
    background: var(--border);
}

/* Masking the line for last item */
.treex ul .treex-item:last-child::after {
    content: "";
    position: absolute;
    top: 1.125rem;
    left: -0.75rem;
    bottom: 0;
    width: 1px;
    background: var(--surface);
}

/* =========================
   Tabs (tabx)
   ========================= */
.tabx-nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.tabx-item {
    margin-bottom: -1px;
}

.tabx-link {
    display: block;
    padding: 0.625rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition:
        color 0.15s ease,
        border-bottom-color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.tabx-link:hover {
    color: var(--text-main);
}

.tabx-link.active,
.tabx-link:active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
}

/* =========================
   Input Group (Custom - inputx)
   ========================= */
.inputx-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.inputx-group > .formx-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.inputx-group > .formx-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.inputx-group > .formx-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.inputx-group > .formx-control:focus {
    z-index: 3;
}

.inputx-group > .btnx {
    height: auto;
}

.inputx-group-text {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    white-space: nowrap;
}

.inputx-group > .inputx-group-text:not(:first-child) {
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.inputx-group > .inputx-group-text:not(:last-child) {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.inputx-group > .btnx {
    position: relative;
    flex: 0 0 auto;
}

.inputx-group > .btnx:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

.inputx-group > .btnx:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Mobile responsive */
@media (max-width: 375px) {
    .inputx-group {
        flex-wrap: wrap;
    }

    .inputx-group > .formx-control {
        width: 100%;
        border-radius: var(--radius) !important;
        margin-bottom: 0.5rem;
    }

    .inputx-group > .btnx,
    .inputx-group > .inputx-group-text {
        width: 100%;
        border-radius: var(--radius) !important;
    }

    .inputx-group > .btnx {
        padding: 0.5rem 0.875rem;
    }
}

/* =========================
   Breadcrumb (breadcrumbx)
   ========================= */
.breadcrumbx {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumbx-item {
    display: flex;
    align-items: center;
}

.breadcrumbx-item + .breadcrumbx-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumbx-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumbx-item a:hover {
    color: var(--primary);
}

.breadcrumbx-item.active {
    color: var(--text-main);
    font-weight: 500;
}

.wizard-progress {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Wider for 6 steps */
.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wizard-step.completed .wizard-step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.wizard-step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.wizard-step.active .wizard-step-label {
    color: var(--primary);
    font-weight: 600;
}

.wizard-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
    min-width: 20px;
}

/* Wizard Responsive */
@media (max-width: 768px) {
    .wizard-progress {
        padding: 1.25rem 1rem;
    }

    .wizard-steps {
        max-width: 100%;
    }

    .wizard-step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .wizard-step-label {
        font-size: 0.625rem;
    }

    .wizard-step-line {
        min-width: 10px;
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: 1rem 0.75rem;
    }

    .wizard-step {
        gap: 0.25rem;
    }

    .wizard-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .wizard-step-label {
        display: none;
    }

    .wizard-step-line {
        min-width: 6px;
        margin: 0 0.125rem;
    }
}

.chapter-item {
    border: 1px solid var(--border);
    border-left: 4px solid var(--warning);
    background: white;
}

.content-item {
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    background: white;
}

/* Drag & Drop */
.chapter-item[draggable="true"] .drag-handle:active {
    cursor: grabbing;
}

.chapter-item.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary) !important;
}

.chapter-item.drag-over {
    border-top: 3px solid var(--primary) !important;
    margin-top: -1px;
}

/* ================================
   Section Layout (lv-section)
   ================================ */
.lv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 상세 페이지 헤더 스타일 */
/* ── 상세 헤더 (A안 + 뒤로가기④) ── */
.lv-section-header.is-detail {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.375rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* 목록으로 링크 (헤더 내부 상단) */
.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.15s;
}
.detail-back:hover {
    color: var(--text-main);
}
.detail-back i {
    font-size: 12px;
}

/* 정보 영역 */
.detail-info {
    flex: 1;
    min-width: 0;
}

/* 액션 버튼 영역 */
.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border);
}

.lv-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.25rem 0 0;
    line-height: 1.35;
}

.lv-section-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0.3rem 0 0;
}

/* gap으로 간격 처리하므로 개별 마진 리셋 */
.lv-section-sub > span,
.lv-section-sub > a {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ================================
   Nav Tabs - Custom (nav-tabsx)
   ================================ */
.nav-tabsx {
    border-bottom: 2px solid var(--border);
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabsx::-webkit-scrollbar {
    display: none;
}

.nav-tabsx .nav-item {
    flex-shrink: 0;
}

.nav-tabsx .nav-link {
    position: relative;
    border: none;
    border-radius: 0;
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6875rem 1.125rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    white-space: nowrap;
    transition:
        color 0.15s ease,
        background 0.15s ease;
    background: transparent;
}

.nav-tabsx .nav-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.15s ease;
    border-radius: 2px 2px 0 0;
}

.nav-tabsx .nav-link:hover {
    color: var(--text-main);
    background: rgba(var(--primary-rgb), 0.04);
}

.nav-tabsx .nav-link:hover::after {
    background: rgba(var(--primary-rgb), 0.3);
}

.nav-tabsx .nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background: transparent;
    border-bottom: 3px solid var(--primary);
}

.nav-tabsx .nav-link.active::after {
    background: var(--primary);
}

.nav-tabsx .nav-link i {
    font-size: 0.8125rem;
    opacity: 0.8;
}

.nav-tabsx .nav-link.active i {
    opacity: 1;
}

/* nav-link 내부 badgex가 버튼 높이에 영향 주지 않도록 */
.nav-tabsx .nav-link .badgex {
    vertical-align: middle;
    line-height: 1;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
}

@media (max-width: 576px) {
    .nav-tabsx .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
        min-height: 2.5rem;
    }
}

/* ================================
   lv-section-header.is-detail 반응형
   ================================ */
@media (max-width: 768px) {
    .lv-section-header.is-detail {
        padding: 1rem;
    }

    .lv-section-title {
        font-size: 1.125rem;
    }

    .detail-actions {
        justify-content: flex-start;
    }
}
