/* Fortytwo.io Brand Styling */

:root {
    --primary-color: #005D45;
    --primary-hover: #004935;
    --secondary-color: #F5F7FA;
    --accent-color: #007B5F;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --info-color: #3B82F6;
    --background: #FFFFFF;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--secondary-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.user-info {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Credential Types Grid */
.credential-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.credential-card {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.credential-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 93, 69, 0.15);
    transform: translateY(-2px);
}

.credential-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 93, 69, 0.05);
}

.credential-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.credential-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.credential-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.credential-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Form Card */
.form-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 93, 69, 0.1);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 93, 69, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
}

/* QR Card */
.qr-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

#qrCanvas {
    max-width: 350px;
    width: 100%;
    height: auto;
}

.url-display {
    color: var(--text-secondary);
    font-size: 0.875rem;
    word-break: break-all;
    margin: 1rem 0;
}

/* Info Box */
.info-box {
    background: rgba(0, 93, 69, 0.05);
    border: 1px solid rgba(0, 93, 69, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    margin: 2rem 0;
}

.info-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.75rem;
}

.info-box ol {
    margin-left: 1.25rem;
    color: var(--text-secondary);
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Success Card */
.success-card {
    background: var(--background);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    text-align: center;
}

.success-icon {
    margin-bottom: 1rem;
}

.success-badge {
    height: 100px;
    width: 100px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.success-card h2 {
    color: var(--success-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.success-message {
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

.success-message p {
    margin: 0.75rem 0;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive Design */

/* Tab Navigation */
.credential-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* Credential Sections */
.credential-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.credential-section-compact {
    padding: 1.5rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.multi-tenant-label {
    color: #10B981;
}

.single-tenant-label {
    color: #F59E0B;
}

.no-auth-label {
    color: #3B82F6;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--primary-color);
}

.subsection-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.presentation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.presentation-card {
    padding: 1.5rem;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.presentation-card:hover {
    border-color: var(--primary-color);
    background: rgba(0, 93, 69, 0.05);
    transform: translateY(-2px);
}

.presentation-card h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.presentation-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.token-display {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .credential-types-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}