/* =============================================
   Components CSS - Reusable UI Components
   ============================================= */

/* Enhanced Card Design with subtle shadows */
.card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Navbar - Flat style */
.navbar {
    border-bottom: 3px solid #2980b9;
    box-shadow: none !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.nav-link {
    transition: all var(--transition-speed);
    font-weight: 500;
    border-radius: 6px;
    margin: 0 4px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* Enhanced Buttons with gradients and shadows */
.btn {
    border-radius: 6px;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Enhanced Tables with better hover effects */
.table {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table thead:not(.table-header-fixed):not(.table-header-investment) {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table thead:not(.table-header-fixed):not(.table-header-investment) th {
    color: #2c3e50 !important;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.1) 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Badges - Flat style */
.badge {
    border-radius: 4px;
    font-weight: 600;
    padding: 0.5em 0.8em;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Asset Type Badges - Fixed width for uniform appearance */
table .badge {
    display: inline-block;
    min-width: 110px;
    text-align: center;
}

/* Asset Type Cell Colors - Full cell background with gradients */
.asset-type-cell {
    width: 140px;
    color: white;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 0.75rem !important;
}

/* Fixed Assets - Gray gradient */
.asset-type-fixed {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* Stock - Blue gradient */
.asset-type-stock {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Gold - Golden gradient */
.asset-type-gold {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* ETF - Purple gradient */
.asset-type-etf {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

/* Open Fund - Green gradient */
.asset-type-openfund {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Bond - Teal gradient */
.asset-type-bond {
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

/* Crypto - Orange-Red gradient */
.asset-type-crypto {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Real Estate - Brown gradient */
.asset-type-realestate {
    background: linear-gradient(135deg, #a04000 0%, #873600 100%);
}

/* Default/Other - Indigo gradient */
.asset-type-other {
    background: linear-gradient(135deg, #5d6d7e 0%, #34495e 100%);
}

/* Profit/Loss Cell Colors - Full cell background with gradients */
.profit-loss-cell {
    font-weight: 600;
    text-align: right;
    vertical-align: middle;
    padding: 0.75rem !important;
    color: white;
}

/* Profit - Green gradient */
.profit-gain {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Loss - Red gradient */
.profit-loss {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Table Header Colors - Gradient backgrounds for table headers */
.table-header-fixed {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
}

.table-header-fixed th {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    padding: 0.75rem !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: center !important;
    vertical-align: middle !important;
}

.table-header-investment {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

.table-header-investment th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    padding: 0.75rem !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: center !important;
    vertical-align: middle !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Alerts - Flat style */
.alert {
    border-radius: 8px;
    border: 2px solid;
    font-weight: 500;
}

/* Dropdown - Flat style */
.dropdown-menu {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: none;
    margin-top: 8px;
}

.dropdown-item {
    font-weight: 500;
    transition: all var(--transition-speed);
}

.dropdown-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Forms - Flat style */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: none !important;
    transition: border-color var(--transition-speed);
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
}
