/* Custom styles for Cuotas Web App */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}
.htmx-request.htmx-indicator {
    opacity: 1;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.sidebar-link-default {
    color: rgb(148 163 184);
    transition: background-color 150ms, color 150ms;
}
.sidebar-link-default:hover {
    background-color: rgb(51 65 85);
    color: rgb(255 255 255);
}
.sidebar-link-active {
    background-color: rgb(14 165 233 / 0.15);
    color: rgb(255 255 255);
    border-left: 3px solid rgb(14 165 233);
    padding-left: calc(0.75rem - 3px);
}

.sidebar-group-label {
    padding-left: 0.75rem;
    padding-bottom: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(100 116 139);
}

/* ── Controles de formulario ────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: rgb(15 23 42);
    background-color: #fff;
    border: 1px solid rgb(203 213 225);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgb(14 165 233);
    box-shadow: 0 0 0 3px rgb(14 165 233 / 0.12);
}

/* Especificidad 0,0,2 para ganar al preflight de Tailwind CDN (0,0,1) */
div select,
td select,
th select {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1.125rem 1.125rem;
    padding-right: 2.25rem;
    cursor: pointer;
}

input[type="text"]:disabled,
input[type="number"]:disabled,
input[type="date"]:disabled,
select:disabled,
textarea:disabled {
    background-color: rgb(248 250 252);
    color: rgb(148 163 184);
    cursor: not-allowed;
}
