/* ==========================================================================
   2026-01-27 [Sprint 10]
   components.css
   --------------------------------------------------------------------------
   역할 (KR):
   - 페이지 독립적으로 재사용 가능한 UI 컴포넌트 레이어
   - 버튼/헤더/푸터/섹션헤드 같은 공통 UI를 한 번에 통일
   - 하드코딩 제거 원칙: 색/값은 foundation 토큰만 사용
   --------------------------------------------------------------------------
   Role (EN):
   - Reusable UI components (page-agnostic)
   - Uses tokens only (no hard-coded colors)
   ========================================================================== */

/* Header */
.header{
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.8); /* intentionally kept as "glass" for white mode */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.nav{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.brand{
    display:flex;
    align-items:center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .2px;
}

/* Logo image sizing */
.brand-logo{
    width: 78px;
    display:block;
}

.navlinks{
    display:flex;
    align-items:center;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}
.navlinks a:hover{ color: var(--text); }

.actions{
    display:flex;
    align-items:center;
    gap: 10px;
}

/* ==========================================================================
   2026-02-xx [Sprint 10]
   .btn = app default button (token-driven)
   - Keep current light UI look
   - Unify with app buttons
   ========================================================================== */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: 8px;

    padding: 10px 14px;          /* px-3 py-2 느낌 */
    border-radius: 12px;         /* rounded-md 느낌 */

    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);

    font-weight: 600;
    font-size: 14px;

    cursor:pointer;
    transition: background .12s ease, border-color .12s ease;
    user-select:none;
}

.btn:hover{
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    color: var(--btn-text);
}

/* 기존 btn-primary/btn-ghost는 그대로 두되, 내부도 토큰 기반이니 유지 가능 */


.btn-primary{
    background: var(--brand);
    border-color: var(--brand);
    color: var(--btn-primary-text);
}

.btn-primary:hover{
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: var(--btn-primary-text);
    box-shadow: 0 16px 34px rgba(68,71,74,.22);
}


.btn-ghost{
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover{
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

/* Section Head */
.sectionHead{
    display:flex;
    align-items:flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.lead{
    color: var(--muted);
    max-width: 70ch;
    font-size: 15px;
}

/* Footer */
.footer{
    padding: 36px 0 46px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.footRow{
    display:flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    align-items:center;
}

.footLinks{
    display:flex;
    gap: 14px;
    flex-wrap: wrap;
}
.footLinks a:hover{ color: var(--text); }

/* ==========================================================================
   2026-02-xx [Sprint 10]
   App common components (token-driven)
   ========================================================================== */

.btn-app{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 8px 16px;
    border-radius: 0.5rem;
    border: 1px solid var(--btn-border);

    background: var(--btn-bg);
    color: var(--btn-text);

    font-size: 14px;
    /*font-weight: 600;*/

    cursor: pointer;
    user-select: none;
    transition: background .12s ease, border-color .12s ease;

}

.btn-app:hover{
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
}

/* ======================================================================
   2026-02-02 [Sprint 10]
   App select (token-driven)
   - replaces: border + bg-white + text-gray-* in HTML
   ====================================================================== */
.select-app{
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);

    border-radius: 12px;     /* matches rounded-lg */
    padding: 10px 12px;      /* matches px-3 py-2 */
    font-size: 14px;         /* text-sm */
}

/* ======================================================================
   2026-02-02 [Sprint 10]
   Primary app button (token-driven)
   - used for Settings "Save" CTA
   - keeps existing look in light mode
   ====================================================================== */
.btn-app--primary{
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-border);
    color: var(--btn-primary-text);
}

.btn-app--primary:hover{
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-bg);
}

/* ======================================================================
   2026-02-02 [Sprint 10]
   Dashboard/UI helpers (token-driven)
   - Remove Tailwind color utilities from dashboard HTML
   ====================================================================== */

/* Card base (was: border + rounded + bg-white) */
.card-app{
    border: 1px solid var(--border);
    border-radius: 16px;     /* rounded-lg 느낌 유지 */
    background: var(--surface);
}

/* Table head row (was: bg-gray-50) */
.table-head-row{
    background: var(--table-head-bg);
    color: var(--text);
}

/* Hover row (was: hover:bg-gray-50) */
.row-hover:hover{
    background: var(--row-hover-bg);
}

/* Pill badge base (timeline/source, overdue, status) */
.pill{
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--pill-radius);
    border: 1px solid var(--pill-muted-border);
    background: var(--pill-muted-bg);
    color: var(--pill-muted-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.pill--muted{
    border-color: var(--pill-muted-border);
    background: var(--pill-muted-bg);
    color: var(--pill-muted-text);
}

.pill--info{
    border-color: var(--pill-info-border);
    background: var(--pill-info-bg);
    color: var(--pill-info-text);
}

.pill--success{
    border-color: var(--pill-success-border);
    background: var(--pill-success-bg);
    color: var(--pill-success-text);
}

.pill--danger{
    border-color: var(--pill-danger-border);
    background: var(--pill-danger-bg);
    color: var(--pill-danger-text);
}

/* EventType text tones (replaces text-emerald/text-red/text-sky/etc) */
.event-text--success{ color: var(--pill-success-text); }
.event-text--danger{ color: var(--pill-danger-text); }
.event-text--danger-strong{ color: #7f1d1d; } /* red-900 가까운 강한 빨강 (다크 때 토큰화 가능) */
.event-text--info{ color: var(--pill-info-text); }

/* Violet / Blue accents used in timeline event types
   - 라이트에서 기존 느낌 유지용.
   - 나중에 다크모드에서 토큰화 원하면 foundation에 토큰으로 올려도 됨. */
.event-text--violet{ color: #6d28d9; } /* violet-700 */
.event-text--blue{ color: #1d4ed8; }   /* blue-700 */


.btn-block{ width: 100%; }

.input-app{
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    border-radius: 12px;
    padding: 10px 12px;
}
.input-app::placeholder{ color: var(--input-placeholder); }

/* Make readonly inputs look disabled but consistent with tokenized inputs */
.input-app--readonly {
    background: var(--app-bg-soft);
    cursor: not-allowed;
}



.badge{
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--badge-radius);
    border: 1px solid var(--badge-draft-border);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge--draft{
    background: var(--badge-draft-bg);
    color: var(--badge-draft-text);
    border-color: var(--badge-draft-border);
}
.badge--sent{
    background: var(--badge-sent-bg);
    color: var(--badge-sent-text);
    border-color: var(--badge-sent-border);
}
.badge--paid{
    background: var(--badge-paid-bg);
    color: var(--badge-paid-text);
    border-color: var(--badge-paid-border);
}
.badge--approved{
    background: var(--badge-paid-bg);
    color: var(--badge-paid-text);
    border-color: var(--badge-paid-border);
}
.badge--cancelled{
    background: var(--badge-cancel-bg);
    color: var(--badge-cancel-text);
    border-color: var(--badge-cancel-border);
}


/* ======================================================================
   App Header (token-driven)
   - Visual result identical to current light UI
   - Dark mode ready
====================================================================== */

.app-header{
    position: sticky;
    top: 0;
    z-index: 20;

    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.app-header-inner{
    height: 56px; /* h-14 */
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px){
    .app-header-inner{
        padding: 0 24px;
    }
}

/* Header nav links */
.header-link{
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    transition: background .12s ease;
}

.header-link:hover{
    background: var(--surface-2);
}

/* Icon-only button variant */
.btn-icon{
    padding: 8px;
    border-radius: 12px;
}

/* ==========================================================================
   2026-02-02 [Sprint 10]
   App Header (token-driven)
   - 기존 헤더 UI 유지
   - 아이콘 버튼은 btn-app 쓰지 말고 btn-icon 사용
   ========================================================================== */

.app-header{
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.app-header-inner{
    padding-left: 16px;   /* px-4 */
    padding-right: 16px;  /* px-4 */
    height: 56px;         /* h-14 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px){
    .app-header-inner{
        padding-left: 24px;  /* md:px-6 */
        padding-right: 24px; /* md:px-6 */
    }
}

/* Desktop header links (기존: px-3 py-1 rounded hover:bg-gray-100 text-sm) */
.header-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;        /* py-1 px-3 */
    border-radius: 12px;
    font-size: 14px;          /* text-sm */
    color: var(--text);
    background: transparent;
    transition: background .12s ease;
}
.header-link:hover{
    background: var(--surface-2);
}

/* Icon-only button for header (예전처럼 투명 + hover만) */
.btn-icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;             /* p-2 */
    border: 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background .12s ease;
}
.btn-icon:hover{
    background: var(--surface-2);
}

/* ======================================================================
   2026-02-03 [Sprint 10]
   List/Table helpers (token-driven)
   - Removes text-gray-*, bg-gray-* usage from list pages
   - Keeps light UI identical
====================================================================== */

/* Muted text (gray-500 느낌: 기존 --muted 톤 그대로 사용) */
.app-muted{ color: var(--muted); }

/* Weaker muted (gray-400 느낌) */
.app-muted-weak{ color: var(--muted-weak); }

/* Sub text (gray-700 느낌) */
.app-text-sub{ color: var(--text-sub); }

/* Link tone (gray-900 느낌은 var(--text)로) */
.app-link{ color: var(--text); }

/* Table head cell text tone (gray-700) */
.table-head-cell{ color: var(--text-sub); }

/* Card radius variant (replaces rounded-xl + bg-white) */
.card-app--xl{
    border-radius: 0.75rem; /* Tailwind rounded-xl (12px) */
}

/* Button size variants (keep existing UI sizing in light mode) */
.btn-app--lg{
    padding: 10px 16px;  /* px-4 py-2 */
    border-radius: 12px; /* rounded-lg */
}

.btn-app--sm{
    padding: 6px 12px;   /* px-3 py-1.5 느낌 */
    border-radius: 10px; /* rounded-md/rounded */
    font-size: 14px;     /* text-sm */
}

/* Select/Input small size variants (period row) */
.select-app--sm{
    padding: 6px 10px;   /* px-2 py-1 느낌 */
    border-radius: 12px;
    font-size: 14px;
}

.input-app--sm{
    padding: 6px 10px;   /* px-2 py-1 느낌 */
    border-radius: 12px;
    font-size: 14px;
}

/* ADD: Mobile Monthly Stats collapse (details/summary) */
details.card-app > summary{
    list-style: none;
}
details.card-app > summary::-webkit-details-marker{
    display: none;
}

/* ADD: collapse icon (section-level details/summary) */
details > summary{ list-style: none; }
details > summary::-webkit-details-marker{ display:none; }

.collapse-icon{
    width: 18px;
    height: 18px;
    display:inline-block;
    flex: 0 0 auto;
    opacity: .8;
}
.collapse-icon::before{
    content:"›";
    display:block;
    font-size: 20px;
    line-height: 18px;
    transition: transform .12s ease;
}
details[open] > summary .collapse-icon::before{
    transform: rotate(90deg);
}

/* FIX: Monthly stats collapsed state bottom divider */
details.card-app:not([open]){
    border-bottom-color: transparent;
}

/* FIX: Monthly stats - hide header divider when collapsed */
.monthly-collapse:not([open]) > summary{
    border-bottom: 0 !important;
}

/* Timeline collapse: fix rounded bottom corners when collapsed */
details.timeline-collapse > summary{
    list-style: none;
}
details.timeline-collapse > summary::-webkit-details-marker{
    display: none;
}

/* When collapsed, summary becomes the "bottom" of the visible block */
details.timeline-collapse:not([open]) > summary{
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* When collapsed, hide the body wrapper border (prevents "cut line" feeling) */
details.timeline-collapse:not([open]) > .timeline-body{
    display: none;
}

/* FIX: Monthly stats table bottom border line (PC) */
.monthly-stats-table tbody tr:last-child {
    border-bottom: 0;
}



/* ==========================================================================
   2026-02-02 [Sprint 10]
   Pagination (token-driven)
   - 기존 UI 유지: text-sm + muted + 버튼은 흰 배경/보더 + hover만 surface-2
   - HTML에서 bg-*, text-gray-*, hover:bg-* 제거용
   ========================================================================== */

.pagination{
    display:flex;
    align-items:center;
    justify-content: space-between;
    margin-top: 16px; /* mt-4 */
    gap: 12px;
}

.pagination-meta{
    font-size: 14px;       /* text-sm */
    color: var(--muted);   /* text-gray-500 */
}

.pagination-actions{
    display:flex;
    gap: 8px; /* gap-2 */
}

/* Pagination button (same family as btn-app but small size) */
.btn-page{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding: 4px 12px;          /* px-3 py-1 */
    border-radius: 10px;        /* rounded */
    border: 1px solid var(--btn-border);

    background: var(--btn-bg);
    color: var(--btn-text);

    font-size: 14px;            /* text-sm */
    font-weight: 600;

    user-select:none;
    transition: background .12s ease, border-color .12s ease;
}

.btn-page:hover{
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
}

/* Disabled state */
.btn-page.is-disabled{
    color: rgba(107,112,117,.45);      /* muted의 연한 버전 (text-gray-300 느낌) */
    border-color: var(--btn-border);
    background: var(--btn-bg);
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   2026-02-02 [Sprint 10]
   Toast (token-driven)
   - 기존 UI 유지: soft tinted bg + border + close hover tone
   - HTML에서 bg-*, text-*, border-* 제거용
   ========================================================================== */
.toast{
    min-width: 280px;
    max-width: 420px;

    border: 1px solid var(--toast-border);
    background: var(--toast-bg);
    color: var(--toast-text);

    box-shadow: 0 10px 26px rgba(17,19,21,.10); /* 조금 더 존재감 */
    border-radius: 14px;
    padding: 12px 16px;

    display:flex;
    align-items:flex-start;
    gap: 12px;
}

.toast-message{
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.toast-close{
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    user-select: none;

    color: var(--toast-close);
    font-size: 14px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 10px;

    transition: color .12s ease, background .12s ease;
}

.toast-close:hover{
    color: var(--toast-close-hover);
    background: var(--surface-2);
}

/* ✅ 핵심: "색은 더 연하게" + "불투명도는 높게" */

/* Success: 연한 민트 + 높은 불투명도 */
.toast--success{
    --toast-bg: rgba(209, 250, 229, 0.92);     /* emerald-100 느낌 */
    --toast-border: rgba(16,185,129,.22);
    --toast-text: rgba(6,95,70,1);
    --toast-close: rgba(6,95,70,.55);
    --toast-close-hover: rgba(6,95,70,1);
}

/* Error: 연한 핑크/레드 + 높은 불투명도 */
.toast--error{
    --toast-bg: rgba(254, 226, 226, 0.92);     /* red-100 느낌 */
    --toast-border: rgba(239,68,68,.22);
    --toast-text: rgba(153,27,27,1);
    --toast-close: rgba(153,27,27,.55);
    --toast-close-hover: rgba(153,27,27,1);
}

/* Info: 연한 그레이 서피스 + 높은 불투명도 (화이트로 날리지 않게) */
.toast--info{
    --toast-bg: rgba(243, 244, 246, 0.94);     /* var(--surface-2)와 동일 결 */
    --toast-border: rgba(231,233,236,0.95);    /* border 톤 유지 */
    --toast-text: var(--text);
    --toast-close: rgba(107,112,117,.78);
    --toast-close-hover: var(--text);
}

/* PC: 기존 스타일 유지 */

/* Mobile toast */
@media (max-width: 768px) {
    .toast-container {
        position: fixed;
        top: max(72px, env(safe-area-inset-top));
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translateX(-50%);

        width: calc(100% - 48px);
        max-width: 360px;
        z-index: 9999;
    }

    .toast {
        width: 100%;
        min-height: 48px;
        padding: 14px 18px;
        border-radius: 14px;
        background: rgba(45, 45, 45, 0.92);
        color: #ffffff;
        border: none;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);

        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;

        overflow: visible;
    }

    .toast--success,
    .toast--error,
    .toast--info {
        background: rgba(45, 45, 45, 0.92);
        color: #ffffff;
        border: none;
    }

    .toast-message {
        width: 100%;
        color: #ffffff;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.45;
        text-align: center;
        word-break: keep-all;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .toast-close {
        display: none;
    }
}
@media (max-width: 768px) {

    /* ===== container: 헤더 아래 고정 ===== */
    .toast-container.toast-container--error {
        position: fixed;
        top: env(safe-area-inset-top); /* 🔥 헤더까지 덮는다 */
        left: 0;
        right: 0;
        bottom: auto;
        transform: none;

        width: 100%;
        max-width: none;
        z-index: 9999;
    }

    /* ===== main box ===== */
    .toast.toast--error {
        width: 100%;
        max-width: none;
        min-height: 84px;

        padding:
                calc(18px + env(safe-area-inset-top))
                42px
                18px
                28px;
        border-radius: 0;

        background: var(--mobile-error-toast-bg);
        color: var(--mobile-error-toast-text);
        border: 0;
        border-bottom: 1px solid var(--mobile-error-toast-border);
        box-shadow: var(--mobile-error-toast-shadow);

        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        text-align: left;
    }

    /* ===== ! 아이콘 ===== */
    .toast.toast--error::before {
        content: "!";
        flex: 0 0 auto;

        width: 22px;
        height: 22px;
        border-radius: 9999px;

        background: var(--mobile-error-toast-icon-bg);
        color: var(--mobile-error-toast-icon-text);

        display: inline-flex;
        align-items: center;
        justify-content: center;

        font-size: 14px;   /* 🔥 텍스트랑 맞춤 */
        font-weight: 900;
        line-height: 1;
        margin-top: 2px;
    }

    /* ===== 메시지 ===== */
    .toast.toast--error .toast-message {
        flex: 1;

        color: var(--mobile-error-toast-text);
        font-size: 14px;   /* 🔥 success랑 동일 */
        font-weight: 700;
        line-height: 1.45;
        text-align: left;

        word-break: keep-all;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    /* ===== X 버튼 ===== */
    .toast.toast--error .toast-close {
        display: inline-flex;
        position: absolute;

        top: 16px;
        right: 18px;

        color: var(--mobile-error-toast-close);
        font-size: 14px;   /* 🔥 텍스트랑 동일 */
        font-weight: 700;
        line-height: 1;
        opacity: 0.7;
    }
}
/* ======================================================================
   2026-02-03 [Sprint 10]
   Client form helpers (token-driven)
   - Removes: text-gray-600 / border / hover:bg-gray-100 from HTML
   - Keeps light UI identical: "rounded" (4px) + classic input padding
   ====================================================================== */

/* Panel surface (replaces: border + rounded + bg-white) */
.panel-app{
    border: 1px solid var(--border);
    background: var(--surface);
}

/* Tailwind `rounded` equivalent (4px) */
.panel-app--r4{ border-radius: 0.25rem; }

/* Label tone (replaces text-gray-600) */
.app-label{
    display: block;
    font-size: 14px;       /* text-sm */
    color: var(--muted);   /* gray-600~500 사이 톤 유지 */
    margin-bottom: 4px;    /* mb-1 */
}

/* Input classic sizing (replaces px-3 py-2 + rounded) */
.input-app--classic{
    padding: 8px 12px;     /* px-3 py-2 */
    font-size: 14px;       /* text-sm */
}
.input-app--r4{ border-radius: 0.25rem; }

/* Button radius + sizing to match original form buttons */
.btn-app--r4{ border-radius: 0.25rem; }         /* rounded (4px) */
.btn-app--compact{ padding: 4px 12px; }         /* px-3 py-1 */

/* ======================================================================
   2026-02-03 [Sprint 10]
   Detail page helpers (token-driven)
   - Removes: bg-white, bg-gray-50, text-gray-500, border-red-*, text-red-*, hover:bg-red-50
   - Keeps light UI identical
   ====================================================================== */

/* Medium button size used in detail header (matches px-3 py-2 + rounded-md) */
.btn-app--md{
    padding: 8px 12px;     /* px-3 py-2 */
    border-radius: 12px;   /* rounded-md */
    font-size: 14px;       /* text-sm */
}

/* Muted card (replaces: bg-gray-50) */
.card-app--muted{
    background: var(--surface-2);
}

/* Danger button variant (delete) */
.btn-app--danger{
    border-color: var(--danger-border);
    color: var(--danger-text);
}

/* Keep base strategy: transparent default + hover fills surface-2
   But danger hover should follow red-tinted bg like old red-50 */
.btn-app--danger:hover{
    background: var(--danger-hover-bg);
    border-color: var(--danger-border);
}

/* ======================================================================
   2026-02-03 [Sprint 10]
   Quote form helpers (token-driven)
   - Removes: border-t from HTML
   - Keeps light UI identical (subtle top divider)
   ====================================================================== */

.app-divider-top{
    border-top: 1px solid var(--border);
}

/* ======================================================================
   2026-02-03 [Sprint 10]
   Quote detail helpers (token-driven)
   - Removes: bg-blue-*, text-white/button hover colors from HTML
- Keeps light UI identical (primary CTA look)
====================================================================== */

/* Medium select size for inline action forms (matches px-3 py-2 + rounded-md) */
.select-app--md{
    padding: 8px 12px;     /* px-3 py-2 */
    border-radius: 12px;   /* rounded-md */
    font-size: 14px;       /* text-sm */
}

/* Primary button variant uses existing tokens in foundation.css */
.btn-app--primary{
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-border);
    color: var(--btn-primary-text);
}
.btn-app--primary:hover{
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-bg);
}


/* ADD: Accent primary action button (UI 동일: blue-600 + hover blue-700) */
.btn-app--accent{
    background: var(--wynlo-accent-bg);
    border-color: var(--wynlo-accent-border);
    color: var(--wynlo-accent-text);
}
.btn-app--accent:hover{
    background: var(--wynlo-accent-hover-bg);
    border-color: var(--wynlo-accent-hover-bg);
}


/* modal.css */
/* Common modal styles (no page-specific coupling) */

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal__panel {
    position: relative;
    width: min(720px, calc(100% - 32px));
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    background: var(--modal-bg);
    color: var(--modal-text);
    border-radius: 18px;
    box-shadow: var(--modal-shadow);
    padding: 22px 22px 18px;
    outline: none;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--modal-text);
    margin: 0;
}

.modal__close {
    border: 0;
    background: transparent;
    color: var(--modal-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
}

.modal__close:hover {
    background: var(--surface-2);
    color: var(--modal-text);
}

.modal__body {
    padding: 8px 0 4px;
}

.modal__footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

/* Example button style (replace with your existing token button classes if you have them) */
.modal__btn {
    border: 1px solid var(--modal-button-primary-border);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    background: var(--modal-button-primary-bg);
    color: var(--modal-button-primary-text);
}

.modal__btn:hover {
    background: var(--modal-button-primary-hover-bg);
    border-color: var(--modal-button-primary-hover-bg);
}

.modal__btn--ghost {
    background: var(--modal-button-ghost-bg);
    color: var(--modal-button-ghost-text);
    border: 1px solid var(--modal-button-ghost-border);
}

.modal__btn--ghost:hover {
    background: var(--modal-button-ghost-hover-bg);
}

.modal__btn--enabled {
    background: var(--modal-button-primary-bg);
    border-color: var(--modal-button-primary-border);
    color: var(--modal-button-primary-text);
}

.modal__btn--enabled:hover {
    background: var(--modal-button-primary-hover-bg);
    border-color: var(--modal-button-primary-hover-bg);
}

.modal__btn--disabled,
.modal__btn:disabled {
    background: var(--modal-button-disabled-bg);
    border-color: var(--modal-button-disabled-border);
    color: var(--modal-button-disabled-text);
    cursor: not-allowed;
    opacity: 1;
}


/* feedback-fab.css */
/* Global floating feedback button */

.feedback-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 950; /* below modal(1000), above most UI */

    width: 48px;
    height: 48px;
    border-radius: 999px;

    border: 1px solid rgba(68,71,74,0.18);
    background: #44474A;
    color: #fff;

    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.feedback-fab:hover {
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .feedback-fab {
        right: 14px;
        bottom: 14px;
    }
}

.feedback-field {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--modal-field-border);
    background: var(--modal-field-bg);
    color: var(--modal-field-text);
}

.feedback-field::placeholder {
    color: var(--modal-field-placeholder);
}

.feedback-note {
    font-size: 12px;
    color: var(--modal-muted);
    line-height: 1.4;
}


/* 2026-04-01 [sprint 11] danger modal button */
.btn-danger {
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    background: transparent;
}

.btn-danger:hover {
    background: var(--danger-hover-bg);
}

/* 2026-04-01 [sprint 11] cancel modal emphasis */
.modal--danger-center .modal__body {
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   Pagination button final override (token-driven)
   ========================================================================== */

.btn-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;
    padding: 6px 12px;

    border-radius: 10px;
    border: 1px solid var(--pagination-border);
    background: var(--pagination-bg);
    color: var(--pagination-text);

    font-size: 14px;
    font-weight: 600;

    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn-page:hover {
    background: var(--pagination-hover-bg);
    border-color: var(--pagination-hover-border);
    color: var(--pagination-hover-text);
}

.btn-page.is-active {
    background: var(--pagination-active-bg);
    border-color: var(--pagination-active-border);
    color: var(--pagination-active-text);
    pointer-events: none;
}

.btn-page.is-disabled {
    background: var(--pagination-disabled-bg);
    border-color: var(--pagination-disabled-border);
    color: var(--pagination-disabled-text);
    cursor: not-allowed;
    pointer-events: none;
}