:root {
    --portal-red: #d71920;
    --portal-red-dark: #ad1117;
    --portal-black: #171717;
    --portal-black-soft: #202020;
    --portal-card: #ffffff;
    --portal-border: #e5e7eb;
    --portal-text: #171717;
    --portal-muted: #6b7280;
    --portal-green: #5b7f24;
    --portal-green-dark: #46631c;
    --portal-red-light: #fff1f2;
    --portal-white: #ffffff;

    --portal-shadow: 0 14px 35px rgba(0, 0, 0, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ep-header,
.admin-header {
    width: 100%;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 22px;
    margin: 20px 0 28px;
    background: linear-gradient(
        135deg,
        #1d2026 0%,
        #191b20 100%
    );
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .16);
}

.ep-left,
.admin-header-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ep-brand {
    width: 58px;
    height: 58px;
    min-width: 58px;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.ep-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.ep-logo-fallback {
    border-radius: 50%;
    background: #ffffff;
    color: var(--portal-red);
    font-weight: 900;
    font-size: 18px;
    border: 2px solid var(--portal-red);
}

.ep-header-info {
    min-width: 0;
}

.ep-header-info small {
    display: block;
    margin-bottom: 3px;
    color: #8fb2d9;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ep-header-info h2 {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.2;
}

.ep-header-info .welcome {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    color: #9ca3af;
    font-size: 10px;
}

.ep-header-info .welcome strong {
    color: #ef5a52;
}

.ep-right,
.admin-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.admin-page .user-menu {
    display: flex;
    align-items: center;
}

.admin-page .user-menu .avatar-placeholder,
.admin-page .user-menu .dropdown-header,
.admin-page .user-menu .dropdown hr,
.admin-page .user-menu .dropdown-item:not(.logout) {
    display: none !important;
}

.admin-page .user-menu .dropdown {
    display: block !important;
    position: static !important;
    min-width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.admin-page .user-menu .logout,
.admin-page .user-menu a.logout {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 11px;
    background: rgba(255, 255, 255, .06);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: .18s ease;
}

.admin-page .user-menu .logout:hover {
    background: var(--portal-red);
    border-color: var(--portal-red);
    transform: translateY(-1px);
}

.admin-page .top {
    margin: 0 0 18px;
}

.admin-page .top h1 {
    margin-top: 4px;
}

.admin-page .nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-page .nav .btn {
    min-height: 40px;
    padding: 0 15px;
    white-space: nowrap;
}

.admin-page .grid,
.admin-page .grid2 {
    align-items: start;
}

.admin-page .card {
    min-width: 0;
}

.admin-page .card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.admin-page .section-kicker {
    display: block;
    margin-bottom: 5px;
    color: #7da0c9;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.admin-page .card-heading h2 {
    margin: 0;
}

.admin-page .card-heading p {
    margin: 6px 0 0;
    color: #8f96a3;
}

.admin-page form label {
    display: block;
    margin-top: 13px;
    margin-bottom: 6px;
}

.admin-page form label:first-of-type {
    margin-top: 0;
}

.admin-page input,
.admin-page select,
.admin-page textarea {
    width: 100%;
}

.admin-page .table {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
}

.admin-page .table table {
    width: 100%;
    min-width: 760px;
}

.admin-page .table th,
.admin-page .table td {
    vertical-align: middle;
}

.admin-page .inline {
    display: inline;
}

.admin-page .inline .btn {
    margin: 0;
}

.admin-page .payroll-counter {
    min-width: 78px;
    padding: 10px 14px;
    border: 1px solid rgba(239, 61, 51, .2);
    border-radius: 12px;
    background: rgba(239, 61, 51, .06);
    text-align: center;
}

.admin-page .payroll-counter strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
}

.admin-page .payroll-counter small {
    color: #999;
    font-size: 9px;
    text-transform: uppercase;
}

.admin-page .requests-empty,
.admin-page .notification-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 30px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: 16px;
}

.admin-page .requests-empty-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(91, 127, 36, .12);
    color: #9cc35d;
    font-weight: 900;
}

.request-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
}

.request-status.pending {
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
}

.request-status.approved {
    background: rgba(34, 197, 94, .12);
    color: #86efac;
}

.request-status.rejected {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
}

.request-status.review {
    background: rgba(59, 130, 246, .12);
    color: #93c5fd;
}


/* ==========================================================
   DASHBOARD EMPLEADO
========================================================== */

.employee-dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 40px;
}

.employee-dashboard .header,
.employee-dashboard .top-header {
    width: 100%;
}

.employee-dashboard .header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.employee-dashboard .brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-dashboard .brand-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    display: block;
}

.employee-dashboard .brand-text {
    min-width: 0;
}

.employee-dashboard .brand-name {
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-dashboard .brand-subtitle {
    margin-top: 3px;
    color: #9ca3af;
    font-size: 10px;
}

.employee-dashboard .header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.employee-dashboard .user-badge {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
}

.employee-dashboard .user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--portal-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.employee-dashboard .user-info {
    min-width: 0;
}

.employee-dashboard .user-name {
    max-width: 190px;
    overflow: hidden;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-dashboard .user-role {
    margin-top: 2px;
    color: #9ca3af;
    font-size: 9px;
}

.employee-dashboard .logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.employee-dashboard .logout:hover {
    background: var(--portal-red);
    border-color: var(--portal-red);
}

.employee-dashboard .welcome {
    margin: 28px 0 20px;
}

.employee-dashboard .welcome h1 {
    margin: 0;
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.15;
}

.employee-dashboard .welcome h1 span {
    color: var(--portal-red);
}

.employee-dashboard .welcome p {
    margin-top: 7px;
    color: var(--portal-muted);
}

.employee-dashboard .status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(91, 127, 36, .2);
    border-radius: 999px;
    background: rgba(91, 127, 36, .08);
    color: #70953a;
    font-size: 10px;
    font-weight: 800;
}

.employee-dashboard .profile {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 26px;
    align-items: center;
    padding: 24px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    box-shadow: var(--portal-shadow);
}

.employee-dashboard .profile-photo,
.employee-dashboard .profile-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
}

.employee-dashboard .profile-placeholder {
    display: grid;
    place-items: center;
    margin: 0 auto;
    background: var(--portal-black);
    border: 3px solid var(--portal-red);
    color: #ffffff;
    font-size: 42px;
    font-weight: 900;
}

.employee-dashboard .profile-data {
    min-width: 0;
}

.employee-dashboard .profile-data h2 {
    margin: 0;
    color: var(--portal-text);
    font-size: 21px;
}

.employee-dashboard .profile-data .position {
    margin-top: 4px;
    color: var(--portal-red);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.employee-dashboard .profile-data-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.employee-dashboard .profile-data-item {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #edf0f3;
    border-radius: 11px;
}

.employee-dashboard .profile-data-item span {
    display: block;
    margin-bottom: 4px;
    color: #8b929c;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.employee-dashboard .profile-data-item strong {
    display: block;
    color: #202124;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.employee-dashboard .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.employee-dashboard .stat {
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
}

.employee-dashboard .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.employee-dashboard .card {
    min-width: 0;
    border-radius: 18px;
}

.employee-dashboard .employee-news-card,
.employee-dashboard .employee-requests-card {
    grid-column: 1 / -1;
}

.employee-dashboard .employee-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.employee-dashboard .employee-action {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    color: #171717;
    cursor: pointer;
    transition: .18s ease;
}

.employee-dashboard .employee-action:hover {
    border-color: rgba(215, 25, 32, .28);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
    transform: translateY(-2px);
}

.employee-dashboard .employee-action-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fff1f2;
    font-size: 18px;
}

.employee-dashboard .employee-action-content {
    min-width: 0;
}

.employee-dashboard .employee-action-content strong {
    display: block;
    font-size: 12px;
}

.employee-dashboard .employee-action-content small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.45;
}

.employee-dashboard .card-description {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
}

.employee-dashboard .requests-empty {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border: 1px dashed #d7dce2;
    border-radius: 14px;
    background: #fafafa;
}

.employee-dashboard .request-list {
    display: grid;
    gap: 10px;
}

.employee-dashboard .request-item {
    min-width: 0;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: #ffffff;
}

.employee-dashboard .request-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.employee-dashboard .request-item-title {
    font-size: 12px;
    font-weight: 900;
}

.employee-dashboard .request-item-meta {
    margin-top: 4px;
    color: #6b7280;
    font-size: 10px;
}

@media (max-width: 900px) {
    .employee-dashboard .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-dashboard .profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .employee-dashboard .profile-data-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: left;
    }

    .employee-dashboard .employee-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .shell,
    .employee-dashboard {
        width: min(100% - 20px, 1180px);
    }

    .ep-header,
    .admin-header {
        align-items: flex-start;
        padding: 14px;
        margin-top: 10px;
    }

    .ep-header {
        flex-direction: row;
    }

    .ep-left {
        min-width: 0;
    }

    .ep-header-info h2 {
        font-size: 14px;
    }

    .ep-header-info .welcome {
        display: none;
    }

    .admin-page .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .employee-dashboard .header-inner {
        min-height: 64px;
    }

    .employee-dashboard .brand-text {
        display: none;
    }

    .employee-dashboard .user-info {
        display: none;
    }

    .employee-dashboard .profile-data-grid {
        grid-template-columns: 1fr;
    }

    .employee-dashboard .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .employee-dashboard .stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .ep-header,
    .admin-header {
        border-radius: 15px;
    }

    .ep-brand,
    .ep-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .admin-page .nav {
        grid-template-columns: 1fr;
    }

    .employee-dashboard .stats {
        grid-template-columns: 1fr;
    }

    .employee-dashboard .header-user {
        gap: 5px;
    }

    .employee-dashboard .logout {
        padding: 0 10px;
    }

    .employee-dashboard .profile {
        padding: 18px;
    }
}