/* Ternary Fund Management - Common Styles */

:root {
    --ternary-navy: rgb(30, 41, 59);
    --ternary-gray: rgb(92, 107, 122);
    --ternary-light-gray: rgb(139, 152, 167);
    --ternary-bg: rgb(248, 250, 252);
    --ternary-border: rgb(226, 232, 240);
    --ternary-accent: rgb(71, 85, 105);
}

/* Typography */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Sidebar Menu Styles */
#sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: rgb(71, 85, 105);
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    font-weight: 400;
}

#sidebar-menu a:hover {
    background-color: rgb(248, 250, 252);
    color: rgb(15, 23, 42);
}

#sidebar-menu a.active {
    background-color: rgb(241, 245, 249);
    color: rgb(15, 23, 42);
    border-left: 2px solid rgb(51, 65, 85);
    font-weight: 500;
}

/* Dark mode sidebar */
.dark #sidebar-menu a {
    color: rgb(148, 163, 184);
}

.dark #sidebar-menu a:hover {
    background-color: rgb(30, 41, 59);
    color: rgb(241, 245, 249);
}

.dark #sidebar-menu a.active {
    background-color: rgb(51, 65, 85);
    color: rgb(241, 245, 249);
    border-left-color: rgb(148, 163, 184);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(203, 213, 225);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(148, 163, 184);
}

/* Card Hover Effect */
.metric-card, .card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover, .card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Table Row Hover */
.table-row:hover,
tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.5);
}

.dark tbody tr:hover {
    background-color: rgba(51, 65, 85, 0.3);
}

/* Buttons */
.btn-primary {
    background-color: rgb(51, 65, 85);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: rgb(30, 41, 59);
}

.btn-secondary {
    background-color: rgb(248, 250, 252);
    color: rgb(71, 85, 105);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgb(241, 245, 249);
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    border: 1px solid rgb(226, 232, 240);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgb(100, 116, 139);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

/* Dark mode inputs */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark select,
.dark textarea {
    background-color: rgb(30, 41, 59);
    border-color: rgb(51, 65, 85);
    color: white;
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: rgb(148, 163, 184);
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

/* Badge / Tag */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-gray {
    background-color: rgb(241, 245, 249);
    color: rgb(51, 65, 85);
}

.dark .badge-gray {
    background-color: rgb(51, 65, 85);
    color: rgb(203, 213, 225);
}

/* Section Headers */
.section-header {
    background: linear-gradient(to right, rgb(248, 250, 252), rgb(241, 245, 249));
    border-bottom: 1px solid rgb(226, 232, 240);
    padding: 1rem 1.5rem;
}

.dark .section-header {
    background: linear-gradient(to right, rgb(30, 41, 59), rgb(51, 65, 85));
    border-bottom-color: rgb(71, 85, 105);
}

.section-title {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgb(30, 41, 59);
    display: flex;
    align-items: center;
}

.dark .section-title {
    color: white;
}

.section-title i {
    margin-right: 0.75rem;
    color: rgb(100, 116, 139);
}

.dark .section-title i {
    color: rgb(148, 163, 184);
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Loading State */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Utility Classes */
.text-ternary {
    color: var(--ternary-navy);
}

.bg-ternary {
    background-color: var(--ternary-bg);
}

.border-ternary {
    border-color: var(--ternary-border);
}
