/* =========================
   GLOBAL STYLES
========================= */

/* Tablet */
@media (max-width: 1024px) {
}

.dashboard-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.dashboard-breakdown { padding: 20px; }
.metric-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #e5e7eb; }
.stat-number.small { font-size: 1.35rem; }
.recent-activity { min-width: 220px; font-size: 12px; line-height: 1.35; }
.recent-activity small { display: block; margin-top: 3px; color: #4b5563; }


body {
    font-family: 'Inter', sans-serif;
    background: #f2f7f3;
    margin: 0;
    color: #070807;
    overflow-x: hidden;
}
.validation-message {
    font-size: 12px;
    color: #b02a37;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .validation-message::before {
        content: "⚠";
        font-size: 12px;
    }

/* =========================
LOGIN PAGE
========================= */

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #499724, #1b5e20);
    overflow: hidden;
}

    /* BACKGROUND EFFECTS */

    .login-container::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
        background-size: 30px 30px;
        opacity: .5;
    }

    .login-container::after {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        filter: blur(40px);
        animation: ambientGlow 8s ease-in-out infinite alternate;
    }
    .login-container::before,
    .login-container::after {
        display: none;
    }

@keyframes ambientGlow {
    from {
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        transform: translate(-50%, -55%) scale(1.1);
    }
}

/* CARD */

.login-card {
    width: 380px;
    padding: 35px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
    animation: loginFade .4s ease;
}

    .login-card:hover {
        transform: translateY(-3px);
        transition: transform .2s ease;
    }

/* HEADER */

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    width: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

.login-header h2 {
    font-weight: 700;
    font-size: 20px;
    color: #070807;
}

/* CAMPOS */

.login-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

    .login-field label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 5px;
    }

/* BOTÓN LOGIN */

.login-button {
    width: 100%;
    margin-top: 10px;
}
.btn-send {
    background: #1c5f20;
    color: white;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
}
.btn-internal {
    background: #eee;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
}
/* LINK */

.btn-link-clean {
    background: none;
    border: none;
    color: #1c5f20;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .2s;
}

    .btn-link-clean:hover {
        opacity: .7;
    }

/* ERROR */

.login-error {
    margin-top: 15px;
    padding: 10px;
    background: #ffe6e6;
    color: #b00020;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

/* SUCCESS */

.login-success {
    margin-bottom: 15px;
    padding: 10px;
    background: #e9f6ec;
    color: #1c5f20;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

/* ANIMATION */

@keyframes loginFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* =========================
   LAYOUT
========================= */

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px 30px;
}

    .content-area {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 240px;
    background: #1c5f20;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .sidebar-menu {
        display: flex;
        flex-direction: column;
    }

    .sidebar-section {
        font-size: 12px;
        text-transform: uppercase;
        padding: 20px 20px 10px 20px;
        opacity: 0.7;
        letter-spacing: 1px;
    }

    .sidebar-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px;
        text-decoration: none;
        color: white;
        font-weight: 500;
        transition: all 0.2s;
    }

        .sidebar-item:hover {
            background: #499724;
        }

        .sidebar-item.active {
            background: linear-gradient(90deg,#499724,#1b5e20);
        }

    .sidebar-icon {
        font-size: 18px;
    }
 

/* =========================
   TOP NAVBAR
========================= */

.menu-btn {
    position: sticky;
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    font-size: 18px;
    line-height: 1;
}
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    background: #1c5f20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    color: white;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.logo-img {
    height: 32px;
    margin-right: 10px;
}
.mobile-only {
    display: none;
}

.system-name {
    font-weight: 700;
    font-size: 18px;
}
.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.navbar-icon {
    font-size: 20px;
}

.profile-icon {
    font-size: 20px;
}
.profile-name {
    font-weight: 600;
}
.top-navbar .perfil-avatar {
    display: none;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

    .profile-btn:hover {
        background: rgba(255,255,255,0.15);
    }
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-dropdown {
    position: absolute;
    right: 12px;
    top: 42px;
    background: white;
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    animation: dropdownFade 0.18s ease;
}
@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

    .profile-btn:hover {
        background: rgba(255,255,255,0.15);
    }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 90;
}
.dropdown-item {
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-decoration: none;
    color: #070807;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease;
}

    .dropdown-item:hover {
        background: #a8d5ba;
        color: #070807;
    }
    .dropdown-item.active {
        background-color: #f2f7f3;
        color: #0f5132;
    }



.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b3b;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.notification-panel {
    position: absolute;
    top: 40px;
    right: 12px;
    width: 300px;
    max-height: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow-y: auto;
    z-index: 1000;
    animation: notifFade 0.18s ease;
}
@keyframes notifFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #070807;
}
    .notification-item:hover {
        background: #f2f7f3;
        cursor: pointer;
    }

    .notification-item.unread {
        background: #1c5f20;
        font-weight: 600;
        color: white;
    }

.notification-text {
    font-size: 14px;

}
    .notification-text.unread .notification-text {
        color: #bee9c3;
    }

    .notification-date {
        font-size: 11px;
        opacity: 0.6;
        color: #a6a7a6;
    }

.notification-empty {
    padding: 20px;
    text-align: center;
    opacity: 0.7;
    color: #a6a7a6;
}

    .notification-header {
        padding: 12px 15px;
        font-weight: 600;
        border-bottom: 1px solid #eee;
        color: #1c5f20;
    }
    /* =========================
   PERFIL PAGE
========================= */

    .perfil-page {
        display: flex;
        justify-content: center;
        padding: 40px 20px;
        background: #f2f7f3;
        min-height: calc(100vh - 70px);
        font-family: 'Inter', sans-serif;
    }

    .perfil-card {
        width: 100%;
        max-width: 600px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 12px 35px rgba(0,0,0,0.12);
        padding: 32px;
        animation: perfilFade 0.35s ease;
    }

    .perfil-header {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 28px;
    }

    .perfil-avatar {
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: linear-gradient( 135deg, #499724, #1b5e20 );
        color: white;
        font-weight: 700;
        font-size: 20px;
        letter-spacing: 1px;
    }

    .perfil-title h2 {
        margin: 0;
        font-weight: 700;
        font-size: 22px;
        color: #1c5f20;
    }

    .perfil-subtitle {
        font-size: 13px;
        color: #6a6a6a;
    }

    .perfil-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .perfil-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

        .perfil-field label {
            font-size: 13px;
            font-weight: 600;
            color: #1c5f20;
        }

    .perfil-input {
        padding: 10px 12px;
        border-radius: 8px;
        border: 1px solid #d9e3db;
        font-size: 14px;
        transition: all 0.2s ease;
        background: white;
    }

        .perfil-input:focus {
            outline: none;
            border-color: #499724;
            box-shadow: 0 0 0 2px rgba(73,151,36,0.15);
        }

        .perfil-input.readonly {
            background: #f4f6f5;
            color: #555;
        }

    .btn-primaryP {
        background: #1c5f20;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 10px 16px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .btn-primaryP:hover {
            background: #174d1a;
        }

    .btn-secondaryP {
        background: transparent;
        color: #1c5f20;
        border: 1px solid #1c5f20;
        border-radius: 8px;
        padding: 10px 16px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .btn-secondaryP:hover {
            background: #f2f7f3;
        }

    .perfil-actions {
        display: flex;
        gap: 10px;
        margin-top: 26px;
    }

    @keyframes perfilFade {

        from {
            opacity: 0;
            transform: translateY(12px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    /* =========================
   BUTTONS
========================= */

    .primary-btn {
        background: #1c5f20;
        color: white;
        border: none;
        padding: 10px 18px;
        border-radius: 6px;
        font-weight: 600;
        cursor: pointer;
    }

        .primary-btn:hover {
            background: #499724;
        }
    /* =========================
   CARDS
========================= */

    .card {
        background: white;
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    }
    /* =========================
   TABLE CLEAN (GLOBAL)
========================= */

    .table-clean {
        width: 100%;
        border-collapse: collapse;
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        background: white;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
        /* HEADER */

        .table-clean thead {
            background: #f2f7f3;
        }

        .table-clean th {
            text-align: left;
            padding: 14px 16px;
            font-weight: 700;
            font-size: 14px;
            color: #1c5f20;
            letter-spacing: .5px;
            border-bottom: 2px solid #a8d5ba;
        }
        /* CELLS */

        .table-clean td {
            padding: 14px 16px;
            color: #070807;
            border-bottom: 1px solid #eef3ef;
        }
        /* ROW HOVER */

        .table-clean tbody tr {
            transition: background .2s ease, transform .15s ease;
        }

            .table-clean tbody tr:hover {
                background: #f2f7f3;
                transform: scale(1.01);
            }
    /* CLICKABLE ROW */

    .clickable-row {
        cursor: pointer;
    }
    /* LAST ROW */

    .table-clean tbody tr:last-child td {
        border-bottom: none;
    }
    /* STATUS COLORS */

    .status-open {
        color: #1c5f20;
        font-weight: 600;
    }

    .status-closed {
        color: #7b7b7b;
    }

    .status-pending {
        color: #499724;
    }
    /* SMOOTH APPEAR */

    .table-clean tbody tr {
        animation: rowFade .35s ease;
    }

    @keyframes rowFade {
        from {
            opacity: 0;
            transform: translateY(4px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    /* =========================
   TABLES
========================= */

    .entity-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

        .entity-table thead {
            background: #f2f7f3;
        }

        .entity-table th {
            text-align: left;
            padding: 12px 14px;
            font-weight: 600;
            color: #1c5f20;
            border-bottom: 2px solid #e4efe7;
        }

        .entity-table td {
            padding: 12px 14px;
            border-bottom: 1px solid #eee;
        }

        .entity-table tbody tr:hover {
            background: #f7fbf8;
        }

    .clickable-row {
        cursor: pointer;
    }

    .entity-wrapper {
        overflow-x: auto;
    }
    /* ===============================
   DASHBOARD
=============================== */

    .dashboard-container {
        padding: 30px;
    }
    /* HEADER */

    .dashboard-header {
        margin-bottom: 30px;
    }

    .dashboard-title {
        font-size: 28px;
        font-weight: 700;
        color: #070807;
    }

    .dashboard-date {
        margin-top: 5px;
        font-size: 14px;
        opacity: 0.7;
    }
    /* GRID */

    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
        gap: 20px;
    }
    /* CARDS */

    .dashboard-card {
        border-radius: 12px;
        padding: 25px;
        position: relative;
        overflow: hidden;
    }
    /* STAT CARDS */

    .stat-card {
        background: linear-gradient(135deg,#499724,#1b5e20);
        color: white;
        transition: transform .25s ease, box-shadow .25s ease;
        cursor: pointer;
    }

        .stat-card:hover {
            transform: translateY(-6px) scale(1.02);
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        }

    .stat-title {
        font-size: 16px;
        font-weight: 600;
        opacity: 0.9;
    }

    .stat-number {
        font-size: 42px;
        font-weight: 700;
        margin-top: 10px;
    }
    /* SHINE EFFECT */

    .stat-card::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 120deg, transparent, rgba(255,255,255,0.25), transparent );
        transition: all .6s;
    }

    .stat-card:hover::after {
        left: 100%;
    }
    /* BUTTON */

    .create-ticket-btn {
        background: #1c5f20;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 14px 26px;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 1px;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    }

        .create-ticket-btn:hover {
            background: #499724;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.2);
        }

        .create-ticket-btn:active {
            transform: scale(.97);
        }
    /* =========================
FORMULARIOS
========================= */

    .form-card {
        max-width: 720px;
        margin: auto;
        padding: 35px;
    }
    /* CAMPOS */

    .form-field {
        display: flex;
        flex-direction: column;
        margin-bottom: 18px;
    }

        .form-field label {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 6px;
        }
    /*Password*/

.info-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
}

    .info-password:hover {
        color: #0d6efd;
    }
.password-input-wrapper {
    position: relative;
}
.password-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    
}
.password-container {
    position: relative;
    margin-bottom: 18px;
}
.password-input {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.password-rules {
    padding-top: 28px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    z-index: 10;
    flex: 0.5;
    max-width: 300px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;

}

    .password-rules.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
.password-rules-floating {
    list-style: none !important;
    position: absolute;
    top: 0;
    left: 105%;
    width: 220px;
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-size: 13px;
    z-index: 100;
}
    .password-rules-floating ul {
        list-style: none !important;
        padding-left: 0 !important;
        margin: 0;
    }

    .password-rules li {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 3px;
        color: #555;
    }

            .password-rules li.ok {
                color: green;
            }

            .password-rules li.error {
                color: red;
            }


.password-input-wrapper {
    position: relative;
}

    .password-input-wrapper input {
        width: 100%;
        padding-right: 40px;
    }

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

    .toggle-password:hover {
        color: #000;
    }

.password-input-wrapper.has-info .toggle-password {
    right: 35px; /* cuando hay (i) */
}

.password-input-wrapper .info-password {
    right: 10px;
}

    /* INPUTS */
    .search-box {
        width: 100%;
        max-width: 420px;
    }

    .input-clean {
        width: 100%;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 10px 12px;
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        line-height: 1.6;
        color: #070807;
        background: #ffffff;
        transition: border .15s ease, box-shadow .15s ease;
    }

        .input-clean:focus {
            outline: none;
            border-color: #1c5f20;
            box-shadow: 0 0 0 2px rgba(28,95,32,0.15);
        }
    /* TEXTAREA */

    .textarea-clean {
        min-height: 120px;
        resize: vertical;
    }
    /* DESCRIPCIÓN */

    .descripcion-input {
        min-height: 42px;
        max-height: 80px;
        resize: none;
    }
    /* DETALLE */

    .detalle-input {
        min-height: 120px;
        max-height: 200px;
        resize: none;
        overflow-y: auto;
    }
    /* BOTÓN PRINCIPAL */

    .btn-primary-clean {
        height: 36px;
        background: linear-gradient(135deg, #499724, #1b5e20);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px 22px;
        font-weight: 600;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: transform .15s ease, box-shadow .15s ease, filter .2s;
    }

        .btn-primary-clean:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 18px rgba(0,0,0,0.15);
            filter: brightness(1.05);
        }

        .btn-primary-clean:active {
            transform: scale(.97);
        }

    .submit-button {
        margin-top: 10px;
    }
    /* ARCHIVOS */

    .selected-files {
        margin-top: 8px;
        font-size: 13px;
        opacity: .8;
    }
    /* ALERTA */

    .alert-clean {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 20px;
        padding: 12px 14px;
        background: #f2f7f3;
        border-left: 4px solid #1c5f20;
        border-radius: 6px;
        font-size: 14px;
    }
    /* SPINNER */

    .spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255,255,255,0.4);
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin .7s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }
    /* =========================
   MODAL BACKDROP
========================= */

    .panel-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1200;
    }
    /* =========================
   TICKET MODAL
========================= */
    /* MODAL */

    .entity-modal {
        width: 900px;
        max-height: 95vh;
        background: white;
        border-radius: 24px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        overflow-y: auto;
    }
    /* TITLE */

    .ticket-title-row {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .ticket-number {
        font-size: 22px;
        font-weight: 600;
        color: #070807;
    }
    /* STATUS */

    .status-pill {
        margin-top: 6px;
        background: #e8f4ea;
        color: #1c5f20;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
    }
    /* ACTIONS */

    .action-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        border: none;
        padding: 8px 14px;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: all .2s ease;
    }

        .action-btn i {
            font-size: 14px;
        }
        /* HOVER */
        .action-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        }

    .action-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }

    .action-icon {
        font-size: 22px;
    }

    .action-title {
        font-weight: 600;
        letter-spacing: .5px;
    }

    .ticket-header {
        background: linear-gradient(135deg,#499724,#1b5e20);
        color: white;
        padding: 14px 22px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ticket-header-actions {
        display: flex;
        gap: 10px;
    }

.header-actions-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .ticket-header-left {
        display: flex;
        flex-direction: column;
    }

    .header-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .ticket-status-row {
        margin-top: 4px;
    }

.assign-dropdown {
    position: relative;
    width: 220px;
}

.assign-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #777;
}
    .assign-input:hover {
        border-color: #c8d6cc;
        background: #f5f7f6;
    }

    .assign-input input {
        border: none;
        outline: none;
        font-size: 13px;
        width: 100%;
        background: transparent;
    }

.assign-list {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 10;
}

.assign-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

    .assign-item:hover {
        background: #f3f4f6;
    }

    /* BUTTONS */
    .btn {
        border: none;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 13px;
        cursor: pointer;
    }



    .btn-close {
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .btn-save,
    .btn-cancel {
        border: none;
        background: transparent;
        cursor: pointer;
        font-size: 14px;
        opacity: 0.65;
    }

        .btn-save:hover {
            opacity: 1;
            color: #3F9E27;
        }

        .btn-cancel:hover {
            opacity: 1;
            color: #D32F2F;
        }

    .save-anim {
        animation: popIn .25s ease;
    }

    .cancel-anim {
        animation: popIn .25s ease;
    }

    @keyframes popIn {
        from {
            transform: scale(.9);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }
    /*Estado panel*/
    .status-edit-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
    }

    .status-select {
        height: 28px;
        border-radius: 6px;
        border: 1px solid #E5E7EB;
        padding: 0 6px;
        font-size: 12px;
    }


    .ticket-text-section {
        flex: 0 0 auto;
        background: #f8faf9;
        border: 1px solid #e4efe7;
        border-radius: 12px;
        padding: 18px;
        margin-bottom: 18px;
    }

    .ticket-info-grid {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 10px 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        row-gap: 12px;
        column-gap: 20px;
        gap: 8px 40px;
        margin-top: 10px;
    }

    .ticket-info-item {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        font-size: 14px;
        color: #111827;
    }

        .ticket-info-item span {
            font-weight: 600;
            color: #666;
        }

        .ticket-info-item strong {
            font-size: 14px
        }

    .ticket-text-block {
        margin-bottom: 8px;
    }

    .ticket-label {
        font-size: 12px;
        color: #6b7280;
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
    }

    .ticket-text {
        font-size: 14px;
        color: #111827;
    }
    /*CHAT*/
    .info-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    /* CHAT HALF */

    .ticket-chat {
        flex: 1;
        border-top: 1px solid #eee;
        display: flex;
        flex-direction: column;
        padding: 18px 24px;
    }

    .chat-event {
        background: #f1f1f1;
        color: #555;
        font-size: 12px;
        padding: 6px 10px;
        border-radius: 12px;
        width: fit-content;
        margin: 10px auto;
    }

    .chat-row {
        display: flex;
        margin-bottom: 10px;
    }

        .chat-row.mine {
            justify-content: flex-end;
        }

    .chat-bubble {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 10px 14px;
        border-radius: 14px;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 70%;
    }

        .chat-bubble.internal {
            border-left: 4px solid #f59e0b;
            background: #fff8e6;
            opacity: 0.95;
        }

    .internal-badge {
        background: #f59e0b;
        color: white;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 6px;
        margin-left: 6px;
    }

    .btn-secondary-clean.active-interno {
        height: 36px;
        background: #f59e0b;
        color: white;
        border-color: #f59e0b;
        box-shadow: 0 0 0 2px rgba(245,158,11,0.25);
    }

    .bubble-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 11px;
        color: #6B7280;
        margin-bottom: 4px;
        margin-bottom: 4px;
    }

    .meta-user {
        font-weight: 500;
        color: #1F2933;
        padding-right: 10px;
    }

    .meta-time {
        padding-right: 8px;
        margin-left: auto;
        font-size: 10px;
        color: #52606D;
        white-space: nowrap;
    }

    .bubble-time {
        font-size: 11px;
        color: #7d8f71;
        text-align: right;
        margin-top: 4px;
        opacity: 0.7;
    }

    .bubble-text {
        font-size: 13px;
        color: #1F2933;
    }


    .chat-row.mine .chat-bubble {
        background: #1c5f20;
    }

    .chat-row.mine .bubble-text {
        color: white;
        text-align: left;
    }

    .chat-row.mine .meta-user,
    .chat-row.mine .meta-time {
        color: rgba(255,255,255,0.85);
    }

    .chat-row.other .chat-bubble {
        color: #6B7280;
        background: #f2f7f3;
        text-align: left;
    }

    .chat-input {
        margin-top: 10px;
    }

    .chat-button {
        padding: 10px 18px;
    }

    .chat-buttons {
        display: flex;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .chat-image {
        max-width: 280px;
        border-radius: 8px;
        margin-top: 4px;
        cursor: pointer;
    }

    .internal-warning {
        font-size: 12px;
        color: #f59e0b;
        margin-bottom: 6px;
    }

    .hidden-file-input {
        display: none;
    }
    /*Adjuntos*/
    .adjuntos-container {
        margin-top: 12px;
    }

    .adjuntos-title {
        font-weight: 600;
        margin-bottom: 8px;
    }
    /*imagen*/
.image-viewer-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

    .image-viewer-content {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
    }
.image-wrapper {
    max-width: 90vw;
    max-height: 85vh;
}
    /* imagen */
    .viewer-image {
        max-width: 90vw;
        max-height: 80vh;
        object-fit: contain;
        border-radius: 10px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    }

    .viewer-pdf {
        width: 80vw;
        height: 85vh;
        border: none;
        border-radius: 10px;
        background: white;
    }
    /* ANIMACION */

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .image-lightbox {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.65);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        animation: fadeInLightbox 0.15s ease-out;
    }

    .lightbox-image {
        max-width: min(90vw, 1000px);
        max-height: 90vh;
        border-radius: 14px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        background: white;
        padding: 6px;
        animation: zoomInLightbox 0.18s ease;
    }

    @keyframes fadeInLightbox {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes zoomInLightbox {
        from {
            transform: scale(0.96);
        }

        to {
            transform: scale(1);
        }
    }

    .chat-files {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 8px;
    }

        .chat-files img:only-child {
            max-width: 220px;
            width: 100%;
            height: auto;
            border-radius: 8px;
        }

    .chat-file {
        margin-top: 6px;
    }
    /*Controles imagenes*/
.viewer-toolbar {
    position: absolute;
    top: 20px;
    display: flex;
    gap: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    padding: 10px 14px;
    border-radius: 10px;
    backdrop-filter: blur(6px);
    align-items: center;
}

        .viewer-toolbar button {
            border: none;
            background: transparent;
            color: white;
            font-size: 18px;
            cursor: pointer;
        }

            .viewer-toolbar button:hover {
                color: #a8d5ba;
            }
    /*10-03-2026*/
    .entity-detail-panel {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
    }

    .ticket-top-section {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
    }

    .entity-tabs {
        display: flex;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .tabs-wrapper {
        display: inline-flex;
        background: #eef3ef;
        padding: 4px;
        border-radius: 10px;
        gap: 4px;
    }

    .btn-tab,
    .btn-tab-active {
        border: none;
        padding: 6px 14px;
        font-size: 14px;
        border-radius: 8px;
        cursor: pointer;
        transition: all .2s ease;
    }
    /* TAB NORMAL */
    .btn-tab {
        background: transparent;
        color: #3b3b3b;
    }
        /* HOVER */
        .btn-tab:hover {
            background: #dfe8e1;
        }
    /* TAB ACTIVO */
    .btn-tab-active {
        background: #1c5f20;
        color: white;
        font-weight: 500;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

        .btn-tab span,
        .btn-tab-active span {
            opacity: .8;
        }

    .detail-info-box {
        display: grid;
        grid-template-columns: 140px 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px 16px;
        padding: 22px 26px;
        background: white;
        border-radius: 12px;
        margin-top: 20px;
    }

    .info-label {
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        margin-bottom: 2px;
    }

    .info-content {
        font-size: 14px;
        color: #111827;
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e7eb;
        line-height: 1.5;
        word-break: break-word;
    }

    .detail-content {
        padding-bottom: 16px;
    }

    .info-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        color: #6b7280;
        margin-top: 2px;
        padding-top: 2px;
    }

    .detalle-block {
        flex: 0 0 60%;
    }

    .detail-chat-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 12px 20px 18px 20px;
        overflow: hidden;
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 16px;
        margin-top: 20px;
        min-height: 75vh;
    }

    .ticket-meta-row {
        flex: 0 0 15%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 6px;
        font-size: 12px;
        margin-top: 6px;
    }

    .ticket-meta-left .ticket-label {
        font-size: 11px;
        color: #6b7280;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding-right: 6px;
        margin-top: 6px;
        margin-bottom: 10px;
    }

    .chat-input-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }
    /* OVERLAY */

    .entity-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.35);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }


    .header-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
    }

    .edit-mode-banner {
        color: #888;
        font-size: 13px;
    }
    /* HEADER */

    .detail-panel-header {
        flex: 0 0 auto;
        background: #a8d5ba;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 12px 50px 12px 20px;
        position: relative;
    }

    button i {
        margin-right: 1px;
        font-size: 25px;
    }

    .btn-green {
        background: #1c5f20;
        color: white;
        border: none;
        padding: 6px 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .btn-red {
        background: #d9534f;
        color: white;
        border: none;
        padding: 6px 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
    }

.btn-gray {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 10px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-gray:hover {
        background: #f5f7f6;
        border-color: #c8d6cc;
        transform: translateY(-1px);
    }
.btn-gray.primary {
        background: #e8f5ec;
        border: 1px solid #b7dfc2;
        color: #2e7d32;
    }

        .btn-gray.primary:hover {
            background: #dff3e5;
        }


    .btn-gray:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .ticket-divider {
        border: none;
        border-top: 1px solid #e5e7eb;
        margin: 6px 0;
    }

    .ticket-meta-date {
        font-size: 10px;
        color: #4b5563;
    }

.btn-secondary-clean {
    height: 36px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center; 
    justify-content: center;

    gap: 6px;
}

    .download-icon {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 16px;
        color: #6b7280;
        padding: 6px;
        border-radius: 8px;
        transition: all .15s ease;
    }

        .download-icon:hover {
            background: #e5e7eb;
            color: #111827;
        }

    .ticket-client-section {
        flex: 0 0 auto;
        background: #f5f6f7;
        padding: 16px 24px;
        margin-top: 0;
        padding: 20px 32px;
    }

    .ticket-info-grid-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px 60px;
        margin-bottom: 20px;
    }

    .chat-input-container {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
        gap: 10px;
        margin-top: 8px;
        width: 100%;
    }

    .chat-input-box {
        flex: 1;
        background: #f1f3f4;
        border-radius: 14px;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
    }

.chat-textbox {
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    min-height: 36px;
    line-height: 18px;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 18px;
    overflow-y: auto;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

        .chat-actions button {
            height: 36px;
        }

    .btn-attach {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        .btn-attach:hover {
            background: #f3f4f6;
        }

    .hidden-file-input {
        display: none;
    }

    .chat-preview-row {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 6px;
    }

    .preview-file {
        width: 60px;
        height: 60px;
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

        .preview-file img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .remove-file {
        position: absolute;
        top: -6px;
        right: -6px;
        background: black;
        color: white;
        border: none;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        cursor: pointer;
    }
    /*USUARIODETAILPANEL*/
    .user-header {
        display: flex;
        justify-content: space-between;
    }

    .detail-title {
        font-size: 20px;
        font-weight: 600;
    }

    .detail-entity-code {
        font-size: 13px;
        color: #6b7280;
    }

    .panel-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .user-info-grid {
        display: grid;
        grid-template-columns: 180px 1fr 180px 1fr;
        gap: 14px 20px;
    }

    .detail-row {
        display: contents;
    }

        .detail-row span {
            color: #6b7280;
            font-weight: 500;
        }
    /* MOBILE */
    @media (max-width: 768px) {

        .chat-input-box {
            width: 100%;
            padding: 8px;
        }
        .chat-input-row {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 100%;
        }

        .chat-textbox {
            flex: 1 1 auto;
            min-width: 0; 
            height: 36px;
        }

        .chat-actions {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .btn-primary-clean {
            flex: 0 0 auto;
            padding: 6px 10px;
            font-size: 12px;
        }

        .btn-secondary-clean {
            flex: 0 0 auto;
            width: 32px;
            height: 32px;
            padding: 0;
            border-radius: 50%;
            justify-content: center;
        }

            .btn-secondary-clean span {
                display: none; 
            }

        .btn-attach {
            flex: 0 0 auto;
            width: 32px;
            height: 32px;
            padding: 0;
            border-radius: 50%;
        }

       .user-info-grid {
                grid-template-columns: 1fr;
       }

        .password-row {
            flex-direction: column;
        }

        .password-rules {
            width: 100%;
            max-width: none;
            margin-top: 8px;
        }
        .password-rules-floating {
            list-style: none;
            position: static;
            margin-top: 10px;
            width: 100%;
            box-shadow: none;
        }

        body {
            font-size: 14px;
        }

        h1 {
            font-size: 20px;
        }

        h2 {
            font-size: 18px;
        }

        .card {
            padding: 15px;
        }

        .table-clean {
            font-size: 13px;
        }

        .sidebar-item {
            font-size: 14px;
        }

        .sidebar {
            position: fixed;
            top: 60px;
            left: -250px;
            width: 240px;
            height: calc(100vh - 60px);
            z-index: 1000;
            transition: left 0.3s ease;
        }

            .sidebar.open {
                left: 0;
            }


        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.4);
            z-index: 999;
        }

        .menu-btn {
            display: block;
            font-size: 28px;
            padding: 8px;
            border-radius: 6px;
        }

            .menu-btn:hover {
                background: rgba(255,255,255,0.1);
            }

        .main-content {
            padding: 15px;
        }

        .search-box {
            width: 100%;
            max-width: 300px;
        }

        .system-name {
            display: none;
        }

        .logo-img {
            width: 50px;
        }

        .navbar-icon {
            font-size: 18px;
        }

        .desktop-only {
            display: none;
        }

        .mobile-only {
            display: flex;
        }

        .profile-icon {
            display: none;
        }

        .profile-btn {
            background: transparent;
            padding: 4px;
        }

        .top-navbar .perfil-avatar {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient( 135deg, #499724, #1b5e20 );
            color: white;
            font-weight: 700;
            font-size: 15px;
            letter-spacing: 1px;
        }

        .top-navbar .profile-name {
            display: none;
        }
    }
