/* Client Platform Styles */
:root {
    --primary-color: #1a3a6c;
    --secondary-color: #d4af37;
    --accent-color: #4a90e2;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --sidebar-width: 250px;
}

/* Layout Styles */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header .logo {
    display: block;
    text-align: center;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu ul li {
    margin-bottom: 5px;
}

.sidebar-menu ul li a {
    display: block;
    padding: 12px 20px;
    color: #b8c7e0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu ul li a:hover,
.sidebar-menu ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--secondary-color);
}

.sidebar-menu ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: #b8c7e0;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    background-color: var(--light-gray);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Premium Banner Styles */
.premium-banner {
    background: linear-gradient(135deg, var(--primary-color), #0a2550);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-banner-content {
    flex: 1;
}

.premium-banner h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.premium-banner p {
    margin-bottom: 15px;
}

.premium-features {
    list-style: none;
    margin-bottom: 0;
}

.premium-features li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.premium-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.btn-gold {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #c9a227;
}

/* Dashboard Stats Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card .stat-change {
    font-size: 14px;
}

.stat-card .stat-change.positive {
    color: #28a745;
}

.stat-card .stat-change.negative {
    color: #dc3545;
}

/* Watchlist Section Styles */
.watchlist-section {
    margin-bottom: 30px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.watchlist-filters {
    display: flex;
    gap: 10px;
}

.watchlist-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: var(--white);
}

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

.watchlist-table th,
.watchlist-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.watchlist-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--primary-color);
}

.watchlist-table tr:hover {
    background-color: #f9f9f9;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

/* Portfolio Section Styles */
.portfolio-section {
    margin-bottom: 30px;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.portfolio-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.premium-tag {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: 600;
}

.portfolio-filters {
    display: flex;
    gap: 10px;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.portfolio-chart {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.portfolio-chart h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.chart-placeholder {
    height: 250px;
    background-color: var(--light-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

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

.portfolio-table th,
.portfolio-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.portfolio-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

/* AI Research Tools Styles */
.ai-research-section {
    margin-bottom: 30px;
}

.ai-research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ai-research-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.ai-results {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ai-results h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.ai-prompt {
    display: flex;
    margin-bottom: 20px;
}

.ai-prompt input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.ai-prompt button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ai-prompt button:hover {
    background-color: #15305d;
}

.ai-results-content {
    background-color: var(--light-gray);
    border-radius: 4px;
    padding: 20px;
    min-height: 200px;
}

.placeholder-text {
    color: #888;
    text-align: center;
    margin-top: 70px;
}

/* Educational Resources Styles */
.resources-section {
    margin-bottom: 30px;
}

.resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.resources-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.resources-filters {
    display: flex;
    gap: 10px;
}

.resources-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: var(--white);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.resource-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.resource-content {
    padding: 20px;
}

.resource-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.resource-content p {
    margin-bottom: 15px;
    color: #666;
}

/* Communication Section Styles */
.communication-section {
    margin-bottom: 30px;
}

.communication-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.communication-header h2 {
    font-size: 20px;
    color: var(--primary-color);
}

.communication-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.communication-tabs .tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.communication-tabs .tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.communication-tabs .tab:hover {
    color: var(--primary-color);
}

.messages-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.incoming {
    justify-content: flex-start;
}

.message.outgoing {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 8px;
    position: relative;
}

.message.incoming .message-bubble {
    background-color: var(--light-gray);
}

.message.outgoing .message-bubble {
    background-color: var(--primary-color);
    color: var(--white);
}

.message-bubble p {
    margin-bottom: 5px;
}

.message-bubble small {
    font-size: 12px;
    opacity: 0.7;
}

.message-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.message-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.message-input button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.message-input button:hover {
    background-color: #15305d;
}

/* Card Styles */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Button Styles */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: visible;
    }
    
    .sidebar-header .logo {
        display: none;
    }
    
    .sidebar-menu ul li a span {
        display: none;
    }
    
    .sidebar-menu ul li a i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .user-info {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .premium-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .premium-banner-content {
        margin-bottom: 20px;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        margin-top: 15px;
    }
    
    .section-header,
    .portfolio-header,
    .ai-research-header,
    .resources-header,
    .communication-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .watchlist-filters,
    .portfolio-filters,
    .resources-filters {
        margin-top: 15px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .watchlist-table {
        display: block;
        overflow-x: auto;
    }
}
