/* ==========================================================================
   Portal Specific CSS (Extends styles.css)
   ========================================================================== */

.portal-body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-bg {
    position: fixed;
    z-index: -1;
}

.portal-wrapper {
    margin-top: 100px;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.portal-view {
    display: none;
    width: 100%;
    max-width: 900px;
}

.portal-view.active {
    display: block;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.alert-text {
    color: #fbe05d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }

/* Multi-Step Form */
.form-container {
    padding: 3rem;
}

.progress-container {
    position: relative;
    margin-bottom: 3rem;
}

.progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    background: #fbe05d;
    width: 0%; /* Will be set by JS */
    z-index: 1;
    transition: width 0.4s ease;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255,255,255,0.1);
    width: 100%;
    z-index: 0;
}

.step-indicators {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
}

.step {
    width: 30px;
    height: 30px;
    background: var(--bg-dark);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.4s ease;
}

.step.active {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.step.completed {
    background: var(--primary-accent);
    color: #ffffff;
    border-color: var(--primary-accent);
}

.form-step {
    display: none;
    animation: slideIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .grid-2 { grid-template-columns: 1fr; }
    .form-container { padding: 1.5rem; }
    .portal-wrapper { padding: 1rem; margin-top: 80px; }
    .form-controls { flex-direction: column; gap: 1rem; }
    .form-controls button { width: 100%; }
    #app-details-modal .glass-container { padding: 1.2rem !important; }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .dashboard-header button {
        width: 100%;
        padding: 0.8rem 1rem;
    }
}

.full-width { grid-column: 1 / -1; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 3rem; }
.text-secondary { color: var(--text-secondary); }
.small { font-size: 0.8rem; }

.portal-select {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    padding: 1rem;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    width: 100%;
}

.portal-select option {
    background: var(--bg-dark);
    color: #ffffff;
}

/* Drag Drop */
.drag-drop-zone {
    border: 2px dashed rgba(255,255,255,0.2);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.drag-drop-zone:hover {
    border-color: var(--primary-accent);
    background: rgba(37, 99, 235, 0.05);
}

/* Review Box */
.review-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.review-row {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.5rem 0;
}
.review-row span:first-child { width: 40%; color: var(--text-secondary); }
.review-row span:last-child { width: 60%; font-weight: 600; }

.form-controls {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.success-box {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary-accent);
    padding: 2rem;
    border-radius: 10px;
}

/* Unified Portal Additions */
.role-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.role-card:hover {
    transform: translateY(-10px) scale(1.02) perspective(1000px) rotateX(2deg) rotateY(-2deg);
    box-shadow: -10px 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    z-index: 10;
}

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

.role-card h4 {
    margin-bottom: 1rem;
}

.widget {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}

.w-100 {
    width: 100%;
}
