:root {

    --status-assigned: #d2e2d2;
    --status-unassigned: #f9e8fe;
    --primary-color: #2e80df;
    --primaryhover-color: #2568b6;
    --secondary-color: #0066ff;
    --secondaryhover-color: #021f4a;
    --accent-color: #fa5456;
    --accent-hover: #fa5456;
    --validate-color: #34e83d;
    --bg-color: #f3f4f6;
    --bg-active: #fdfdfd;
    --bg-card: #ffffff;
    --bg-side: #f4f4f4;
    --bg-hover: #f7f7f7;
    --text-color: #024648;
    --text-muted: #6b7280;
    --text-gray: #555;
    --white: #ffffff;
    --gray-light: #ddd;
    --gray-dark: #333;
    --bg-gradient: radial-gradient(circle at top left, #2e80df, #021f4a);
    --gray-border: #ccc;
    --border-color: #e2e8f0;


    --font-base: 13px;
    --font-small: 10px;
    --font-medium: 12px;
    --font-large: 14px;
    --font-section: 16px;


    --padding-small: 6px;
    --padding-medium: 12px 18px;
    --padding-large: 15px 25px 24px 25px;
    --padding-large-l: 15px;


    --radius-small: 4px;
    --radius-medium: 10px;
    --radius-btn-menu: 15px 0px 0px 0px;
    --radius-large: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-circle: 50%;


    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.1);


    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);


    --breakpoint-lg: 768px;
    --breakpoint-md: 480px;
    --breakpoint-sm: 385px;


    --logo-ppal: 20px;
    --logo-height: 22px;
    --logo-main: 60px;
    --avatar-size: 32px;
    --icon-size: 16px;
    --icon-circle: 60px;
    --logo-welcome-page: 60px;
    --btn-padding: 8px 16px;
}


* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

select {
    margin: 0 !important;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

h2 {
    margin-bottom: 10px;
}

input::placeholder {
    opacity: 0.3;
}



td select,
td input {
    color: var(--primary-color);
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 8px 8px;
    background-image: linear-gradient(rgba(2, 31, 74, 0.8), rgba(2, 31, 74, 0.5)), url('../images/ciudades.webp');
    background-size: cover;
    background-position: right;

    color: var(--white);
}

h2 {
    margin-bottom: 20px;
    font-size: var(--font-section);
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    border: 1px solid transparent;
    background-clip: content-box;
}


* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

h1 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

p {
    margin-bottom: 20px;
}

a {
    text-decoration: none;
}

#dk {
    position: relative;
    width: fit-content;
    max-width: 95vw;
    height: 100vh;
    max-height: 95vh;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: var(--padding-medium);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar_brand-item {
    display: flex;
    justify-content: center;
    order: 1;
    padding: var(--padding-medium);
}


.logo-alt {
    height: var(--logo-ppal);
}

.logo-alt-mobile {
    display: none;
}

.logo-icon {
    height: var(--logo-welcome-page);
    margin: var(--padding-large);
}

.user-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--padding-medium);
    order: 2;
    padding-right: 35px;
}

.user-avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: var(--radius-circle);
    object-fit: cover;
}

.user-name {
    font-size: var(--font-small);
    line-height: 1.2;
    text-align: right;
    color: var(--text-gray);
}

.user-name span {
    font-size: var(--font-medium);
    color: var(--primary-color);
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem;
}

.welcome-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    text-align: center;
    color: var(--gray-dark);
    background-color: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    animation: fadeIn 1s ease-out;
}

.dashboard-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    height: 100%;
    max-height: 93%;
    padding: var(--padding-large);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.dashboard-active {
    max-width: 100%;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 10;
    min-width: 600px;
    min-height: 90%;
    max-height: 100%;
}

.table-scroll-wrapper {
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    animation: rowIn 2s ease-out;
    padding-bottom: 10px;
    overflow-anchor: none;
    scroll-behavior: auto;
}

.table-total-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.virtual-scroll-body {
    position: relative;
}


.btn-nav {
    background-color: transparent !important;
    border: none;
    border-radius: var(--radius-medium);
    font-size: var(--font-medium);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-medium);
}

.btn-nav:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}

.dk-select-container {
    margin-left: 25px;
}

.dk-select {
    color: var(--text-color);
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    font-size: var(--font-medium);
    font-weight: 500;
    transition: var(--transition-medium);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232e80df'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.btn {
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background-color: var(--white);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: scale(0.96);
}

.btn-save {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    background: rgba(46, 128, 223, 0.05);
    color: var(--primary-color);
    border-radius: 50%;
    border: 1px solid rgba(46, 128, 223, 0.1);
}

.btn-save:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(46, 128, 223, 0.3);
}

.btn-save.saved {
    background: #22c55e !important;
    color: white !important;
    border-color: #22c55e !important;
}

background-repeat: no-repeat;
background-position: right 10px center;
background-size: 16px;
}

.dk-select:hover {
    border-color: var(--primary-color);
    box-shadow: none !important;
    background-color: transparent !important;
}

.dk-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 128, 223, 0.1);
}

.dk-select option {
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 12px 20px;
}

.dk-select option:hover {
    background-color: var(--bg-hover);
}

.toggle-btn {
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: var(--radius-medium);
    font-size: var(--font-medium);
    cursor: pointer;
    border: none;
    transition: background var(--transition-medium) ease, transform 0.3s ease;
    box-shadow: var(--shadow-light);
}

.toggle-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.toggle-btn:disabled {
    background-color: var(--gray-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

button:hover,
select:hover,
input:hover,
textarea:hover {
    box-shadow: var(--shadow-hover);
}



.btn {
    padding: var(--btn-padding);
    border-radius: var(--radius-medium);
    font-size: var(--font-base);
    cursor: pointer;
    border: none;
    transition: background var(--transition-medium) ease;
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff;
    color: #444;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.10);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.btn .fa-solid {
    width: var(--icon-size);
    height: var(--icon-size);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn.saved {
    background-color: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
    transition: all 0.3s ease;
}

.btn:disabled {
    background-color: #bbb;
    cursor: not-allowed;
}

.btn-save,
.btn-delete,
.btn-lineissue,
.btn-download {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-module {
    background-color: var(--secondary-color);
    padding: 5px 9px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    margin: 4px;
    color: white;
    cursor: pointer;
}

.btn-module i {
    font-size: var(--font-section);
    color: var(--white) !important;

}

.btn-module i.fa-chain {
    font-size: var(--font-small);
}

.btn-module:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-save:hover,
.btn-delete:hover,
.btn-lineissue:hover,
.btn-download:hover,
.btn-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-save {
    color: var(--primary-color);
}

.btn-delete {
    color: var(--accent-color);
}

.btn-lineissue {
    color: var(--accent-color);
}


.new-row {
    height: 42px;
}

.new-row td {
    padding: 5px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.new-row .cell-select {
    display: block;
    width: 100%;
}

.new-row-action {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.btn-save-new {
    margin: 0 !important;
    padding: var(--radius-medium);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.btn-filter:active {
    background-color: var(--secondary-color);
    color: var(--white);
}

.menu-toggle {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 100%;
    font-size: 28px;
    border: none;
    border-radius: var(--radius-btn-menu);
    background-color: var(--bg-gradient);
    transition: var(--transition-slow) ease-in-out;
}

.menu-toggle:hover {
    width: 60px;

}

.menu-toggle.active {
    width: 60px;
    background-color: var(--accent-color);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 2px 0;
    background-color: var(--white);
    transform-origin: center;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    margin-left: 15px;
    transform: rotate(45deg) translateY(10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: rotate(45deg) translateY(10px);
}

.menu-toggle.active span:nth-child(3) {
    margin-left: 15px;
    transform: rotate(-45deg) translateY(-10px);
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    padding: 80px var(--padding-medium) var(--padding-medium);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-large);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateX(100%);
    transition: var(--transition-medium);
    z-index: 2000;
}

.side-menu.open {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
}


.logout-icon {
    color: var(--accent-color);
    font-size: var(--logo-height);
    transition: transform 0.6s ease;
}

.logout-icon:hover {
    transform: rotate(360deg);
}

#logoutForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    background: transparent;
    box-shadow: none;
    padding: 0.5rem;
    animation: fadeInUp 0.4s ease-out;
    height: auto;
}

.logout-btn {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-medium);
    padding: 0.5rem 1rem;
    font-size: var(--font-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.logout-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn.cancel {
    background-color: var(--gray-light);
    color: var(--gray-dark);
}

.logout-btn.cancel:hover {
    background-color: #bfbfbf;
}

.logout-btn .spinner {
    width: 15px;
    height: 15px;
}


.table-container {
    max-width: 100%;
    min-height: 150px;
    border-radius: var(--radius-large);
    overflow: auto;
    scrollbar-width: none;
    box-shadow: var(--shadow-soft);
    background: var(--white);
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

.table-container h2 {
    text-align: center;
}

.row-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease;
    accent-color: var(--primary-color);
}

#selectAllRows.row-select {
    border: none;
}

.row-select:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.row-select:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

tr.selected {
    background-color: rgba(46, 128, 223, 0.08) !important;
    box-shadow: inset 6px 0 0 0 var(--primary-color) !important;
}

.row-saved-success {
    animation: row-success-pulse 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes row-success-pulse {
    0% {
        background-color: rgba(34, 197, 94, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

table {
    width: auto;

    min-width: unset;

    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    table-layout: auto;
    margin-bottom: 16px;
}

td,
th {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.table-fixed {
    table-layout: fixed !important;
}


.table-menu {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.table-menu i {
    color: var(--secondary-color);
}

.btn-active i {
    color: var(--white);
}

.table-menu .btn {
    font-weight: 600;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table-menu .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(46, 128, 223, 0.15);
    transform: translateY(-3px);
}

.table-menu .btn-active {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border-color: var(--primary-color) !important;
}

.table-menu .btn-active i {
    color: var(--white) !important;
}

.table-menu .btn-active:hover {
    background-color: var(--primaryhover-color) !important;
}

thead {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 20;
}

thead th {
    color: var(--white);
    padding: 18px 12px;
    text-align: center;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background: var(--primary-color);

    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#tableBody tr {
    transition: background-color 0.2s ease;
}

#tableBody tr:hover {
    background-color: rgba(46, 128, 223, 0.04) !important;
    box-shadow: inset 4px 0 0 0 var(--primary-color);
}

th div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
}

th input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-small);
    font-size: 12px;
    color: white;
    transition: var(--transition-medium);
}

th input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

th input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    outline: none;
}

th.sortable {
    cursor: pointer;
}

.sort-indicator::after {
    content: "↕";
    font-size: 11px;
    margin-left: 6px;
    opacity: 0.35;
}

th.sorted-asc .sort-indicator::after {
    content: "▲";
    opacity: 1;
}

th.sorted-desc .sort-indicator::after {
    content: "▼";
    opacity: 1;
}

.filter {
    color: var(--secondary-color);
}

.filter::placeholder {
    color: var(--primary-color);
    padding: 0px;
}

td {
    padding: 0 15px;
    height: 45px !important;
    min-height: 48px !important;
    min-width: 80px;
    max-width: none;
    text-align: center;
    font-size: var(--font-small);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: default;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

#tableBody tr {
    transition: background-color 0.15s ease;
}

td.first-column {
    min-width: 10px !important;
}

td[contenteditable="true"] {
    position: relative;
    cursor: cell;
    transition: var(--transition-fast);
}

td[contenteditable="true"]:hover {
    box-shadow: inset 0 0 0 1px rgba(46, 128, 223, 0.3);
}

td[contenteditable="true"]:focus {
    outline: none;
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--primary-color);
    z-index: 2;
}


tr:not(.vspacer) td:first-child,
.checkbox-column {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: var(--bg-card) !important;
    border-right: 1px solid var(--border-color);
    text-align: center;
    padding: 0 !important;
}


tr.vspacer td {
    position: static !important;
    background: transparent !important;
    border: none !important;
}

th:first-child {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 30 !important;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primaryhover-color) 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    min-width: 70px !important;
    padding: 0 !important;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 15;
}


td:has(.status-assigned),
td:has(.status-unassigned),
td[data-field*="situacion"],
td[data-field*="estado"],
td[data-field*="nomen"],
td[data-field*="project"],
td[data-field*="trabajo"],
td[data-field*="comment"],
td[data-field*="time"],
td[data-field*="duration"] {
    min-width: 250px !important;
    overflow: visible !important;
    display: table-cell;
    vertical-align: middle;
}

.status-assigned,
.status-unassigned,
.status-pending {
    min-width: 100% !important;
    width: fit-content !important;
    min-height: 100% !important;
    height: !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    width: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px;
}

.action-column {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    text-align: center;
    padding: 0 !important;
}

.status-assigned {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

.status-assigned::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 6px;
}

.status-unassigned {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.status-unassigned::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-right: 6px;
}

.status-pending {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

.status-pending::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #f59e0b;
    border-radius: 50%;
    margin-right: 6px;
}

.status-controlled {
    background-color: #fffbeb;
    color: black;
    border: 1px solid #fef3c7;
}

.status-controlled::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 6px;
}


.skeleton-row td {
    padding: 15px;
}

.skeleton-bar {
    height: 20px;
    width: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.styled-select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-small);
    font-size: 12px;
    opacity: 0.6;
    color: white;
    transition: var(--transition-medium);
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='5'><path fill='%23333' d='M0 0l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#tableBody .styled-select {
    color: var(--text-dark) !important;
    font-size: var(--font-small) !important;
}

.module {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: var(--padding-medium);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    transition: var(--transition-medium);
}

.module:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-color);
}

.module h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.module .module-content {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.module i,
.module .fa-solid {
    font-size: var(--logo-height);
    color: var(--secondary-color);
}

.loader,
.table-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
    transition: opacity 0.2s ease-in-out;
}

.spinner {
    width: 25px;
    height: 25px;
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    font-family: system-ui, sans-serif;
}


.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.4);
}

.modal-content.enhanced {
    position: relative;
    background: white;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    width: 400px;
    text-align: center;
    color: var(--primary-color);
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-icon {
    font-size: 1.6rem;
    color: #00b4d8;
}

.modal-message {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#modalCancel.btn,
#modalOk.btn {
    width: 100px;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

#modalOk.btn-save {
    background: linear-gradient(135deg, #00b4d8, #0096c7);
    color: #fff;
}

#modalCancel.btn-cancel {
    background: var(--accent-color);
    color: #eee;
}

#modalOk.btn-save:hover~.btn-cancel,
#modalOk.btn-save:focus~.btn-cancel {
    opacity: 0.6;
    transform: scale(0.97);
}

#modalCancel.btn-cancel:hover~.btn-save,
#modalCancel.btn-cancel:focus~.btn-save {
    opacity: 0.6;
    transform: scale(0.97);
}

#modalOk.btn-save:hover {
    background: linear-gradient(135deg, #0096c7, #0077b6);
    transform: translateY(-2px);
}

#modalCancel.btn-cancel:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}


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

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

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


@media(max-width: 1200px) {
    #dk {

        max-height: 150vh;
    }

    .dashboard-active {
        height: 100%;
        min-height: 80vh;
    }
}


@media(max-width: 768px) {
    .navbar {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px
    }

    .logo-altavia {
        margin-left: -20px;
    }

    .logo-alt-desktop {
        display: none;
    }

    .logo-alt-mobile {
        display: block;
    }

    .user-info {
        order: 1;
        padding-right: 0px;
        justify-content: center;

    }

    .login-corporate-logo img {
        max-width: 80vw;
    }

    .dashboard-container {
        height: min-content;
        padding: var(--padding-large-l);

    }

    .dashboard-active {
        min-width: 300px;
    }


    .side-menu {
        width: 80%;
        padding: 60px 15px;
    }

    table {
        width: fit-content;
    }
}

@media(max-width: 528px) {
    .module h2 {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    .logout-btn,
    .google-btn {
        padding: 6px 12px;
        font-size: var(--font-medium);
    }

    .user-info {
        width: 100%;
    }

    .menu-toggle {
        width: 35px;
    }

    .spinner {
        width: 18px;
        height: 18px;
    }
}

@media(max-width: 400px) {
    .btn i {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-right: 0px !important;
        padding: 0px !important;
    }

    .table-menu-label {
        display: none !important;
    }

    .dashboard-active {
        flex: none;
        width: 100%;
        height: auto;
        padding: 15px;
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

}

.form-scroll-container {
    max-height: 70vh;
    width: fit-content;
    overflow-y: auto;
    overflow-x: auto;
    padding: 10px 15px;
    scrollbar-width: none;
    scrollbar-color: var(--primary-color) #e0e0e0;
    transition: all 1s ease-in;
}

.form-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.form-scroll-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.form-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.cell-select {
    cursor: pointer;
    display: inline-block;
    min-height: 18px;
}

.cell-select:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cell-select.new {
    color: #888;
    font-style: italic;
}


@keyframes rowIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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



.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    background-image: url('../images/ciudades.webp');
    background-size: cover;
    background-position: right;
    z-index: 9999;
    padding: 20px;
    overflow: hidden;
    flex-direction: column;
}

.login-corporate-logo {
    position: relative;
    top: 0;
    left: 0;
    width: fit-content;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    margin-bottom: 5vh;
    gap: 10px;
}

.login-corporate-logo img {
    max-height: 15vh;
    max-width: 70vw;
}

.login-wrapper::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(46, 128, 223, 0.2);
    filter: blur(80px);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-wrapper::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(250, 84, 86, 0.1);
    filter: blur(100px);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.login-card {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-2xl);
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.login-card h1,
.login-card h2,
.login-card p {
    color: var(--primary-color) !important;
}

.login-header {
    margin-bottom: 20px;
}

.logo-main {
    height: var(--logo-main);
    width: auto;
}

.login-body h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
}

.login-body p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-action {
    background: var(--bg-lightest);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.login-hint {
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8 !important;
    margin-bottom: 15px !important;
}

.google-btn.premium {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.google-btn.premium:hover {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(46, 128, 223, 0.2);
    transform: translateY(-2px);
}

.google-btn.premium img {
    width: 20px;
    height: 20px;
}

.login-footer {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-gray) !important;
}


.icon-circle {
    width: var(--icon-circle);
    height: var(--icon-circle);
    background: var(--success-bg);
    color: var(--success-text);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
}

.divider {
    height: 1px;
    background: var(--border-color);
    width: 100%;
    margin: 10px 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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