/* =========================================================
 * Oddpalm Partner - Clean SaaS Theme
 * Accent: Dark Blue #1e3a8a
 * ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* === LOGIN === */
.login-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-shell { width: 100%; max-width: 420px; }
.login-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.08);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.brand-mark {
    width: 32px; height: 32px;
    background: #1e3a8a;
    border-radius: 8px;
    margin: 0 auto;
    position: relative;
}
.brand-mark::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 2px;
}
.brand-mark.large { width: 56px; height: 56px; border-radius: 14px; }
.brand-mark.large::after { width: 22px; height: 22px; border-radius: 4px; }
.login-title {
    font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
    margin: 16px 0 4px; color: #1a1a1a;
}
.login-subtitle {
    font-size: 13px; color: #6b7280; margin: 0;
    letter-spacing: 0.05em; text-transform: uppercase;
}
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 16px;
}
.login-form .form-group { margin-bottom: 14px; }
.login-form label {
    display: block;
    font-size: 13px; font-weight: 600;
    margin-bottom: 6px; color: #374151;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: all 0.15s;
}
.login-form input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.btn-primary {
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-primary:hover { background: #1e40af; }
.btn-primary:active { background: #172554; }
.btn-block { width: 100%; margin-top: 8px; }
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}
.login-footer p { font-size: 12.5px; color: #9ca3af; margin: 0; }
.login-footer a { color: #1e3a8a; font-weight: 600; }

/* === APP SHELL === */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky; top: 0;
    height: 100vh;
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text .brand-name {
    font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
    color: #1a1a1a;
}
.brand-text .brand-sub {
    font-size: 11px; color: #6b7280; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.15s;
}
.nav-item:hover { background: #f3f4f6; color: #1a1a1a; }
.nav-item.active { background: #eef2ff; color: #1e3a8a; font-weight: 600; }
.nav-icon { font-size: 14px; opacity: 0.8; width: 16px; text-align: center; }
.nav-divider { height: 1px; background: #f3f4f6; margin: 12px 4px; }

/* 5-C 추가: 사이드바 섹션 헤더 (관리, 분석 등 그룹 제목) */
.nav-section {
    padding: 14px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 8px;
}

/* 5-C 추가: 권한 뱃지 */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
    line-height: 1.5;
}
.role-badge.role-super {
    background: #1e3a8a;
    color: #fff;
}
.role-badge.role-admin {
    background: #6366f1;
    color: #fff;
}
.role-badge.role-user {
    background: #e5e7eb;
    color: #4b5563;
}

/* 테이블 셀 안에서는 margin-left 제거 (셀 패딩만으로 충분) */
.admin-table td .role-badge {
    margin-left: 0;
}

/* === MAIN === */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 10;
}
.topbar-title {
    font-size: 14px; font-weight: 600; color: #1a1a1a;
}
.topbar-user { display: flex; align-items: center; gap: 16px; }
.user-info { text-align: right; line-height: 1.3; }
.user-name { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.user-company { font-size: 11.5px; color: #6b7280; }
.btn-logout {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12.5px; font-weight: 500;
    color: #4b5563;
    transition: all 0.15s;
}
.btn-logout:hover { background: #f9fafb; border-color: #d1d5db; }
.content { padding: 32px 28px; flex: 1; }

/* === PAGE === */
.page-header { margin-bottom: 28px; }
.page-title {
    font-size: 22px; font-weight: 700;
    margin: 0 0 6px; letter-spacing: -0.01em;
    color: #1a1a1a;
}
.page-subtitle {
    font-size: 14px; color: #6b7280; margin: 0;
}

/* === DASHBOARD CARDS === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    display: block;
}
.dashboard-card:hover:not(.disabled) {
    border-color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
}
.dashboard-card.disabled { opacity: 0.55; cursor: default; }
.dashboard-card .card-icon {
    width: 40px; height: 40px;
    background: #eef2ff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #1e3a8a;
    margin-bottom: 14px;
}
.dashboard-card .card-title {
    font-size: 15px; font-weight: 700; color: #1a1a1a;
    margin-bottom: 6px;
}
.dashboard-card .card-desc {
    font-size: 13px; color: #6b7280; line-height: 1.55;
}
.dashboard-card .card-arrow {
    position: absolute; top: 22px; right: 22px;
    font-size: 18px; color: #d1d5db;
    transition: all 0.2s;
}
.dashboard-card:hover:not(.disabled) .card-arrow {
    color: #1e3a8a; transform: translateX(2px);
}

/* === BRAND FIX (사이드바 브랜드 영역) === */
.sidebar .brand {
    justify-content: flex-start;
}
.sidebar .brand .brand-mark {
    margin: 0;
    flex-shrink: 0;
}
.sidebar .brand-text {
    flex: 0 1 auto;
}

/* =========================================================
 * 5-C: 홈 화면 (활성 기능 카드)
 * ========================================================= */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 20px;
}
.home-tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
}
.home-tile:hover {
    border-color: #1e3a8a;
    box-shadow: 0 6px 18px rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}
.home-tile .tile-icon {
    width: 44px;
    height: 44px;
    background: #eef2ff;
    color: #1e3a8a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}
.home-tile .tile-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.home-tile .tile-desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.5;
}

/* =========================================================
 * 5-C: 관리 페이지 (협력사/사용자 관리 공통)
 * ========================================================= */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.admin-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.admin-header .header-actions {
    display: flex;
    gap: 8px;
}

/* 페이지 내 카드 */
.admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
}
.admin-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.admin-card-header .title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

/* 테이블 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.admin-table thead {
    background: #f9fafb;
}
.admin-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 11.5px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #1a1a1a;
}
.admin-table tbody tr:hover {
    background: #fafafa;
}
.admin-table tbody tr:last-child td {
    border-bottom: none;
}
.admin-table .col-narrow {
    width: 80px;
}
.admin-table .col-actions {
    width: 240px;
    text-align: right;
}

/* 상태 뱃지 */
.status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
}
.status-active { background: #dcfce7; color: #166534; }
.status-inactive { background: #fee2e2; color: #991b1b; }
.status-locked { background: #fef3c7; color: #92400e; }

/* 작은 버튼 (테이블 액션용) */
.btn-sm {
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    color: #4b5563;
    font-family: inherit;
    transition: all 0.15s;
}
.btn-sm:hover { background: #f9fafb; color: #1a1a1a; border-color: #d1d5db; }
.btn-sm.primary { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.btn-sm.primary:hover { background: #1e40af; color: #fff; }
.btn-sm.danger { color: #b91c1c; border-color: #fecaca; }
.btn-sm.danger:hover { background: #fef2f2; }
.btn-sm + .btn-sm { margin-left: 5px; }

/* 빈 상태 */
.empty-state {
    padding: 50px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}
.empty-state .empty-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* 회사 선택 드롭다운 (super_admin) */
.company-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.company-selector label {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}
.company-selector select {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
}
.company-selector select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* =========================================================
 * 5-C: 모달 공통
 * ========================================================= */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-bg.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 14px;
    padding: 26px;
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}
.modal h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}
.modal h4 {
    margin: 14px 0 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: #374151;
}
.modal-row {
    margin-bottom: 14px;
}
.modal-row label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.modal-row input,
.modal-row select,
.modal-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    box-sizing: border-box;
    transition: all 0.15s;
}
.modal-row input:focus,
.modal-row select:focus,
.modal-row textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.modal-row input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}
.modal-row .hint {
    margin-top: 5px;
    font-size: 11.5px;
    color: #9ca3af;
    line-height: 1.5;
}
.modal-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .modal-row-2col { grid-template-columns: 1fr; }
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.modal-actions button {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-family: inherit;
    color: #4b5563;
    transition: all 0.15s;
}
.modal-actions button:hover { background: #f9fafb; }
.modal-actions button.primary {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}
.modal-actions button.primary:hover {
    background: #1e40af;
}
.modal-divider {
    margin: 18px -26px;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* =========================================================
 * 5-C: 토글 스위치
 * ========================================================= */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 22px;
    transition: 0.2s;
}
.toggle-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .toggle-slider { background-color: #1e3a8a; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* =========================================================
 * 5-C: 기능 선택 카드 (협력사 추가 모달)
 * ========================================================= */
.feature-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 8px 0 4px;
}
.feature-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.feature-card:hover { border-color: #c7d2fe; }
.feature-card.checked {
    background: #eef2ff;
    border-color: #1e3a8a;
}
.feature-card .fc-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 7px;
    font-size: 14px;
    flex-shrink: 0;
    color: #4b5563;
}
.feature-card.checked .fc-icon {
    background: #1e3a8a;
    color: #fff;
}
.feature-card .fc-text {
    flex: 1;
    min-width: 0;
}
.feature-card .fc-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a1a;
}
.feature-card .fc-desc {
    font-size: 11.5px;
    color: #9ca3af;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
 * 5-C: 기능 토글 행 (회사/사용자별 기능 모달)
 * ========================================================= */
.feature-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.15s;
}
.feature-toggle-row:hover { border-color: #d1d5db; }
.feature-toggle-row .ft-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #1e3a8a;
    border-radius: 7px;
    font-size: 14px;
    flex-shrink: 0;
}
.feature-toggle-row .ft-info {
    flex: 1;
    min-width: 0;
}
.feature-toggle-row .ft-name {
    font-weight: 700;
    font-size: 13.5px;
    color: #1a1a1a;
    margin-bottom: 2px;
}
.feature-toggle-row .ft-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}
.feature-toggle-row .ft-control {
    flex-shrink: 0;
}
.feature-toggle-row .ft-action-select {
    padding: 6px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
}
.feature-toggle-row .ft-action-select:focus {
    outline: none;
    border-color: #1e3a8a;
}

/* 비활성 상태 표시 (회사가 OFF 한 경우) */
.feature-toggle-row.locked {
    opacity: 0.6;
    background: #f9fafb;
}
.feature-toggle-row .ft-locked-msg {
    font-size: 11px;
    font-weight: 700;
    color: #b91c1c;
    margin-top: 3px;
}

/* =========================================================
 * 5-C: 토스트 알림
 * ========================================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    animation: toastIn 0.25s ease;
    transition: opacity 0.3s;
}
.toast.success { background: #16a34a; color: #fff; }
.toast.error { background: #b91c1c; color: #fff; }
.toast.info { background: #1e3a8a; color: #fff; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =========================================================
 * 5-C: 안내 박스
 * ========================================================= */
.info-banner {
    margin-top: 30px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}
.info-banner.warn {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}
.info-banner.info {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #1e3a8a;
}

/* =========================================================
 * 네이버 최저가 페이지
 * ========================================================= */
.np-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
}
@media (max-width: 1100px) {
    .np-grid { grid-template-columns: 1fr; }
}

.np-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.header-meta {
    font-size: 12px;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.panel-body {
    padding: 20px;
}

.form-row { margin-bottom: 18px; }
.form-row:last-child { margin-bottom: 0; }
.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.form-label-row .form-label { margin-bottom: 0; }
.form-hint {
    margin-top: 6px;
    font-size: 11.5px;
    color: #9ca3af;
    line-height: 1.6;
}
.form-hint code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    color: #1e3a8a;
    font-family: 'Consolas', 'Courier New', monospace;
}

/* 세그먼트 컨트롤 */
.seg-control {
    display: flex;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.seg-btn {
    flex: 1;
    padding: 9px 12px;
    background: #fff;
    border: none;
    border-right: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover:not(.active):not(:disabled) {
    background: #f9fafb;
    color: #1e3a8a;
}
.seg-btn.active {
    background: #1e3a8a;
    color: #fff;
}
.seg-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 모델 카운트 */
.model-count {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #9ca3af;
}
.model-count.active {
    background: #eef2ff;
    color: #1e3a8a;
}

/* 텍스트영역 */
.model-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Pretendard', monospace;
    line-height: 1.7;
    resize: vertical;
    background: #fff;
    transition: all 0.15s;
}
.model-textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.model-textarea:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* 실행 버튼 */
.btn-run {
    width: 100%;
    padding: 13px 20px;
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
    margin-top: 8px;
}
.btn-run:hover:not(:disabled) { background: #1e40af; }
.btn-run:active:not(:disabled) { background: #172554; }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-run.running {
    background: #b91c1c;
}
.btn-run.running:hover { background: #991b1b; }
.run-icon { font-size: 11px; line-height: 1; }

/* 진행률 */
.progress-section { margin-bottom: 16px; }
.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12.5px;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}
.progress-percent {
    color: #1e3a8a;
    font-weight: 700;
}
.progress-track {
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: #1e3a8a;
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* 로그 */
.log-area {
    background: #0f172a;
    color: #cbd5e1;
    border-radius: 8px;
    padding: 14px 16px;
    height: 280px;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
}
.log-line {
    white-space: pre-wrap;
    word-break: break-all;
}
.log-empty {
    color: #6b7280;
    font-family: 'Pretendard', sans-serif;
    text-align: center;
    padding: 60px 20px;
    font-size: 13px;
}
.log-empty-icon {
    font-size: 24px;
    color: #475569;
    margin-bottom: 10px;
}
.log-line.log-error { color: #fca5a5; }
.log-line.log-warn { color: #fcd34d; }

/* 결과 */
.result-section { margin-top: 16px; }
.result-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.summary-item {
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid;
}
.summary-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.summary-fail {
    background: #fef2f2;
    border-color: #fecaca;
}
.summary-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.summary-success .summary-num { color: #16a34a; }
.summary-fail .summary-num { color: #b91c1c; }
.summary-label {
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 4px;
    color: #6b7280;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 11px 16px;
    background: #1e3a8a;
    color: #fff;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s;
}
.btn-download:hover { background: #1e40af; }
.download-icon { font-size: 14px; }

.fail-list {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}
.fail-list-title {
    font-size: 12px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 6px;
}
.fail-list ul {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
    color: #7f1d1d;
}
.fail-list li { padding: 1px 0; }

/* 검색 이력 */
.btn-ghost {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    font-family: inherit;
}
.btn-ghost:hover { background: #f9fafb; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    padding: 30px 0;
}
.history-item {
    padding: 12px 14px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    transition: all 0.15s;
}
.history-item:hover {
    border-color: #e5e7eb;
    background: #fafafa;
}
.history-keyword {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    word-break: break-all;
}
.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11.5px;
    color: #9ca3af;
}
.hm-stat { color: #4b5563; }
/* ════════════════════════════════════════════════════════
   사용자 관리 - 액션 더보기 드롭다운 메뉴
   기존 style.css 끝에 추가
   ════════════════════════════════════════════════════════ */

/* 사용자 관리 페이지: col-actions 너비 축소 + 우측 정렬 */
.admin-table th.col-actions,
.admin-table td.col-actions {
    width: 160px;
    text-align: right;
    white-space: nowrap;
}
.admin-table td.col-actions .btn-sm {
    margin-left: 0;
}

.action-menu {
    display: inline-block;
    position: relative;
}

/* 더보기 점 3개 버튼 */
.action-menu-btn {
    padding: 5px 10px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    letter-spacing: 1px;
    color: #6b7280 !important;
    margin-left: 4px;
}
.action-menu-btn:hover {
    background: #f3f4f6 !important;
    color: #1a1a1a !important;
}

/* 드롭다운 리스트 */
.action-menu-list {
    position: fixed;
    min-width: 170px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 4px;
    text-align: left;
    animation: actionMenuIn 0.12s ease;
}
@keyframes actionMenuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 메뉴 아이템 */
.action-menu-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
}
.action-menu-item:hover {
    background: #eef2ff;
    color: #1e3a8a;
}
.action-menu-item.danger {
    color: #b91c1c;
}
.action-menu-item.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}
.action-menu-item.highlight {
    color: #b45309;
    font-weight: 600;
}
.action-menu-item.highlight:hover {
    background: #fef3c7;
    color: #92400e;
}

/* 구분선 */
.action-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 2px;
}
