/* =========================================================
   ENCABEZADOS DE SECCIÓN
========================================================= */

.portal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-section-header > div {
    min-width: 0;
}

.portal-section-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #eef1f4;
    color: #343a40;
    font-size: 1.25rem;
}

.portal-section-title {
    margin: 0;
    color: #212529;
    font-size: 1.2rem;
    font-weight: 750;
}

.portal-section-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.portal-section-link {
    flex: 0 0 auto;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.portal-section-link:hover {
    color: #212529;
}


/* =========================================================
   TARJETAS DE SISTEMAS
========================================================= */

.portal-system-card {
    position: relative;
    display: flex;
    min-height: 155px;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(33, 37, 41, 0.04);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.portal-system-card::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    border-radius: 0 0 0 100%;
    background: rgba(52, 58, 64, 0.035);
    content: "";
    pointer-events: none;
}

.portal-system-card:hover {
    transform: translateY(-4px);
    border-color: #adb5bd;
    color: inherit;
    box-shadow: 0 14px 30px rgba(33, 37, 41, 0.11);
}

.portal-system-card:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.25);
    outline-offset: 3px;
}

.portal-system-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 1rem;
    border-radius: 15px;
    background: linear-gradient(
        145deg,
        #f4f6f8,
        #e8ecef
    );
    color: #343a40;
    font-size: 1.45rem;
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.portal-system-card:hover .portal-system-icon {
    transform: scale(1.05);
    background: #e9ecef;
}

.portal-system-content {
    min-width: 0;
    width: 100%;
    flex: 1;
}

.portal-system-title {
    margin: 0 0 0.4rem;
    color: #212529;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
}

.portal-system-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #6c757d;
    font-size: 0.86rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-system-action {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 650;
    transition: color 0.2s ease;
}

.portal-system-card:hover .portal-system-action {
    color: #212529;
}


/* =========================================================
   PANEL DE AVISOS
========================================================= */

.portal-notice-panel {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(33, 37, 41, 0.04);
}

.portal-notice-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #eef0f2;
}

.portal-notice-panel-header i {
    color: #495057;
}

.portal-notice-all {
    color: #495057;
    font-size: 0.84rem;
    font-weight: 650;
    text-decoration: none;
}

.portal-notice-all:hover {
    color: #212529;
}

.portal-notice-list {
    display: flex;
    flex-direction: column;
}

.portal-notice-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
}

.portal-notice-item:last-child {
    border-bottom: 0;
}

.portal-notice-status {
    padding-top: 0.35rem;
}

.portal-notice-dot {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.portal-notice-title {
    margin: 0;
    color: #212529;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.portal-notice-date {
    flex: 0 0 auto;
    color: #adb5bd;
    font-size: 0.75rem;
}

.portal-notice-text {
    display: -webkit-box;
    margin: 0.35rem 0 0;
    overflow: hidden;
    color: #6c757d;
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.portal-notice-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #495057;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
}

.portal-empty-notices {
    padding: 2.5rem 1.5rem;
    color: #adb5bd;
    text-align: center;
}

.portal-empty-notices i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}


/* =========================================================
   ESTADOS VACÍOS
========================================================= */

.portal-empty-state {
    padding: 2.5rem 1.5rem;
    border: 1px dashed #ced4da;
    border-radius: 18px;
    background: #ffffff;
    color: #6c757d;
    text-align: center;
}

.portal-empty-state > i {
    display: inline-grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 15px;
    background: #f1f3f5;
    color: #6c757d;
    font-size: 1.4rem;
}


/* =========================================================
   PANEL LATERAL
========================================================= */

.portal-dashboard-sidebar {
    position: sticky;
    top: 1.5rem;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199.98px) {
    .portal-dashboard-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .portal-section-header {
        align-items: flex-start;
    }

    .portal-section-icon {
        width: 42px;
        height: 42px;
    }

    .portal-system-card {
        min-height: 140px;
    }

    .portal-notice-item {
        padding: 1rem;
    }
}