/* Minimal Auth Required Styles */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Landing Page and Authentication Styles */
.xebia-header {
    background: linear-gradient(135deg, #663399 0%, #4A1A5C 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.xebia-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #FF6B35;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.app-title-container h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.app-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #FF6B35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.user-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.landing-content {
    padding: 3rem 0;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2C2C2C;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #663399;
}

.feature-card p {
    color: #666;
    margin: 0;
}

.dashboard-redirect {
    text-align: center;
    padding: 3rem;
}

.auth-callback-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-status {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #663399;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Common styles for SCA Dashboard */
body { 
    font-family: Arial, sans-serif; 
    margin: 20px; 
}

.container { 
    margin: 0 20px; 
}

.nav { 
    margin-bottom: 20px; 
}

.nav a { 
    color: #007acc; 
    text-decoration: none; 
    margin-right: 15px; 
}

.nav a:hover { 
    text-decoration: underline; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
}

th, td { 
    border: 1px solid #ddd; 
    padding: 8px; 
    text-align: left; 
}

th { 
    background-color: #f2f2f2; 
}

th:hover { 
    background-color: #e6e6e6; 
}

tr:nth-child(even) { 
    background-color: #f9f9f9; 
}

tr:hover { 
    background-color: #f5f5f5; 
}

.count { 
    color: #666; 
    font-style: italic; 
}

input { 
    border: 1px solid #ddd; 
    border-radius: 3px; 
}

/* Index page specific styles */
.index-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    text-align: center; 
}

.nav-card { 
    display: inline-block; 
    margin: 20px; 
    padding: 30px; 
    border: 2px solid #007acc; 
    border-radius: 10px; 
    text-decoration: none; 
    color: #333;
    min-width: 200px;
}

.nav-card:hover { 
    background-color: #f0f8ff; 
}

.nav-card h3 { 
    margin: 0 0 10px 0; 
    color: #007acc; 
}

.nav-card .count { 
    font-size: 14px; 
}

/* Button styles */
.back-button { 
    display: inline-block; 
    margin-bottom: 20px; 
    padding: 10px 20px; 
    background-color: #007cba; 
    color: white; 
    text-decoration: none; 
    border-radius: 5px; 
}

.back-button:hover { 
    background-color: #005a87; 
}

.add-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

.add-button:hover { 
    background-color: #218838; 
}

/* Analytics styles */
#analytics { 
    margin-bottom: 30px; 
    display: flex; 
    gap: 30px; 
}

#analytics > div { 
    flex: 1; 
}

#analytics h3 { 
    margin: 0 0 10px 0; 
}

#analytics table { 
    max-width: 800px; 
}

/* Certification specific styles - only for certs page */
.certs-page #global-analytics-table th:nth-child(2), 
.certs-page #xpl-analytics-table th:nth-child(2) { 
    border-right: 3px solid #333; 
    color: #888; 
}

.certs-page #global-analytics-table td:nth-child(2), 
.certs-page #xpl-analytics-table td:nth-child(2) { 
    border-right: 3px solid #333; 
    color: #888; 
}

/* XPL Customers specific styles */
.xpl-body { 
    margin: 0; 
    padding: 20px; 
    background-color: #f5f5f5; 
}

.xpl-container h1 { 
    color: #333; 
}

.xpl-table { 
    background-color: white; 
    margin-top: 20px; 
}

.xpl-table th { 
    font-weight: bold; 
}

.xpl-table td { 
    padding: 12px; 
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 400px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 3px;
}

.analytics-card {
    background: white; 
    padding: 15px; 
    border-radius: 5px; 
    border: 1px solid #ddd; 
    min-width: 200px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.analytics-card h3 {
    margin: 0 0 10px 0; 
    color: #007cba;
}

.analytics-value {
    font-size: 24px; 
    font-weight: bold; 
    color: #333;
}

.analytics-small {
    font-size: 14px; 
    color: #333;
}

/* Specific table column styles */
.description { 
    max-width: 300px; 
    word-wrap: break-word; 
}

.constraints { 
    max-width: 250px; 
    word-wrap: break-word; 
}

/* XPL Vouchers status colors */
.status-passed { 
    background-color: #d4edda !important; 
}

.status-expired { 
    background-color: #f8d7da !important; 
}

.status-available { 
    background-color: #fff3cd !important; 
}

.status-expiring-soon { 
    background-color: #ff9500 !important; 
}

/* User header styling */
.user-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.user-info-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

#user-info {
    font-size: 14px;
    color: #495057;
}

#logout-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#logout-button:hover {
    background-color: #c82333;
}

/* Admin Panel Styles */
.admin-view {
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.back-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.back-btn:hover {
    background-color: #5a6268;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background-color: #dc3545;
    color: white;
}

.role-user {
    background-color: #6c757d;
    color: white;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-active {
    background-color: #28a745;
    color: white;
}

.status-inactive {
    background-color: #dc3545;
    color: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8em;
}

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

.section-header h2 {
    margin: 0;
}

/* RBAC and Navigation Enhancements */
.nav-card {
    position: relative;
    transition: all 0.3s ease;
}

.nav-card .description {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.nav-card[data-permission="admin"] {
    border-left: 4px solid #dc3545;
}

.nav-card[data-permission="xpl"] {
    border-left: 4px solid #007bff;
}

.nav-card[data-permission="global"] {
    border-left: 4px solid #28a745;
}

.nav-card[data-permission="public"] {
    border-left: 4px solid #6c757d;
}

.no-access-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 20px 0;
}

.no-access-message h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.no-access-message p {
    color: #6c757d;
    margin: 0;
}

.user-groups-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 8px;
}

.permission-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
}

.nav-card[data-permission="admin"] .permission-indicator {
    background-color: #dc3545;
}

.nav-card[data-permission="xpl"] .permission-indicator {
    background-color: #007bff;
}

.nav-card[data-permission="global"] .permission-indicator {
    background-color: #28a745;
}
/* Tabs Styles */
.tabs-container {
    margin-top: 2rem;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.tab:hover {
    background-color: #f5f5f5;
    color: #333;
}

.tab.active {
    color: #663399;
    border-bottom-color: #663399;
    background-color: #f8f4ff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.table-container {
    overflow-x: auto;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-scannedclean {
    background-color: #d4edda;
    color: #155724;
}

.status-active {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-unknown {
    background-color: #f8d7da;
    color: #721c24;
}
/* Download button styles */
.download-btn {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #0056b3;
}

.download-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.download-unavailable {
    color: #6c757d;
    font-style: italic;
}
