/* Firms (투자증권) Page Styles */

/* 가입 요청 카드 호버 효과 */
#joinRequestsContainer .card {
    transition: all 0.2s ease;
}

#joinRequestsContainer .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 가입 요청 배지 애니메이션 */
.join-request-badge {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    color: #dc3545;
    font-size: 1.2rem;
    animation: float-bounce 2s ease-in-out infinite;
}

@keyframes float-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Trading Sidebar */
.trading-sidebar {
    margin-top: 0;
}

.trading-sidebar .card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trading-sidebar .alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Hero Section - Override style.css to match add_friend.html height */
.hero-section.start {
    min-height: auto !important;
}

/* Hero Section (inherited from style.css) */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    overflow: hidden;
}

.cc-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.cc-svg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.headline-big {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.small_words h4 {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1rem;
}

/* Firm Tabs */
.firm-tabs-container {
    margin: 2rem 0 3rem 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    position: relative;
}

.firm-tabs {
    display: flex;
    gap: 0;
    border: none;
    margin: 0;
    padding: 0;
}

.firm-tabs .nav-item {
    margin-right: 3.5rem;
    position: relative;
}

.firm-tabs .nav-link {
    color: #6b7280 !important;
    font-weight: 500;
    font-size: 1rem;
    padding: 1.25rem 0;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.firm-tabs .nav-link:hover {
    color: #374151 !important;
    border-bottom-color: transparent !important;
}

.firm-tabs .nav-link.active,
.firm-tabs .nav-link.active:hover,
.firm-tabs .nav-link.show,
.firm-tabs .nav-link[aria-selected="true"] {
    color: #1e40af !important;
    border-bottom-color: transparent !important;
    background: transparent !important;
    font-weight: 600;
}

/* Section Title */
/* Firm List Page Styles */
.firm-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

/* Firm Card (List Page) */
.firm-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.firm-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.firm-card-pending {
    cursor: default;
    opacity: 0.85;
    border-color: #fbbf24;
}

.firm-card-pending:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.firm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.firm-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.firm-card-body {
    margin-bottom: 1rem;
}

.firm-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.firm-stat:last-child {
    border-bottom: none;
}

.firm-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.firm-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.firm-card-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

/* Firm List Item */
.firm-list-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.firm-list-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.firm-list-info {
    flex: 1;
}

.firm-list-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.firm-list-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Firm Table Styles */
.firm-table-row {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.firm-table-row:hover {
    background-color: #f8f9fa;
}

.firm-table-row td {
    vertical-align: middle;
    padding: 0.75rem;
}

.firm-table-row td strong {
    font-weight: 600;
}

.firm-table-row-clickable {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.firm-table-row-clickable:hover {
    background-color: #f0f0f0 !important;
}

.firm-table-row-clickable td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Vote Card */
.vote-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

.vote-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.vote-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: column;
    align-items: flex-end;
}

.vote-time-remaining-container {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.vote-time-remaining {
    font-weight: 600;
    color: #6b7280;
}

.vote-time-remaining.text-warning {
    color: #f59e0b;
}

.vote-time-remaining.text-danger {
    color: #ef4444;
    font-weight: 700;
}

.vote-proposer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vote-proposer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.vote-proposer-name {
    font-weight: 600;
    color: #111827;
}

.vote-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.vote-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.vote-status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.vote-status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Vote Table Styles */
.vote-table {
    font-size: 0.9rem;
    table-layout: fixed; /* 테이블 레이아웃 고정 */
    width: 100%;
}

.vote-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* 특정 컬럼 너비 조정 */
.vote-table th:nth-child(1),
.vote-table td:nth-child(1) {
    width: 12%; /* 제안자 */
}

.vote-table th:nth-child(2),
.vote-table td:nth-child(2) {
    width: 8%; /* 종목 */
}

.vote-table th:nth-child(3),
.vote-table td:nth-child(3) {
    width: 8%; /* 거래 */
}

.vote-table th:nth-child(4),
.vote-table td:nth-child(4) {
    width: 8%; /* 수량 */
}

.vote-table th:nth-child(5),
.vote-table td:nth-child(5) {
    width: 20%; /* 투자 근거 */
}

.vote-table th:nth-child(6),
.vote-table td:nth-child(6) {
    width: 18%; /* 투표 현황 */
}

.vote-table th:nth-child(7),
.vote-table td:nth-child(7) {
    width: 10%; /* 상태 */
}

.vote-table th:nth-child(8),
.vote-table td:nth-child(8) {
    width: 16%; /* 작업/완료일 */
}

.vote-action-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.vote-action-badge.buy {
    background: #d1fae5;
    color: #065f46;
}

.vote-action-badge.sell {
    background: #fee2e2;
    color: #991b1b;
}

.vote-reasoning-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

/* 투표 현황 텍스트도 한 줄로 */
.vote-table tbody td small {
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 날짜 텍스트도 한 줄로 */
.vote-table tbody td .text-muted {
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 제안자 정보 컬럼 (아바타 + 이름) */
.vote-table tbody td .d-flex {
    white-space: nowrap;
    overflow: hidden;
}

.vote-table tbody td .d-flex > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 버튼 컬럼은 줄바꿈 허용 */
.vote-table tbody td .btn,
.vote-table tbody td button {
    white-space: nowrap;
}

/* 모든 텍스트 요소가 한 줄로 표시되도록 */
.vote-table tbody td * {
    white-space: nowrap;
}

/* 하지만 버튼 내부의 아이콘과 텍스트는 정상적으로 표시 */
.vote-table tbody td .btn *,
.vote-table tbody td button * {
    white-space: normal;
}

/* 클릭 가능한 테이블 행 스타일 */
.vote-table-row-clickable {
    transition: background-color 0.2s ease;
}

.vote-table-row-clickable:hover {
    background-color: #f0f0f0 !important;
}

/* 투표 상세 모달 스타일 */
.vote-detail-content {
    font-size: 0.8rem;
}

.vote-detail-content .detail-section {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.vote-detail-content .detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.vote-detail-content .detail-label-compact {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.75rem;
}

.vote-detail-content .detail-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.vote-detail-content .detail-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.vote-detail-content .detail-value-compact {
    color: #212529;
    text-align: right;
    font-weight: 500;
    font-size: 0.8rem;
}

.vote-detail-content .detail-reasoning-compact {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border-left: 2px solid #667eea;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 120px;
    overflow-y: auto;
}

.vote-stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.vote-stat-item-compact {
    text-align: center;
    padding: 0.4rem;
    border-radius: 0.25rem;
}

.vote-stat-yes {
    background-color: #d1fae5;
}

.vote-stat-no {
    background-color: #fee2e2;
}

.vote-stat-required {
    background-color: #dbeafe;
}

.vote-stat-value-compact {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.vote-stat-yes .vote-stat-value-compact {
    color: #065f46;
}

.vote-stat-no .vote-stat-value-compact {
    color: #991b1b;
}

.vote-stat-required .vote-stat-value-compact {
    color: #1e40af;
}

.vote-stat-label-compact {
    font-size: 0.65rem;
    color: #6c757d;
    font-weight: 500;
}

.progress-compact {
    height: 16px;
    border-radius: 0.25rem;
}

.vote-detail-content .progress-bar {
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모달 본문 패딩 축소 */
#voteDetailModalBody {
    padding: 1rem;
}

/* 승인된 거래 카드 스타일 */
.approved-trade-card {
    padding: 0.5rem;
}

.approved-trade-info {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.approved-trade-card .alert-sm {
    padding: 0.5rem;
    font-size: 0.75rem;
}

.vote-status-badge.executed {
    background: #dbeafe;
    color: #1e40af;
}

.vote-status-badge.expired {
    background: #f3f4f6;
    color: #6b7280;
}

/* Completed Votes Section */
#completedVotesContainer {
    min-height: 100px;
}

#completedVotesPagination {
    margin-top: 1rem;
}

#completedVotesPagination .btn {
    min-width: 150px;
}

/* Vote Filter Section */
#voteSearchInput,
#voteSortBy,
#voteSortOrder {
    font-size: 0.9rem;
}

#voteSearchInput:focus,
#voteSortBy:focus,
#voteSortOrder:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.vote-info {
    margin-bottom: 1rem;
}

.vote-ticker {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.vote-action {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.vote-action.buy {
    background: #d1fae5;
    color: #065f46;
}

.vote-action.sell {
    background: #fee2e2;
    color: #991b1b;
}

.vote-reasoning {
    background: #f9fafb;
    border-left: 3px solid #1e40af;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #374151;
}

.vote-progress {
    margin: 1rem 0;
}

.vote-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.vote-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

.vote-progress-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.vote-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Member Card */
.member-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
}

.member-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.5rem;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.member-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.member-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.member-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.member-role-badge.ceo {
    background: #dbeafe;
    color: #1e40af;
}

.member-role-badge.coo {
    background: #d1fae5;
    color: #065f46;
}

.member-role-badge.member {
    background: #f3f4f6;
    color: #374151;
}

.member-role-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* Portfolio Item */
.portfolio-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portfolio-ticker {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.portfolio-quantity {
    color: #6b7280;
    font-size: 0.875rem;
}

.portfolio-value {
    text-align: right;
}

.portfolio-profit {
    font-weight: 600;
}

.portfolio-profit.positive {
    color: #10b981;
}

.portfolio-profit.negative {
    color: #ef4444;
}

/* Trade Log Item */
.trade-log-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
}

.trade-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.trade-log-trader {
    font-weight: 600;
    color: #111827;
}

.trade-log-ticker {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.trade-log-reasoning {
    background: #f9fafb;
    border-left: 3px solid #1e40af;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
}

/* Create Firm Modal Styles - 깔끔한 금융 디자인 */
.create-firm-modal-dialog {
    max-width: 480px;
}

.create-firm-modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.create-firm-modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 2rem 1.5rem;
    position: relative;
}

.create-firm-header-content {
    flex: 1;
}

.create-firm-modal-header .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.create-firm-header-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.create-firm-modal-header .btn-close-custom {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    opacity: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
}

.create-firm-modal-header .btn-close-custom:hover {
    background: #e5e7eb;
}

.create-firm-modal-header .btn-close-custom::before {
    content: '×';
    font-size: 1.5rem;
    color: #374151;
    line-height: 1;
}

.create-firm-modal-body {
    padding: 2rem;
    background: #ffffff;
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.625rem;
    display: block;
    letter-spacing: 0.01em;
}

.form-input-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #111827;
}

.form-input-modern:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.form-input-modern::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.cost-info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cost-info-content {
    flex: 1;
}

.cost-info-label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.cost-info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.create-firm-modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #ffffff;
}

.btn-create-firm {
    background: #111827;
    border: none;
    border-radius: 10px;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-create-firm:hover {
    background: #1f2937;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}

.btn-create-firm:active {
    transform: translateY(0);
}

.btn-cancel-firm {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-cancel-firm:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .firm-tabs .nav-item {
        margin-right: 1rem;
    }
    
    .headline-big {
        font-size: 2.5rem;
    }
    
    .create-firm-modal-dialog {
        margin: 1rem;
    }
    
    .create-firm-modal-header {
        padding: 1.5rem 1.5rem 1.25rem;
    }
    
    .create-firm-modal-body {
        padding: 1.5rem;
    }
    
    .create-firm-modal-footer {
        flex-direction: column-reverse;
        padding: 1.25rem 1.5rem;
    }
    
    .create-firm-modal-footer .btn-create-firm,
    .create-firm-modal-footer .btn-cancel-firm {
        width: 100%;
    }
}

/* Firm Detail Modal Styles */
.firm-detail-content {
    padding: 0.5rem 0;
}

/* 주요 통계 카드 */
.firm-stat-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.firm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 58, 138, 0.2);
}

.firm-stat-card-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.firm-stat-card-success {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.firm-stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.firm-stat-info {
    flex: 1;
}

/* 모달 내부의 통계 카드 스타일 (더 구체적으로 지정) */
.firm-detail-content .firm-stat-card .firm-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: white;
}

.firm-detail-content .firm-stat-card .firm-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

/* 섹션 제목 */
.firm-detail-section {
    margin-bottom: 1.5rem;
}

.firm-detail-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.firm-detail-section-title i {
    color: #1e3a8a;
}

/* 리더십 정보 카드 */
.firm-info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.firm-info-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.firm-info-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.firm-info-icon-ceo {
    background: #1e3a8a;
    color: white;
}

.firm-info-icon-coo {
    background: #1e40af;
    color: white;
}

.firm-info-content {
    flex: 1;
}

.firm-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.firm-info-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* 운영 통계 카드 */
.firm-metric-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.firm-metric-card:hover {
    border-color: #1e3a8a;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.firm-metric-icon {
    width: 40px;
    height: 40px;
    background: #1e3a8a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: white;
    margin: 0 auto 0.75rem;
}

.firm-metric-content {
    text-align: center;
}

.firm-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.firm-metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 모달 헤더 개선 */
#firmDetailModal .modal-header {
    background: #1e3a8a;
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

#firmDetailModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

#firmDetailModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

#firmDetailModal .btn-close:hover {
    opacity: 1;
}

/* 모달 본문 */
#firmDetailModal .modal-body {
    padding: 1.5rem;
    background: #fafafa;
}

/* 모달 푸터 */
#firmDetailModal .modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    background: white;
}

#firmDetailModal .modal-footer .btn-primary {
    background: #1e3a8a;
    border: none;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
}

#firmDetailModal .modal-footer .btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.3);
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    .firm-detail-modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    #firmDetailModal .modal-content {
        max-height: calc(100vh - 0.5rem);
        display: flex;
        flex-direction: column;
    }
    
    #firmDetailModal .modal-header {
        padding: 0.75rem;
        flex-shrink: 0;
    }
    
    #firmDetailModal .modal-title {
        font-size: 0.9375rem;
    }
    
    #firmDetailModal .modal-body {
        padding: 0.75rem;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }
    
    .firm-detail-content {
        padding: 0.125rem 0;
    }
    
    /* 주요 통계 카드 모바일 */
    .firm-stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 8px;
    }
    
    .firm-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .firm-detail-content .firm-stat-card .firm-stat-label {
        font-size: 0.6875rem;
        margin-bottom: 0.125rem;
    }
    
    .firm-detail-content .firm-stat-card .firm-stat-value {
        font-size: 1rem;
    }
    
    /* 섹션 제목 모바일 */
    .firm-detail-section {
        margin-bottom: 0.75rem;
    }
    
    .firm-detail-section-title {
        font-size: 0.6875rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }
    
    /* 리더십 정보 카드 모바일 */
    .firm-info-card {
        padding: 0.625rem;
        gap: 0.5rem;
        border-radius: 8px;
    }
    
    .firm-info-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9375rem;
        border-radius: 6px;
    }
    
    .firm-info-label {
        font-size: 0.625rem;
        margin-bottom: 0.125rem;
    }
    
    .firm-info-value {
        font-size: 0.875rem;
    }
    
    /* 운영 통계 카드 모바일 */
    .firm-metric-card {
        padding: 0.625rem;
        border-radius: 8px;
    }
    
    .firm-metric-icon {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
        border-radius: 6px;
    }
    
    .firm-metric-value {
        font-size: 1rem;
        margin-bottom: 0.125rem;
    }
    
    .firm-metric-label {
        font-size: 0.625rem;
    }
    
    /* 모달 푸터 모바일 - 항상 보이도록 */
    #firmDetailModal .modal-footer {
        padding: 0.625rem 0.75rem;
        flex-direction: column;
        gap: 0.375rem;
        flex-shrink: 0;
        border-top: 1px solid #e5e7eb;
        background: white;
    }
    
    #firmDetailModal .modal-footer .btn {
        width: 100%;
        margin: 0;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* 그리드 간격 조정 */
    .firm-detail-content .row.g-3 {
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
    }
    
    .firm-detail-content .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    /* 운영 통계 그리드 모바일에서 2열로 */
    .firm-detail-content .row.g-3 .col-md-4 {
        flex: 0 0 auto;
        width: 50%;
    }
    
    .firm-detail-content .row.g-3 .col-md-4:last-child {
        width: 100%;
    }
}

/* Join Firm Modal Styles */
.join-firm-modal-content {
    padding: 0.5rem 0;
}

.join-firm-modal-content .alert {
    border-left: 4px solid #0d6efd;
}

/* Deposit Container Styles */
#depositContainer {
    padding: 0.5rem 0;
}

#depositContainer .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#depositContainer .input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

#depositContainer small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
}

#depositContainer .btn-primary {
    margin-top: 1rem;
}

#depositContainer .mt-3 {
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

/* Member Activity Modal Styles */
.member-activity-content {
    padding: 0.5rem 0;
}

.activity-stat-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.activity-stat-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.activity-stat-icon {
    font-size: 2rem;
    margin-right: 1rem;
    width: 50px;
    text-align: center;
}

.activity-stat-info {
    flex: 1;
}

.activity-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.activity-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Trade Table Styles */
.trade-table-row-clickable {
    transition: background-color 0.2s ease;
}

.trade-table-row-clickable:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.trade-table-row-clickable td {
    vertical-align: middle;
    padding: 0.75rem;
}

.trade-table-row-clickable .vote-reasoning-text {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-card {
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.member-card:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.member-stats {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
    align-items: center;
}

.member-contribution,
.member-roi {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.member-contribution strong,
.member-roi strong {
    font-size: 1rem;
    font-weight: 600;
}

.member-contribution .text-muted,
.member-roi .text-muted {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Member Profile Modal Styles - Compact & Financial */
.member-profile-modal {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.member-profile-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.member-profile-modal-header .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.member-profile-modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.member-profile-modal-body {
    padding: 1.5rem;
    background: #f8fafc;
}

.member-profile-modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    background: white;
}

.member-profile-content-compact {
    padding: 0;
}

.member-profile-header-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.member-profile-avatar-compact {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    overflow: hidden;
    position: relative;
}

.member-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.member-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 8px;
}

.member-profile-name-compact h5 {
    margin: 0;
    color: #111827;
    font-weight: 600;
    font-size: 1.1rem;
}

.performance-card-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.performance-card-compact:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.performance-card-compact.text-success {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.performance-card-compact.text-danger {
    border-left: 3px solid #ef4444;
    background: #fef2f2;
}

.performance-icon-compact {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #475569;
    flex-shrink: 0;
}

.performance-card-compact.text-success .performance-icon-compact {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.performance-card-compact.text-danger .performance-icon-compact {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.performance-info-compact {
    flex: 1;
    min-width: 0;
}

.performance-label-compact {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-value-compact {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-card-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.stat-card-compact:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.stat-icon-compact {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #475569;
    flex-shrink: 0;
}

.stat-icon-compact.text-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon-compact.text-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-info-compact {
    flex: 1;
    min-width: 0;
}

.stat-label-compact {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.stat-value-compact {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.activity-stat-compact {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.activity-stat-compact:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.activity-label-compact {
    color: #64748b;
    margin-right: 0.5rem;
    font-weight: 500;
}

.activity-stat-compact strong {
    color: #0f172a;
    font-weight: 600;
}

.member-performance-compact,
.member-stats-compact,
.member-activity-compact {
    margin-bottom: 1rem;
}

/* Deposit Confirmation Modal Styles */
.deposit-confirm-content {
    padding: 0.5rem 0;
}

.deposit-confirm-content .alert {
    border-left: 4px solid #0d6efd;
}

/* Others Section Styles */
.others-section {
    padding: 1rem 0;
}

.others-section .card {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.others-section .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.others-section .card-body {
    padding: 1.5rem;
}

.others-section h6 {
    color: #212529;
    font-weight: 600;
}

.others-section .text-muted {
    font-size: 0.875rem;
}

/* Leave Firm Modal Styles */
.leave-firm-content {
    padding: 0.5rem 0;
}

.leave-firm-content .alert {
    border-left: 4px solid #ffc107;
}

/* Guide Section Styles */
.guide-section {
    max-width: 1000px;
    margin: 0 auto;
}

.guide-step {
    position: relative;
    padding-left: 50px;
    min-height: 80px;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.guide-step h6 {
    margin-bottom: 0.5rem;
    color: #333;
}

.role-card {
    text-align: center;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
}

.role-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.role-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.role-card h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.role-card ul {
    text-align: left;
    list-style: none;
    padding-left: 0;
}

.role-card ul li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.role-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

#guideAccordion .accordion-button {
    font-weight: 500;
    padding: 1rem 1.25rem;
}

#guideAccordion .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #667eea;
}

#guideAccordion .accordion-body {
    padding: 1.5rem;
}

#guideAccordion .accordion-body h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

#guideAccordion .alert {
    border-left: 4px solid;
}

#guideAccordion .alert-info {
    border-left-color: #17a2b8;
}

#guideAccordion .alert-warning {
    border-left-color: #ffc107;
}

