/* RBAC Setup Page Styles - Consistent with Xforia Manufacturing */

/* Inherit base styles from main stylesheet */
:root {
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-color: #3498db;  /* Changed from green to blue */
    --text-color: #4a4a4a;
    --light-text-color: #e0e1dd;
    --bg-color: #f8f9fa;
    --secondary-bg-color: #ffffff;
    --shadow-light: 0 2px 5px rgba(0,0,0,0.08);
    --shadow-medium: 0 5px 15px rgba(0,0,0,0.1);
    --footer-bg-color: #203731;
    --footer-text-color: #ffffff;
    --success-color: #27ae60;
    --warning-color: #ff9500;
    --error-color: #dc3545;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
}

main.rbac-setup-page {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 3%;
    box-sizing: border-box;
    width: 100%;
}

/* Progress Indicator */
.progress-container {
    width: 100%;
    max-width: 1400px;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #2c974b);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 20%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.progress-step.active .step-circle {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);  /* Blue shadow */
}

.progress-step.completed .step-circle {
    background-color: var(--success-color);  /* Green for completed */
    color: white;
}

/* Removed the ::before pseudo-element that showed checkmark */

.step-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: center;
    max-width: 100px;
}

.progress-step.active .step-label {
    font-weight: 600;
    color: var(--accent-color);
}

/* Setup Container */
.setup-container {
    width: 100%;
    max-width: 1400px;
    background-color: var(--secondary-bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 3rem;
    box-sizing: border-box;
}

.setup-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.setup-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.setup-title span {
    color: black;
}

.setup-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Setup Steps */
.setup-step {
    display: none;
}

.setup-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.step-content {
    width: 100%;
}

.step-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.step-description {
    font-size: 1rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* Systems Grid (Step 1) */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.system-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.system-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-3px);
}

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

.system-header i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.system-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.system-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-bottom: 0.75rem;
}

.system-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.heavy-usage-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
}

.heavy-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

/* Config Section (Step 2 & 3) */
.config-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.config-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.config-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.config-header i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.config-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.config-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-tooltip {
    cursor: help;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);  /* Blue focus shadow */
}

.form-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-hint {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
}

/* Roles Grid (Step 4) */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.role-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.role-card.active {
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.15);  /* Blue shadow */
}

.role-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.role-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.role-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #2980b9);  /* Blue gradient */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-icon i {
    font-size: 1.5rem;
    color: white;
}

.role-info {
    flex-grow: 1;
}

.role-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.25rem 0;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #e0e0e0;
    color: #666;
}

.role-badge.active-badge {
    background-color: rgba(52, 152, 219, 0.1);  /* Blue background */
    color: var(--accent-color);
}

.role-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.role-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

input:disabled + .toggle-slider {
    cursor: not-allowed;
    opacity: 0.6;
}

.role-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-description {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
}

.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color);
}

.permission-item i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Review Section (Step 5) */
.review-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.review-section {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.review-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-title i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.review-item-label {
    font-weight: 500;
    color: var(--primary-color);
}

.review-item-value {
    color: var(--text-color);
    text-align: right;
}

.review-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: rgba(52, 152, 219, 0.1);  /* Blue background */
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.nav-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.primary-btn:hover {
    background-color: #2980b9;  /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* Footer */
footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 768px) {
    .setup-container {
        padding: 2rem 1.5rem;
    }

    .setup-title {
        font-size: 1.8rem;
    }

    .step-heading {
        font-size: 1.5rem;
    }

    .systems-grid,
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    main.rbac-setup-page {
        padding: 1rem 3%;
    }

    .setup-title {
        font-size: 1.5rem;
    }

    .setup-subtitle {
        font-size: 0.95rem;
    }

    .step-heading {
        font-size: 1.3rem;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}
