.portal-main {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    min-height: 100vh;
}

.portal-auth .card,
.portal-app .card {
    border-radius: 16px;
}

.portal-form .form-control {
    padding: 0.75rem 1rem;
}

.portal-form button[data-loading="true"]::after {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    margin-left: 0.75rem;
    animation: portal-spin 0.7s linear infinite;
    vertical-align: middle;
}

.portal-app .card {
    background: #ffffff;
}

/* Profile Hero Header */
.portal-profile-hero {
    background: linear-gradient(135deg, #143b6b 0%, #265ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 40px rgba(20, 59, 107, 0.2);
    position: relative;
    overflow: hidden;
}

.portal-profile-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.portal-profile-hero::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.portal-profile-content {
    position: relative;
    z-index: 1;
}

.portal-profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.portal-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.portal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

.portal-avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: #00d97e;
    border: 3px solid #143b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-avatar-badge i {
    color: #ffffff;
    font-size: 0.75rem;
}

.portal-profile-info {
    flex: 1;
    min-width: 0;
}

.portal-profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.portal-profile-email {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-profile-email i {
    opacity: 0.7;
}

.portal-profile-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-badge i {
    font-size: 1rem;
}

.portal-badge.badge-status {
    background: rgba(0, 217, 126, 0.2);
    border-color: #00d97e;
    color: #00d97e;
}

.portal-badge.badge-date {
    background: rgba(255, 255, 255, 0.1);
}

.portal-profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.portal-action-button {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-action-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.portal-action-button.primary {
    background: #ffffff;
    color: #143b6b;
    border-color: #ffffff;
}

.portal-action-button.primary:hover {
    background: #f8f9fc;
    transform: translateY(-2px);
    color: #143b6b;
}

.portal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.portal-header h2 {
    color: #143b6b;
}

.portal-stat {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    height: 100%;
    box-shadow: 0 4px 20px rgba(20, 59, 107, 0.08);
    border: 1px solid rgba(20, 59, 107, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portal-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6c5ce7 0%, #a29bfe 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portal-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(20, 59, 107, 0.12);
}

.portal-stat:hover::before {
    opacity: 1;
}

.portal-stat .stat-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #5f7999;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.portal-stat .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ebf2ff 0%, #dce8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #265ba2;
    font-size: 1rem;
}

.portal-stat .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #143b6b;
    margin-top: 0.5rem;
    line-height: 1.2;
}

/* Section Headers */
.portal-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.portal-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.portal-section-title {
    flex: 1;
}

.portal-section-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #143b6b;
    margin: 0;
}

.portal-section-title p {
    font-size: 0.9rem;
    color: #5f7999;
    margin: 0.25rem 0 0 0;
}

/* Announcements */
.portal-announcements .portal-announcement {
    border-left: 3px solid transparent;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.03) 0%, rgba(162, 155, 254, 0.02) 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.portal-announcements .portal-announcement:hover {
    border-left-color: #6c5ce7;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.06) 0%, rgba(162, 155, 254, 0.04) 100%);
    transform: translateX(4px);
}

.portal-announcements .portal-announcement:last-child {
    margin-bottom: 0;
}

.portal-announcement-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #143b6b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-announcement-meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5f7999;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.portal-announcement-text {
    font-size: 0.95rem;
    color: #2e475f;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Resources */
.portal-resources .portal-resource {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    border: 2px solid rgba(20, 59, 107, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portal-resources .portal-resource::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #6c5ce7 0%, #a29bfe 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.portal-resources .portal-resource:hover {
    transform: translateX(8px);
    border-color: rgba(108, 92, 231, 0.2);
    box-shadow: 0 8px 24px rgba(20, 59, 107, 0.1);
}

.portal-resources .portal-resource:hover::before {
    transform: scaleY(1);
}

.portal-resource-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ebf2ff 0%, #dce8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #265ba2;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.portal-resource-content {
    flex: 1;
    min-width: 0;
}

.portal-resource-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #143b6b;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-resource-text {
    font-size: 0.9rem;
    color: #5f7999;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Account Details */
.portal-details {
    margin-bottom: 0;
}

.portal-details dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5f7999;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portal-details dd {
    font-size: 1rem;
    color: #143b6b;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
}

.portal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Info Cards */
.portal-info-card {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(20, 59, 107, 0.06);
}

.portal-info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5f7999;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-info-value {
    font-size: 1.05rem;
    color: #143b6b;
    font-weight: 600;
}

/* Dashboard Grid */
.portal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.portal-grid-full {
    grid-column: span 12;
}

.portal-grid-wide {
    grid-column: span 8;
}

.portal-grid-narrow {
    grid-column: span 4;
}

@media (max-width: 991.98px) {
    .portal-grid-wide,
    .portal-grid-narrow {
        grid-column: span 12;
    }
}

/* Card Enhancements */
.portal-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(20, 59, 107, 0.06);
    border: 1px solid rgba(20, 59, 107, 0.06);
    height: 100%;
}

.portal-card-header {
    border-bottom: 2px solid rgba(20, 59, 107, 0.06);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

@keyframes portal-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .portal-profile-hero {
        padding: 1.5rem;
    }

    .portal-profile-name {
        font-size: 1.5rem;
    }

    .portal-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.25rem;
    }

    .portal-profile-header {
        gap: 1.25rem;
    }

    .portal-profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .portal-action-button {
        width: 100%;
        justify-content: center;
    }

    .portal-stat {
        padding: 1.25rem;
    }

    .portal-header {
        align-items: stretch;
    }

    .portal-header button {
        width: 100%;
    }

    .portal-card {
        padding: 1.5rem;
    }

    .portal-section-title h3 {
        font-size: 1.1rem;
    }

    .portal-details-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .portal-profile-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-badge {
        width: 100%;
    }
}
