/* 대시보드 커스텀 스타일 - 미니멀 테이블 디자인 */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #5d4037;
    margin: 0;
    padding: 0;
}

/* 네비게이션 바 - 이미지 스타일 */
.navbar {
    background-color: #ffffff !important;
    border-bottom: none !important;
    box-shadow: none;
    padding: 0;
    flex-direction: column;
}

.navbar-brand {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #5d4037 !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    padding: 30px 0 20px 0;
    display: block;
    text-align: center;
    width: 100%;
}

/* 네비게이션 컨테이너 - 위아래 선 */
.navbar-collapse {
    border-top: 1px solid #5d4037;
    border-bottom: 2px solid #5d4037;
    padding: 0;
    justify-content: center;
}

.navbar-nav {
    gap: 0;
}

.navbar-nav .nav-link {
    color: #5d4037 !important;
    font-weight: 400;
    font-size: 12px;
    padding: 12px 20px;
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0;
    border-bottom: none;
}

.navbar-nav .nav-link:hover {
    background-color: transparent;
    color: #8B6F47 !important;
}

.navbar-nav .nav-link.active {
    background-color: transparent;
    color: #5d4037 !important;
    font-weight: 600;
}

/* 메인 컨텐츠 */
main {
    padding: 20px 40px;
}

/* 섹션 타이틀 - 박스 스타일 */
.section-title {
    display: inline-block;
    border: 1px solid #d7ccc8;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #5d4037;
    margin-bottom: 0;
    background-color: #ffffff;
}

/* 카드 스타일 제거 - 테이블만 보이게 */
.card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 30px;
    box-shadow: none;
}

.card-header {
    background-color: transparent;
    border-bottom: none;
    padding: 0 0 3px 0;
}

/* 자동매매 헤더 (버튼 포함) - 표와 같은 너비로 정렬 */
.card-header.d-flex {
    width: 80%;
    margin: 0 auto;
    padding: 0 0 3px 0;
}

.card-header.d-flex h5 {
    margin-left: 0;
}

.card-header h5 {
    display: inline-flex;
    align-items: center;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: #5d4037;
    margin: 0 auto;
    margin-left: 10%;
    background-color: #ffffff;
}

.card-header h5::before {
    content: '□';
    margin-right: 6px;
    font-size: 24px;
    line-height: 1;
    position: relative;
    top: -4px;
}

.card-body {
    padding: 0;
}

.card-footer {
    background-color: #ffffff;
    border-top: none;
    box-shadow: none;
}

/* 테이블 - 미니멀 스타일 */
.table {
    color: #5d4037;
    border-collapse: collapse;
    width: 80%;
    margin: 0 auto;
    margin-bottom: 0;
}

/* 회원목록 테이블 - 100% 너비 */
#admin-users-table {
    width: 100%;
}

.table thead {
    border-top: 1px solid #5d4037;
}

.table thead th {
    background-color: #ffffff;
    border: none;
    border-bottom: 2px solid #5d4037;
    font-weight: 500;
    font-size: 13px;
    color: #5d4037;
    padding: 5px 15px;
    text-align: center;
}

.table tbody tr {
    border-bottom: none;
}

.table tbody tr:last-child {
    border-bottom: 2px solid #5d4037;
}

.table tbody tr:hover {
    background-color: #faf8f6;
}

.table tbody td {
    border: none;
    font-size: 11px;
    color: #5d4037;
    padding: 7px 15px;
    text-align: center;
    vertical-align: middle;
}

/* 테이블 텍스트 정렬 */
.table .text-end {
    text-align: right !important;
}

.table .text-start {
    text-align: left !important;
}

/* 버튼 - 미니멀 */
.btn {
    border-radius: 0;
    font-weight: 400;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #ffffff;
    border: 1px solid #5d4037;
    color: #5d4037;
}

.btn-primary:hover {
    background-color: #5d4037;
    border-color: #5d4037;
    color: #ffffff;
}

.btn-success {
    background-color: #ffffff;
    border: 1px solid #5d4037;
    color: #5d4037;
}

.btn-success:hover {
    background-color: #5d4037;
    border-color: #5d4037;
    color: #ffffff;
}

.btn-danger {
    background-color: #ffffff;
    border: 1px solid #d32f2f;
    color: #d32f2f;
}

.btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: #ffffff;
}

.btn-outline-danger {
    border-color: #d32f2f;
    color: #d32f2f;
}

.btn-outline-danger:hover {
    background-color: #d32f2f;
    color: #ffffff;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 페이지 타이틀 숨기기 */
.tab-content > .d-flex.border-bottom {
    display: none !important;
}

/* 배지 - 심플하게 */
.badge {
    padding: 4px 10px;
    font-weight: 400;
    font-size: 12px;
    border-radius: 0;
}

.badge.bg-secondary {
    background-color: #f5f5f5 !important;
    color: #5d4037;
}

.badge.bg-success {
    background-color: #e8f5e9 !important;
    color: #2e7d32;
}

.badge.bg-danger {
    background-color: #ffebee !important;
    color: #c62828;
}

/* 양수/음수 색상 */
.text-profit,
.text-success {
    color: #d32f2f !important;
}

.text-loss,
.text-danger {
    color: #1976d2 !important;
}

/* 텍스트 색상 */
.text-muted {
    color: #a1887f !important;
}

/* 입력 필드 - 미니멀 */
.form-control {
    background-color: #ffffff;
    border: 1px solid #d7ccc8;
    border-radius: 0;
    color: #5d4037;
    font-size: 14px;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #8B6F47;
    box-shadow: none;
}

.form-select {
    border-radius: 0;
    border: 1px solid #d7ccc8;
}

.form-select:focus {
    border-color: #8B6F47;
    box-shadow: none;
}

/* 체크박스/스위치 */
.form-check-input:checked {
    background-color: #5d4037;
    border-color: #5d4037;
}

/* 삭제 링크 스타일 */
.delete-link {
    color: #d32f2f;
    text-decoration: none;
    font-size: 13px;
}

.delete-link:hover {
    text-decoration: underline;
}

/* 자동매매 on/off 텍스트 */
.auto-trade-status {
    font-size: 13px;
}

/* 로그 컨테이너 */
.log-container {
    background-color: #ffffff;
    border: 1px solid #d7ccc8;
    padding: 15px;
    height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: #ffffff;
}

.log-container::-webkit-scrollbar-thumb {
    background: #d7ccc8;
}

/* 로그 라인 */
.log-line {
    padding: 2px 0;
    margin: 0;
    word-wrap: break-word;
    white-space: pre-wrap;
    color: #5d4037;
}

.log-error {
    color: #d32f2f;
}

.log-warning {
    color: #f57c00;
}

.log-success {
    color: #388e3c;
}

/* 헤더 border 제거 */
.border-bottom {
    border-color: transparent !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #5d4037;
    font-weight: 400;
}

/* 모달 스타일 */
.modal-content {
    border-radius: 0;
    border: 1px solid #d7ccc8;
}

.modal-header {
    border-bottom: 1px solid #d7ccc8;
    background-color: #ffffff;
}

.modal-footer {
    border-top: 1px solid #d7ccc8;
    background-color: #ffffff;
}

/* 반응형 */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* 로딩 애니메이션 */
.loading {
    text-align: center;
    padding: 40px;
    color: #8d6e63;
}

/* 테이블 레이아웃 */
.table-responsive {
    overflow-x: auto;
}

/* 전략 가이드 카드 숨기기 */
.card[style*="border: 2px solid"] {
    display: none !important;
}

/* 잔고정보, 보유종목, 자동매매 섹션 간격 */
.row.mb-4 {
    margin-bottom: 5px !important;
}

/* 버튼 그룹 */
.btn-group .btn {
    border-radius: 0;
}

/* gap 스타일 */
.gap-2 {
    gap: 8px !important;
}

/* 알림 스타일 */
.alert {
    border-radius: 0;
    border: 1px solid;
}

/* 숨기고 싶은 요소들 */
.card-header .badge.bg-secondary[id*="account-badge"],
.card-header .badge.bg-secondary[id*="badge"] {
    display: none;
}

/* 헤더 영역 간소화 */
.d-flex.justify-content-between.border-bottom {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 20px !important;
}

.d-flex.justify-content-between.border-bottom h1 {
    display: none;
}

/* 네비게이션 바 수정 */
.navbar.sticky-top {
    z-index: 1030;
    box-shadow: none;
}

/* 옵션 탭 실시간 모니터링 섹션 - 80% 너비 */
#options-tab .card-body > .row {
    width: 80%;
    margin: 0 auto;
}
