/* MetricAnalytics Color Scheme - Purple to Red Gradient */
:root {
    --primary-purple: #7B2CBF;
    --primary-red: #E53E3E;
    --light-purple: #9D4EDD;
    --light-red: #FC8181;
    --dark-purple: #5A189A;
    --dark-red: #C53030;
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-red) 100%);
    --gradient-light: linear-gradient(135deg, var(--light-purple) 0%, var(--light-red) 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark-purple) 0%, var(--dark-red) 100%);
}

/* Application Container */
.app-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Primary Button Styling */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn-primary:hover {
    background: var(--gradient-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 44, 191, 0.3);
}

.btn-primary:focus {
    background: var(--gradient-primary);
    box-shadow: 0 0 0 0.2rem rgba(123, 44, 191, 0.25);
}

/* Text Primary Color */
.text-primary {
    color: var(--primary-purple) !important;
}

/* Authentication Pages */
.auth-container {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-header {
    background: var(--gradient-light);
    color: white;
    text-align: center;
    padding: 2rem 2rem 1.5rem;
}

.auth-logo {
    height: 80px;
    width: auto;
}

.auth-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-body {
    padding: 1.5rem 2.5rem 2rem;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 0.2rem rgba(123, 44, 191, 0.15);
}

.form-label {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Navbar Styling */
.navbar {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-purple) !important;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    color: var(--primary-red) !important;
}

.navbar-logo {
    height: 32px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: #6c757d !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-purple) !important;
}

/* Cards */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: var(--gradient-light);
    color: white;
    border-bottom: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

/* Code Blocks */
pre {
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(229, 62, 62, 0.1) 100%);
    color: var(--primary-purple);
    border-left: 4px solid var(--primary-purple);
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.bg-success {
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #d69e2e 0%, #ecc94b 100%) !important;
}

/* Footer */
footer {
    background: var(--gradient-primary) !important;
    color: white !important;
    margin-top: auto;
}

footer h5, footer h6 {
    color: white !important;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.3s ease;
}

footer a.text-muted:hover {
    color: white !important;
}

/* Input Groups */
.input-group .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
}

.input-group .btn-outline-secondary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-purple);
    color: white;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background: var(--gradient-light);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    /* Stack form fields vertically on mobile */
    .auth-body .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (min-width: 992px) {
    .auth-card {
        max-width: none;
    }
    
    .auth-body {
        padding: 1.5rem 3rem 2.5rem;
    }
}

/* Logo Styling */
.index-logo {
    height: 60px;
    width: auto;
}

/* Custom Utilities */
.fw-semibold {
    font-weight: 600;
}

.opacity-90 {
    opacity: 0.9;
}

/* Form Validation */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #28a745;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dark mode support for code blocks */
.bg-dark {
    background: #2d3748 !important;
}

.text-light {
    color: #f7fafc !important;
}