@charset "UTF-8";

/* ============================================================
   v2 PATCH — admin opt-out
   admin 화면은 admin.css 기준으로만 보이도록 일반 UI 패치 영향을 막는다.
   ============================================================ */
body.admin-page,
body.admin-body {
    background: var(--admin-bg, #f8f9fa) !important;
}

body.admin-page .container,
body.admin-body .container,
body.admin-page .page-header,
body.admin-body .page-header,
body.admin-page .section-title,
body.admin-body .section-title {
    all: revert;
}

/* ============================================================
   SCUTUM · redesign.css  (v2)
   ----------------------------------------------------------------
   목적
   기존 layout.css / index.css / style.css 등을 직접 고치지 않고
   이 파일 하나를 마지막에 로드해서 시안의 톤·간격·컴포넌트를 덮어씁니다.

   적용
   header.html 의 <link> 들 가장 마지막에 추가:
     <link rel="stylesheet" href="/static/css/redesign.css">

   덮어쓰는 영역
   1. 헤더/사이드바 — 톤 다운, 라이트 사이드바
   2. 컨테이너/카드 공통
   3. 대시보드 hero / 봇 카드 / 알림 리스트
   4. 봇 목록 (gridbot 류)
   5. 봇 상세 (botdetail)
   6. 자산
   7. 로그인
   8. 봇 생성 마법사
   9. 모바일 대응
   ============================================================ */


/* ============================================================
   1. HEADER / SIDEBAR  — 라이트 + 톤다운
   ============================================================ */
header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--line-200) !important;
    box-shadow: var(--shadow-xs) !important;
}

header.dev-header {
    background: var(--text-900) !important;
}

header .header_container .logo {
    color: var(--brand-600) !important;
    font-style: normal !important;
    letter-spacing: -1px !important;
    text-shadow: none !important;
}

header.dev-header .header_container .logo {
    color: #fff !important;
}

header .logout {
    background: var(--surface-alt) !important;
    color: var(--text-700) !important;
    border: 1px solid var(--line-200);
    border-radius: var(--radius-pill);
    width: 86px;
    height: 34px;
    line-height: 32px;
    font-weight: 600;
    transition: all 0.2s;
}

header .logout:hover {
    background: var(--brand-100) !important;
    color: var(--brand-600) !important;
    border-color: var(--brand-100);
}

header.dev-header .logout {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.2);
}

/* sidebar — 라이트, 톤다운 */
.side_bar {
    background: var(--bg-100) !important;
    border-right: 1px solid var(--line-200);
    box-shadow: none !important;
    padding: 14px 12px !important;
}

.side_bar li {
    padding-left: 0;
    margin: 1px 0;
    border-radius: var(--radius-md);
    border-left: none !important;
    background-image: none !important;
    overflow: hidden;
}

.side_bar a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: var(--text-700) !important;
    line-height: 42px !important;
    padding: 0 12px;
    font-weight: 500 !important;
    letter-spacing: 0;
}

.side_bar a svg {
    width: 18px;
    height: 18px;
    color: var(--text-500);
    flex: 0 0 auto;
    stroke-width: 2;
}

.side_bar li:hover {
    background: var(--brand-050) !important;
}

.side_bar li:hover a {
    color: var(--brand-700) !important;
}

.side_bar li:hover a svg,
.side_bar li.active a svg {
    color: var(--brand-700);
}

.side_bar li.active {
    background: var(--brand-100) !important;
    border-left: none !important;
}

.side_bar li.active a {
    color: var(--brand-700) !important;
    font-weight: 700 !important;
}

.side_bar .side_divider {
    background: var(--line-200) !important;
    margin: 12px 8px !important;
}

@media (max-width: 1200px) {
    .side_bar {
        padding: 14px 6px !important;
    }
    .side_bar li {
        padding-left: 0 !important;
    }
}


/* ============================================================
   2. 공통 컨테이너 / 카드 / 페이지 헤더
   ============================================================ */
body:not(.admin-page):not(.admin-body) {
    background: var(--bg-200);
}

body:not(.admin-page):not(.admin-body) .container {
    padding-top: calc(var(--header-h) + 24px);
}

body:not(.admin-page):not(.admin-body) .page-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-200);
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-900);
}

.page-subtitle {
    margin-top: 6px;
    color: var(--text-500);
    font-size: 13px;
}

body:not(.admin-page):not(.admin-body) .section-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-900);
    margin-bottom: 12px;
}

/* 모든 카드 컨테이너 통일 */
.card-box,
.dashboard-card,
.bot-card,
.detail-card,
.assets-card,
.summary-card,
.list-card,
.panel,
.box {
    background: var(--surface) !important;
    border: 1px solid var(--line-200) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xs) !important;
    padding: 22px !important;
}


/* ============================================================
   3. 버튼 시스템
   ============================================================ */
.btn,
button.primary_btn,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--brand-600);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    height: 40px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
}
.btn:hover,
button.primary_btn:hover,
.primary-btn:hover {
    background: var(--brand-700);
    box-shadow: var(--shadow-sm);
}

.btn--secondary,
button.secondary_btn,
.secondary-btn {
    background: var(--surface);
    color: var(--text-700);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    height: 40px;
    padding: 0 20px;
    font-weight: 600;
}
.btn--secondary:hover,
.secondary-btn:hover {
    background: var(--brand-050);
    border-color: var(--brand-500);
    color: var(--brand-700);
}

.btn--danger,
button.danger_btn,
.danger-btn,
.btn.btn-danger {
    background: var(--neg-soft);
    color: var(--neg-text);
    border: 1px solid #ffc6cf;
}
.btn--danger:hover,
.btn.btn-danger:hover {
    background: var(--neg-500);
    color: #fff;
}

.btn-primary {
    background: var(--brand-600);
    color: #fff;
    border: 1px solid var(--brand-600);
}
.btn-primary:hover {
    background: var(--brand-700);
    border-color: var(--brand-700);
}

.btn-outline {
    background: var(--surface);
    color: var(--text-700);
    border: 1px solid var(--line-200);
}
.btn-outline:hover {
    background: var(--brand-050);
    border-color: var(--brand-500);
    color: var(--brand-700);
}

.btn-sm {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.btn--ghost {
    background: transparent;
    color: var(--text-500);
    border: none;
    height: 36px;
    padding: 0 12px;
}
.btn--ghost:hover {
    background: var(--surface-alt);
    color: var(--text-900);
}

body:not(.admin-page):not(.admin-body) .btn,
body:not(.admin-page):not(.admin-body) button,
body:not(.admin-page):not(.admin-body) .blue_btn,
body:not(.admin-page):not(.admin-body) .cancel_btn,
body:not(.admin-page):not(.admin-body) .accept_btn,
body:not(.admin-page):not(.admin-body) .tab,
body:not(.admin-page):not(.admin-body) .mode-tab,
body:not(.admin-page):not(.admin-body) .history-btn,
body:not(.admin-page):not(.admin-body) .trade-btn,
body:not(.admin-page):not(.admin-body) .withdraw-btn,
body:not(.admin-page):not(.admin-body) .deposit-addr-btn,
body:not(.admin-page):not(.admin-body) .inline-edit-btn,
body:not(.admin-page):not(.admin-body) .reset-btn,
body:not(.admin-page):not(.admin-body) .delete-btn,
body:not(.admin-page):not(.admin-body) .back-btn,
body:not(.admin-page):not(.admin-body) .max-btn,
body:not(.admin-page):not(.admin-body) .api_addbtn,
body:not(.admin-page):not(.admin-body) .delete_btn,
body:not(.admin-page):not(.admin-body) .btn_gray {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 34px !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0 !important;
}

body:not(.admin-page):not(.admin-body) .blue_btn,
body:not(.admin-page):not(.admin-body) .api_addbtn {
    background: var(--brand-600);
    color: #fff;
    border: 1px solid var(--brand-600);
    border-radius: var(--radius-md);
    font-weight: 700;
}

body:not(.admin-page):not(.admin-body) .cancel_btn,
body:not(.admin-page):not(.admin-body) .btn_gray {
    background: var(--surface);
    color: var(--text-700);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    font-weight: 700;
}

body:not(.admin-page):not(.admin-body) .delete-btn,
body:not(.admin-page):not(.admin-body) .delete_btn {
    border-radius: var(--radius-md);
    font-weight: 700;
}

body:not(.admin-page):not(.admin-body) button:disabled,
body:not(.admin-page):not(.admin-body) .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body:not(.admin-page):not(.admin-body) .autobot-modal-panel,
body:not(.admin-page):not(.admin-body) .modal-panel,
body:not(.admin-page):not(.admin-body) .modal-content {
    border: 1px solid var(--line-200);
}

body:not(.admin-page):not(.admin-body) .autobot-modal-header,
body:not(.admin-page):not(.admin-body) .modal-header {
    gap: 16px;
}

body:not(.admin-page):not(.admin-body) .autobot-modal-header h3,
body:not(.admin-page):not(.admin-body) .modal-header h3 {
    line-height: 1.25;
    min-width: 0;
}

body:not(.admin-page):not(.admin-body) .modal-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 52px;
    min-height: 32px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

body:not(.admin-page):not(.admin-body) .input_text,
body:not(.admin-page):not(.admin-body) .api_select,
body:not(.admin-page):not(.admin-body) .apikey_input,
body:not(.admin-page):not(.admin-body) .input {
    min-width: 0;
    line-height: 1.25;
}

body:not(.admin-page):not(.admin-body) .actions,
body:not(.admin-page):not(.admin-body) .modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

body:not(.admin-page):not(.admin-body) .actions > button,
body:not(.admin-page):not(.admin-body) .modal-actions > button {
    min-width: 84px;
}


/* ============================================================
   4. 대시보드 (index.html)
   ============================================================ */
.dashboard-hero,
.summary-section {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
    border: none !important;
}

.dashboard-hero .label,
.summary-section .label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-hero .total-equity,
.summary-section .equity-value {
    font-family: var(--font-mono);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 6px;
}

.dashboard-hero .pnl-row {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    font-size: 13px;
}

.dashboard-hero .pnl-row .num {
    font-weight: 700;
    color: #fff;
}

/* 대시보드 알림 / 봇 카드 그리드 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line-100);
}
.alert-item:first-child { border-top: none; }

.alert-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}
.alert-icon--warn { background: var(--warn-soft); color: var(--warn-500); }
.alert-icon--info { background: var(--brand-100); color: var(--brand-600); }
.alert-icon--good { background: var(--pos-soft); color: var(--pos-500); }


/* ============================================================
   5. 봇 목록 (gridbot.html / smartbot.html / ...)
   ============================================================ */
.bot-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body:not(.admin-page):not(.admin-body) .autobot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-200);
    margin-bottom: 22px;
}

body:not(.admin-page):not(.admin-body) .autobot-list-section {
    margin-top: 0;
}

body:not(.admin-page):not(.admin-body) .list-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

body:not(.admin-page):not(.admin-body) .list-section-header .section-title,
body:not(.admin-page):not(.admin-body) .autobot-list-section > .section-title {
    margin: 0;
}

body:not(.admin-page):not(.admin-body) .bulk-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    min-height: 40px;
    white-space: nowrap;
}

body:not(.admin-page):not(.admin-body) .bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 600;
}

body:not(.admin-page):not(.admin-body) .bulk-select-all input,
body:not(.admin-page):not(.admin-body) .bot-select input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
}

body:not(.admin-page):not(.admin-body) .selected-count {
    display: inline-flex;
    align-items: center;
    color: var(--text-500);
    font-size: 13px;
    font-weight: 600;
}

.bot-card {
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
    padding: 20px 22px !important;
}

.bot-card:hover {
    border-color: var(--brand-500) !important;
    box-shadow: var(--shadow-sm) !important;
    transform: translateY(-2px);
}

.bot-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-100);
}

.bot-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.bot-card-title .bot-select {
    display: inline-flex;
    align-items: center;
    margin: 0 2px 0 0;
    cursor: pointer;
}

.bot-card-symbol {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.bot-card-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: var(--brand-100);
    color: var(--brand-600);
    border-radius: var(--radius-xs);
    font-size: 10.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.bot-card-pnl {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.bot-card-pnl.pos { color: var(--pos-500); }
.bot-card-pnl.neg { color: var(--neg-500); }

.bot-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    font-size: 11.5px;
    color: var(--text-500);
    flex: 0 0 auto;
}
.bot-card-meta .label { display: block; margin-bottom: 2px; }
.bot-card-meta .value {
    color: var(--text-900);
    font-weight: 600;
    font-family: var(--font-mono);
}

body:not(.admin-page):not(.admin-body) .bot-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 28px;
}

body:not(.admin-page):not(.admin-body) .bot-info {
    display: grid;
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
    align-items: baseline;
    justify-content: start;
    gap: 12px;
    min-width: 0;
    font-size: 13px;
}

body:not(.admin-page):not(.admin-body) .bot-info-label {
    color: var(--text-500);
    font-size: 12px;
    white-space: nowrap;
}

body:not(.admin-page):not(.admin-body) .bot-info-value {
    color: var(--text-900);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    overflow-wrap: anywhere;
}

body:not(.admin-page):not(.admin-body) .create-bot-btn {
    min-width: 108px;
    height: 42px;
    border-radius: var(--radius-md);
}

body:not(.admin-page):not(.admin-body) .bot-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body:not(.admin-page):not(.admin-body) .inline-edit-btn {
    height: 30px;
    border-radius: 6px;
    font-weight: 700;
}


/* ============================================================
   6. 봇 상세 (botdetail.css 보강)
   ============================================================ */
.bot-detail-hero {
    background: var(--surface);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-xs);
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr;
    gap: 0;
}

.bot-detail-hero > div {
    padding: 0 22px;
    border-right: 1px solid var(--line-100);
}
.bot-detail-hero > div:first-child { padding-left: 0; }
.bot-detail-hero > div:last-child  { border-right: none; padding-right: 0; }

.bot-detail-hero .label {
    font-size: 11px;
    color: var(--text-500);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bot-detail-hero .big-value {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.bot-detail-hero .pos { color: var(--pos-500); }
.bot-detail-hero .neg { color: var(--neg-500); }

/* 그리드 시각화 영역 */
.grid-viz,
.grid-chart {
    background: var(--surface);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
}

/* P&L 차트 컨테이너 */
.pnl-chart-card {
    background: var(--surface);
    border: 1px solid var(--line-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
    margin-bottom: 18px;
}

.pnl-chart-card svg { display: block; }

.health-bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--line-100);
    overflow: hidden;
    margin-top: 10px;
}
.health-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-600), var(--pos-500));
}


/* ============================================================
   7. 자산 (assets.html)
   ============================================================ */
.assets-summary {
    background: var(--text-900);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-md);
}
.assets-summary .label { opacity: 0.7; font-size: 12px; font-weight: 600; }
.assets-summary .value {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 6px;
}

.assets-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--line-200);
}
.assets-table th {
    background: var(--surface-alt);
    padding: 13px 16px;
    text-align: left;
    font-size: 11px;
    color: var(--text-500);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.assets-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--line-100);
    font-size: 13px;
}
.assets-table tr:hover td { background: var(--bg-200); }
.assets-table .num { text-align: right; }


/* ============================================================
   8. 로그인 (login.html)
   ============================================================ */
.login-wrap,
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-600) 0%, #2A4FA8 100%);
}

.login-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-box h1,
.login-box .title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-900);
    margin-bottom: 6px;
    text-align: center;
}
.login-box .subtitle {
    color: var(--text-500);
    font-size: 13px;
    text-align: center;
    margin-bottom: 28px;
}


/* ============================================================
   9. 봇 생성 마법사 (4-step)
   ============================================================ */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.wizard-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--line-200);
    color: var(--text-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-step.active {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-100);
}

.wizard-step.done {
    background: var(--brand-100);
    border-color: var(--brand-100);
    color: var(--brand-600);
}

.wizard-line {
    flex: 1;
    height: 2px;
    background: var(--line-200);
}
.wizard-line.done { background: var(--brand-600); }

.wizard-label {
    font-size: 11.5px;
    color: var(--text-500);
    font-weight: 600;
    margin-top: 6px;
    text-align: center;
}
.wizard-label.active { color: var(--brand-600); font-weight: 700; }


/* ============================================================
   10. 거래 내역 (bothistory.html)
   ============================================================ */
.history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-100);
    background: var(--surface);
    font-size: 13px;
}
.history-row:hover { background: var(--bg-200); }

.history-side {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}
.history-side.buy  { background: var(--pos-500); }
.history-side.sell { background: var(--neg-500); }


/* ============================================================
   11. 빈 상태 / 에러 상태
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state .icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    color: var(--text-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}
.empty-state .title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.empty-state .subtitle {
    font-size: 13px;
    color: var(--text-500);
    margin-bottom: 20px;
    line-height: 1.7;
}


/* ============================================================
   12. 모바일 (≤900px) — 시안의 모바일 톤
   ============================================================ */
@media (max-width: 900px) {
    body:not(.admin-page):not(.admin-body) .container {
        padding-top: calc(var(--header-h) + 16px);
    }
    .page-title { font-size: 20px; }
    .dashboard-hero,
    .summary-section { padding: 22px 20px; }
    .dashboard-hero .total-equity { font-size: 30px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .bot-detail-hero {
        grid-template-columns: 1fr 1fr;
        gap: 18px 0;
    }
    .bot-detail-hero > div {
        padding: 14px 16px;
        border-right: none;
        border-bottom: 1px solid var(--line-100);
    }
    .bot-list { gap: 12px; }

    body:not(.admin-page):not(.admin-body) .autobot-header,
    body:not(.admin-page):not(.admin-body) .list-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    body:not(.admin-page):not(.admin-body) .bulk-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }

    body:not(.admin-page):not(.admin-body) .bot-card-header,
    body:not(.admin-page):not(.admin-body) .bot-card-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    body:not(.admin-page):not(.admin-body) .bot-card-body {
        grid-template-columns: 1fr;
    }

    body:not(.admin-page):not(.admin-body) .bot-info {
        grid-template-columns: 92px minmax(0, 1fr);
    }
}


/* ============================================================
   13. 유틸리티
   ============================================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }


/* ============================================================
   14. 공통 정렬 보정 — 목록/카드/선택 액션 흔들림 방지
   ============================================================ */
body:not(.admin-page):not(.admin-body) .list-section-header,
body:not(.admin-page):not(.admin-body) .autobot-header,
body:not(.admin-page):not(.admin-body) .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body:not(.admin-page):not(.admin-body) .bulk-actions,
body:not(.admin-page):not(.admin-body) .list-actions,
body:not(.admin-page):not(.admin-body) .selection-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 40px;
    flex-wrap: wrap;
}

body:not(.admin-page):not(.admin-body) .bulk-actions label,
body:not(.admin-page):not(.admin-body) .selection-actions label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    margin: 0;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

body:not(.admin-page):not(.admin-body) .bot-card {
    display: flex;
    flex-direction: column;
    min-height: 176px;
}

body:not(.admin-page):not(.admin-body) .bot-card-header {
    min-height: 42px;
    flex: 0 0 auto;
}

body:not(.admin-page):not(.admin-body) .bot-card-body {
    flex: 1 1 auto;
}

body:not(.admin-page):not(.admin-body) .bot-card-actions {
    margin-top: auto;
    min-height: 36px;
    justify-content: flex-end;
}

body:not(.admin-page):not(.admin-body) .bot-type,
body:not(.admin-page):not(.admin-body) .bot-type-badge,
body:not(.admin-page):not(.admin-body) .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 10px;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
}

body:not(.admin-page):not(.admin-body) .status-badge {
    min-width: 54px;
}

body:not(.admin-page):not(.admin-body) .bot-select,
body:not(.admin-page):not(.admin-body) input[type="checkbox"].bot-select {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
