/* Investment Platform Styles */

:root {
    --primary-color: #0e2c27;
    --secondary-color: #E4F9F1;
    --primary-hover: #1a3d38;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f8fafc;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 0 1rem 0.0625rem rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 96px;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    max-height: 40px;
    width: auto;
}

.logo svg,
.logo-svg svg {
    height: 40px;
    width: 160px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--secondary-color);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu-toggle:hover {
    background: var(--secondary-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.user-menu:hover .user-menu-dropdown,
.user-menu.active .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown a,
.user-menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
    background: var(--secondary-color);
}

.user-menu-dropdown .divider {
    border-top: 1px solid #e5e7eb;
    margin: 0.5rem 0;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 96px);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.green {
    background: #dcfce7;
    color: #22c55e;
}

.stat-card .stat-icon.blue {
    background: #dbeafe;
    color: #3b82f6;
}

.stat-card .stat-icon.purple {
    background: #f3e8ff;
    color: #a855f7;
}

.stat-card .stat-icon.orange {
    background: #ffedd5;
    color: #f97316;
}

.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

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

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Add border-radius class for tables that need rounded headers */
table.table-rounded th:first-child {
    border-radius: 0.5rem 0 0 0 !important;
}

table.table-rounded th:last-child {
    border-radius: 0 0.5rem 0 0 !important;
}

tr:hover {
    background: #f9fafb;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: #c9f2e2;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 44, 39, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
}

.tooltip-trigger {
    cursor: help;
    color: #9ca3af;
}

.tooltip-content {
    position: absolute;
    z-index: 100;
    width: 200px;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-size: 0.75rem;
    color: #6b7280;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
}

.tooltip-wrapper:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Info Box */
.info-box {
    background: var(--secondary-color);
    border: 1px solid rgba(14, 44, 39, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-box-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

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

.info-box-title {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.info-box-text {
    font-size: 0.75rem;
    color: rgba(14, 44, 39, 0.8);
}

/* Transaction Types */
.amount-credit {
    color: #22c55e;
    font-weight: 600;
}

.amount-debit {
    color: #ef4444;
    font-weight: 600;
}

/* Profile Section */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.profile-info h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: #6b7280;
}

/* Investment Product Card */
.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
}

.product-card-header h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.product-card-header .account-number {
    font-size: 0.75rem;
    opacity: 0.8;
}

.product-card-body {
    padding: 1.25rem;
}

.product-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.product-detail:last-child {
    border-bottom: none;
}

.product-detail-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.product-detail-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Investment Table */
.investment-table tbody tr {
    transition: background 0.2s, transform 0.1s;
}

.investment-table tbody tr:hover {
    background: var(--secondary-color);
}

.investment-table tbody tr:active {
    background: #c9f2e2;
}

.investment-row {
    cursor: pointer;
}

/* Account Details Header */
.account-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d38 100%);
    color: white;
    padding: 1.5rem 1.5rem 1.25rem 1.5rem;
}

.account-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.account-header-subtitle {
    opacity: 0.8;
    font-size: 0.875rem;
    font-family: monospace;
}

.account-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.account-header .badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.account-summary {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.account-summary-item {
    text-align: center;
}

.account-summary-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.account-summary-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .account-summary {
        gap: 2rem;
    }
}

/* Tooltip */
.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    cursor: help;
    color: #1f2937;
}

.tooltip-icon svg {
    width: 18px;
    height: 18px;
}

.tooltip-icon:hover {
    color: #000;
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 1rem 0;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

