/* Professional Data Center Trading Portal - Modern Design */

/* Typography and Base Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --sidebar-bg: #f8fafc;
    --sidebar-border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* Modern Navigation */
.navbar {
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 700;
    color: var(--dark-color) !important;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1;
    margin-top: -2px;
}



/* Clean layout without sidebar */

/* Modern Sidebar */
.sidebar-bg {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar {
    min-height: calc(100vh - 80px);
    max-width: 260px;
    min-width: 220px;
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 80px);
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 0 1rem;
}

.sidebar-link {
    color: var(--secondary-color) !important;
    padding: 0.875rem 1rem !important;
    margin: 0.125rem 0 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-decoration: none !important;
}

.sidebar-link:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
    color: var(--primary-color) !important;
    transform: translateX(2px);
}

.sidebar-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: var(--shadow);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    opacity: 1;
}

.sidebar-heading {
    font-size: 0.6875rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sidebar-section-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
}

/* Modern Process Steps */
.process-step {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-8px);
}

.process-icon {
    position: relative;
    margin: 0 auto;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
}

/* Trade process steps for internal pages */
.trade-steps {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-circle.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.step-circle.completed {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
}

.step-line.completed {
    background: var(--success-color);
}

/* Modern Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #6c757d;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.file-upload-area:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

/* Status badges */
.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

/* Dashboard charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Modern Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.hero-section::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section .lead {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Feature Cards in Hero */
.feature-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    color: white;
}

/* Modern Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-2px);
}

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

.btn-light:hover {
    background: #f8fafc;
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Navigation active states */
.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Enhanced Form Styling */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

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

/* CSV Preview Styles */
.csv-preview-container {
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    margin-top: 1rem;
}

.csv-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.csv-stats {
    display: flex;
    gap: 0.5rem;
}

.validation-summary {
    margin-top: 1rem;
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.validation-issues ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.validation-issues li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.validation-score {
    font-weight: 600;
}

.column-mapping {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.column-mapping .card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.column-mapping .card:hover {
    border-color: #0d6efd;
    transform: translateY(-1px);
}

.mapping-controls select {
    width: 100%;
    font-size: 0.875rem;
}

.data-preview {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-preview .table {
    margin-bottom: 0;
}

.data-preview .table th {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    font-size: 0.8rem;
    white-space: nowrap;
}

.data-preview .table td {
    font-size: 0.875rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.5rem;
}

.data-preview .table-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.csv-preview-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.csv-preview-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    
    .sidebar-sticky {
        height: auto;
        position: static;
    }
    
    .step-indicator {
        flex-direction: column;
    }
    
    .step-line {
        width: 2px;
        height: 2rem;
        margin: 0.5rem 0;
    }
    
    .hero-section {
        padding: 3rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .process-step {
        padding: 1.5rem 0.5rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
}

/* Identification Cards */
.identification-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.identification-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.identification-card.border-primary {
    border-color: var(--primary-color) !important;
}

/* Type-ahead Suggestions */
.suggestion-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    transition: background-color 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: var(--primary-color);
    color: white;
}

.suggestion-item:focus {
    outline: none;
    background-color: var(--primary-color);
    color: white;
}

/* Serial Number Lookup */
.input-group .btn {
    border-left: none;
}

.input-group .form-control:focus + .btn {
    border-color: var(--primary-color);
}

@media (max-width: 992px) {
    .sidebar-text {
        font-size: 0.85rem;
    }
    
    .sidebar {
        max-width: 200px;
        min-width: 180px;
    }
}

/* Mobile navigation improvements */
@media (max-width: 767px) {
    .sidebar {
        display: none !important;
    }
    
    .offcanvas-body .nav-link {
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .offcanvas-body .nav-link:hover {
        background-color: rgba(0, 123, 255, 0.1);
    }
}

/* Sidebar active states */
.sidebar .nav-link.active,
.offcanvas-body .nav-link.active {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff !important;
    font-weight: 500;
}

/* Notification Positioning - Prevent overlap with content */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
}

/* CSV Format Info - Completely non-dismissible permanent display */
.csv-format-permanent-info {
    position: relative !important;
    z-index: 999 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 1rem !important;
    border-left: 4px solid var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.05) !important;
}

.csv-format-permanent-info h6 {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

/* Ensure no JavaScript can hide this element */
.csv-format-permanent-info[style*="display: none"] {
    display: block !important;
}

.csv-format-permanent-info[style*="visibility: hidden"] {
    visibility: visible !important;
}

.csv-format-permanent-info[style*="opacity: 0"] {
    opacity: 1 !important;
}