/* Global styles for the AI portal */
:root {
    --primary-color: #284CCF;
    --accent-color-1: #5BCEDE;
    --accent-color-2: #28CFB0;
    --dark-bg: #101010;
    --darker-bg: #0A0A0A;
    --card-bg: rgba(16, 16, 16, 0.6);
    --text-color: #ffffff;
    --text-secondary: #aaaaaa;
    --gradient: linear-gradient(90.04deg, #284CCF -1.27%, #5BCEDE 36.01%, #28CFB0 66.51%);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--darker-bg);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

/* Header styles */
header {
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color-1);
}

.page-tabs {
    display: flex;
    gap: 5px;
}

.tab {
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.tab:hover {
    background-color: rgba(40, 76, 207, 0.3);
}

.tab.active {
    background: var(--gradient);
    color: white;
    font-weight: 500;
}

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

.action-btn {
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    background-color: rgba(40, 76, 207, 0.3);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Main content area */
main {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    border-top: 1px solid rgba(40, 76, 207, 0.3);
    padding: 15px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Typography */
h2 {
    font-size: 28px;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

h3 {
    font-size: 20px;
    color: var(--accent-color-1);
    margin-bottom: 15px;
}

a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color-2);
}

/* Form elements */
button, .btn {
    padding: 8px 15px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 76, 207, 0.4);
}

input, select, textarea {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--text-color);
    padding: 8px 12px;
    font-size: 14px;
    max-width: 100%; /* Ensure inputs don't overflow containers */
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 2px rgba(91, 206, 222, 0.2);
}

/* Card styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive tables - make tables scrollable horizontally on small screens */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .top-bar {
        flex-wrap: wrap;
    }
    
    .page-tabs {
        order: 3;
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }
    
    /* Adjust grid layouts */
    .metrics-grid, 
    .ai-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .chart-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .user-actions {
        margin-left: auto;
    }
    
    .top-bar {
        padding: 10px;
    }
    
    main {
        padding: 15px 10px;
    }
    
    /* Further reduce grid item sizes */
    .metrics-grid, 
    .ai-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .chart-container {
        grid-template-columns: 1fr; /* Single column for charts */
        gap: 15px;
    }
    
    /* Adjust form layouts */
    .date-filter-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .custom-date-range {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-container h1 {
        font-size: 16px;
    }
    
    .logo {
        height: 30px;
    }
    
    .page-tabs {
        gap: 2px;
        overflow-x: auto; /* Allow tabs to scroll horizontally */
        width: 100%;
        padding: 5px 0;
    }
    
    .tab {
        padding: 6px 10px;
        font-size: 14px;
        white-space: nowrap; /* Prevent tab text from wrapping */
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .metric-value {
        font-size: 24px !important; /* Override any inline sizes */
    }
    
    .chart-title {
        font-size: 16px !important;
    }
    
    /* Ensure all cards have appropriate padding on small screens */
    .card, .metric-card, .chart-card, .summary-container {
        padding: 15px 10px;
    }
    
    /* Make container padding consistent */
    .dashboard-container {
        padding: 10px 5px !important;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
} 