/* ===========================================
   부동산 AI 매물관리 - index.php 기준 통일 스타일
   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ========================================
   공통 컴포넌트
   ======================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 16px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline { background: white; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success, .badge-active { background: #dcfce7; color: #166534; }
.badge-warning, .badge-pending { background: #fef3c7; color: #92400e; }
.badge-danger, .badge-high { background: #fee2e2; color: #991b1b; }
.badge-info, .badge-sold { background: #dbeafe; color: #1e40af; }
.badge-secondary, .badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-low { background: #dcfce7; color: #166534; }

/* ========================================
   모바일 레이아웃 (기본)
   ======================================== */

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.mobile-logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-actions {
    display: flex;
    gap: 4px;
}

.mobile-actions a,
.mobile-actions button {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-main {
    padding: 56px 0 80px;
    min-height: 100vh;
}

/* 모바일 섹션 (index.php 스타일) */
.mobile-section {
    background: var(--bg-card);
    padding: 16px;
    margin-bottom: 8px;
}

.mobile-section-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mobile-section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* 하단 탭바 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: color 0.2s;
}

.tab-item:hover,
.tab-item.active {
    color: var(--primary);
}

.tab-item i { font-size: 22px; }
.tab-item span { font-size: 11px; font-weight: 500; }

.tab-item.center i {
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-top: -24px;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   PC 레이아웃 (1024px 이상)
   ======================================== */

.pc-layout { display: none; }

@media (min-width: 1024px) {
    .mobile-header,
    .mobile-main,
    .tab-bar {
        display: none;
    }

    .pc-layout {
        display: flex;
        min-height: 100vh;
    }

    .pc-sidebar {
        width: 260px;
        background: #1e293b;
        color: white;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .pc-sidebar-header {
        padding: 24px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .pc-sidebar-header h1 {
        font-size: 20px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .pc-sidebar-header h1 i { color: var(--primary-light); }
    .pc-sidebar-header small { display: block; font-size: 12px; color: #94a3b8; margin-top: 4px; }

    .pc-nav {
        flex: 1;
        padding: 16px 0;
        overflow-y: auto;
    }

    /* PC 사이드바 스크롤바 스타일 */
    .pc-nav::-webkit-scrollbar {
        width: 6px;
    }
    .pc-nav::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
    }
    .pc-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 3px;
    }
    .pc-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.3);
    }

    .pc-nav-section { margin-bottom: 8px; }
    .pc-nav-title {
        padding: 8px 20px;
        font-size: 11px;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.5px;
    }

    .pc-nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.2s;
        border-left: 3px solid transparent;
    }

    .pc-nav-link:hover {
        background: rgba(255,255,255,0.05);
        color: white;
    }

    .pc-nav-link.active {
        background: rgba(37, 99, 235, 0.2);
        color: white;
        border-left-color: var(--primary);
    }

    .pc-nav-link i { width: 20px; text-align: center; }

    .pc-sidebar-footer {
        padding: 16px 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .pc-user { display: flex; align-items: center; gap: 12px; }
    .pc-user-avatar {
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .pc-user-name { font-size: 14px; font-weight: 500; }
    .pc-user-email { font-size: 12px; color: #94a3b8; }

    .pc-main {
        flex: 1;
        margin-left: 260px;
        padding: 20px 24px;
        background: var(--bg);
    }

    .pc-content-mirror .mobile-section {
        background: var(--bg-card);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        margin-bottom: 16px;
    }

    .pc-content-mirror .card {
        border: 1px solid var(--border);
    }

    .pc-content-mirror .listing-view-grid {
        display: grid;
        grid-template-columns: 1fr 360px;
        gap: 24px;
        align-items: start;
    }

    .pc-content-mirror .listing-sidebar {
        position: sticky;
        top: 20px;
    }
}

/* ========================================
   폼 스타일
   ======================================== */

.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 폼 섹션 (여백 줄임) */
.form-section {
    background: var(--bg-card);
    padding: 14px 16px;
    margin-bottom: 8px;
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i { color: var(--primary); }

/* 체크박스/라디오 그룹 */
.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.checkbox-label:hover, .radio-label:hover {
    border-color: var(--primary);
}

.checkbox-label:has(input:checked),
.radio-label:has(input:checked) {
    border-color: var(--primary);
    background: #dbeafe;
}

/* ========================================
   테이블
   ======================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

tbody tr:hover { background: var(--bg); }
.price { font-weight: 600; color: var(--primary); }

/* ========================================
   리스트 카드 (모바일)
   ======================================== */

.list-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.list-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.list-card-title {
    font-weight: 600;
    font-size: 15px;
}

.list-card-body {
    color: var(--text-secondary);
    font-size: 13px;
}

.list-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* ========================================
   필터 바
   ======================================== */

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-bar .form-control {
    width: auto;
    min-width: 120px;
}

/* ========================================
   페이지 헤더
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ========================================
   액션 버튼
   ======================================== */

.actions {
    display: flex;
    gap: 6px;
}

/* ========================================
   페이지네이션
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.pagination a:hover, .pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   토스트
   ======================================== */

.toast-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s;
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   Alert
   ======================================== */

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-xs);
    margin-bottom: 12px;
    font-size: 13px;
}

.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ========================================
   모달
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: var(--radius-xs);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    max-height: 50vh;
}

.modal-footer {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* ========================================
   로그 스타일
   ======================================== */

.log-entry {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 12px;
    margin-bottom: 10px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
}

.log-entry.request { border-left: 4px solid var(--primary); }
.log-entry.ai_response { border-left: 4px solid var(--success); }
.log-entry.action_execute { border-left: 4px solid var(--warning); }
.log-entry.action_result { border-left: 4px solid var(--danger); }
.log-entry.error { border-left: 4px solid #dc2626; background: #fef2f2; }

.log-time { color: var(--text-muted); font-size: 11px; margin-bottom: 6px; }
.log-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
}

.log-type.request { background: #dbeafe; color: #1d4ed8; }
.log-type.ai_response { background: #d1fae5; color: #047857; }
.log-type.action_execute { background: #fef3c7; color: #b45309; }
.log-type.action_result { background: #fee2e2; color: #b91c1c; }
.log-type.error { background: #dc2626; color: white; }

.log-content {
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.date-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.date-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.date-btn:hover { border-color: var(--primary); color: var(--primary); }
.date-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.filter-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    background: white;
}

.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--text-primary); color: white; border-color: var(--text-primary); }

/* ========================================
   캘린더 (할일)
   ======================================== */

.view-toggle {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-xs);
    padding: 3px;
}

.view-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 17px;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.calendar-nav {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
}

.calendar-nav:hover { background: var(--primary); color: white; }

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.weekday {
    text-align: center;
    padding: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.weekday.sunday { color: var(--danger); }
.weekday.saturday { color: var(--primary); }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    min-height: 70px;
    padding: 6px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    cursor: pointer;
}

.calendar-day:hover { background: #e2e8f0; }
.calendar-day.empty { background: transparent; cursor: default; }
.calendar-day.today { background: #dbeafe; border: 2px solid var(--primary); }

.day-number {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.day-number.sunday { color: var(--danger); }
.day-number.saturday { color: var(--primary); }

.day-add-btn {
    opacity: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 9px;
}

.calendar-day:hover .day-add-btn { opacity: 1; }

.day-todos { display: flex; flex-direction: column; gap: 2px; }

.day-todo-item {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-todo-item.priority-high { background: #fee2e2; color: #991b1b; }
.day-todo-item.priority-medium { background: #fef3c7; color: #92400e; }
.day-todo-item.priority-low { background: #dcfce7; color: #166534; }
.day-todo-item.done { background: #f1f5f9; color: #64748b; text-decoration: line-through; }

.day-todo-more { font-size: 9px; color: var(--primary); }

.calendar-legend {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.high { background: #fee2e2; }
.legend-dot.medium { background: #fef3c7; }
.legend-dot.low { background: #dcfce7; }
.legend-dot.done { background: #f1f5f9; }

/* ========================================
   반응형 조정
   ======================================== */

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .form-row { grid-template-columns: 1fr; }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .form-control {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-day { min-height: 50px; padding: 4px; }
    .day-number { font-size: 11px; }
    .day-todo-item { font-size: 9px; }
    .calendar-title { font-size: 15px; }

    .actions { flex-direction: column; gap: 4px; }
    .actions .btn { width: 100%; }
}

/* 모바일에서 카드 보이고 테이블 숨김 */
.mobile-cards { display: block; }
.desktop-table { display: none; }

@media (min-width: 1024px) {
    .mobile-cards { display: none; }
    .desktop-table { display: block; }
}

/* ========================================
   슬라이드 메뉴
   ======================================== */

.slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.slide-overlay.show {
    opacity: 1;
    visibility: visible;
}

.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: white;
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.slide-menu.show {
    transform: translateX(0);
}

.slide-header {
    padding: 28px 20px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.slide-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.slide-avatar {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.slide-name {
    font-size: 17px;
    font-weight: 700;
}

.slide-email {
    font-size: 13px;
    opacity: 0.8;
}

.slide-body {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

/* 모바일 슬라이드 메뉴 스크롤바 스타일 */
.slide-body::-webkit-scrollbar {
    width: 4px;
}
.slide-body::-webkit-scrollbar-track {
    background: transparent;
}
.slide-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}
.slide-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

.slide-section-title {
    padding: 10px 20px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.slide-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
}

.slide-item:hover {
    background: var(--bg);
}

.slide-item i {
    width: 22px;
    text-align: center;
    font-size: 17px;
    color: var(--text-muted);
}

.slide-item.active {
    background: var(--bg);
    color: var(--primary);
}

.slide-item.active i {
    color: var(--primary);
}

.slide-item.danger {
    color: var(--danger);
}

.slide-item.danger i {
    color: var(--danger);
}

.slide-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   FAB 메뉴
   ======================================== */

.fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.fab-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fab-menu {
    position: fixed;
    bottom: calc(80px + var(--safe-bottom));
    right: 16px;
    z-index: 201;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.fab-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 28px;
    padding: 8px 16px 8px 8px;
    box-shadow: var(--shadow-lg);
}

.fab-item:hover {
    transform: scale(1.02);
}

.fab-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.fab-icon.blue { background: var(--primary); }
.fab-icon.green { background: var(--success); }
.fab-icon.orange { background: var(--warning); }
.fab-icon.purple { background: #8b5cf6; }

.fab-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 4px;
}

@media (min-width: 1024px) {
    .fab-menu,
    .fab-overlay {
        display: none;
    }
}

/* ========================================
   카테고리 탭
   ======================================== */

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   통계 카드
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #fef3c7; color: #d97706; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   아이템 리스트
   ======================================== */

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.item-list li:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.item-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   헤더 액션
   ======================================== */

.header-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   모달 확장
   ======================================== */

.modal-lg {
    max-width: 600px;
}

/* ========================================
   유틸리티
   ======================================== */

/* ========================================
   로그인 페이지
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 48px 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-box > p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 36px;
}

.login-box form {
    text-align: left;
}

.login-box .form-group {
    margin-bottom: 18px;
}

.login-box .form-control {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: var(--radius-xs);
}

.login-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 12px;
    border-radius: var(--radius-xs);
}

.login-box .alert {
    text-align: left;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .login-box {
        padding: 36px 24px;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .login-box h1 {
        font-size: 20px;
    }

    .login-box form {
        background: white;
        padding: 24px;
        border-radius: var(--radius);
        border: 1px solid var(--border);
    }
}

/* ========================================
   유틸리티
   ======================================== */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
