/* Universal Mock Auth Portal Styles */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

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

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

/* Selection Cards */
.selection-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.selection-card:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
}

.selection-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9ff 0%, #e7f3ff 100%);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.2);
}

.selection-card.selected::after {
    content: '\f26b';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--success-color);
    font-size: 1.2em;
    font-weight: bold;
}

/* Progress Bar */
.progress {
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: visible;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--success-color) 100%);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

/* Step Indicators */
.selection-step {
    min-height: 200px;
    padding: 20px 0;
}

.selection-step h5 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Application Cards */
.app-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.app-card:hover::before,
.app-card.selected::before {
    transform: translateX(0);
}

.app-card .app-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.app-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.app-card p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Persona Cards */
.persona-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    height: 100%;
    position: relative;
}

.persona-card .role-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: var(--success-color);
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.persona-card h6 {
    color: var(--success-color);
    font-weight: 600;
    margin-top: 8px;
}

.persona-card .permissions-list {
    font-size: 0.8rem;
    color: #6c757d;
}

.persona-card .use-cases {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

/* Tenant Cards */
.tenant-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
    height: 100%;
    position: relative;
}

.tenant-card .client-id-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--info-color);
    color: #000;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.tenant-card h6 {
    color: var(--info-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.tenant-card .industry-badge {
    background: var(--warning-color);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.tenant-card .data-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.tenant-card .data-quality {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 5px;
}

.quality-HIGH { background: #d1edda; color: #155724; }
.quality-MEDIUM { background: #fff3cd; color: #856404; }
.quality-DEVELOPMENT { background: #d4edda; color: #155724; }
.quality-SYSTEM { background: #cff4fc; color: #055160; }

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6610f2 100%);
}

/* JWT Display */
#jwtTokenDisplay {
    font-size: 0.8rem;
    line-height: 1.3;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

#jwtClaimsDisplay {
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
}

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

.alert-success {
    background: linear-gradient(135deg, #d1edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .selection-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .app-card,
    .persona-card,
    .tenant-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .app-card .app-icon {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--info-color) !important;
    text-decoration: none;
}
