:root {
    /* Paleta base (HSL) */
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 300 60% 50%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221 83% 53%;
    --radius: 0.75rem;

    /* Sidebar */
    --sidebar-background: 222.2 84% 4.9%;
    --sidebar-foreground: 210 40% 98%;
    --sidebar-primary: 221 83% 53%;
    --sidebar-primary-foreground: 210 40% 98%;
    --sidebar-accent: 217.2 32.6% 17.5%;
    --sidebar-accent-foreground: 210 40% 98%;
    --sidebar-border: 217.2 32.6% 17.5%;
    --sidebar-ring: 221 83% 53%;

    /* Colores personalizados de Trantor */
    --trantor-blue: 221 83% 53%;
    --trantor-purple: 269 64% 63%;
    --trantor-green: 142 76% 36%;
    --trantor-yellow: 48 96% 53%;
    --trantor-red: 0 84% 60%;
    --trantor-gray: 220 13% 91%;

    /* Sidebar dimensions */
    --sidebar-width: 280px;
    --sidebar-width-icon: 48px;
}

html,
body {
    height: 100%;
}

/* Hide Alpine x-cloak elements until initialized */
[x-cloak] {
    display: none !important;
}



/* --------------------------------------------------------------
    Sidebar
-------------------------------------------------------------- */

.group-label {
    transition-duration: 200ms;
    display: flex;
    height: 2rem;
    flex-shrink: 0;
    align-items: center;
    border-radius: 0.375rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    outline: none;
    transition-property: margin, opacity;
    transition-timing-function: linear;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(209 213 219);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.group-label:focus-visible {
    box-shadow: 0 0 0 2px hsl(var(--sidebar-ring));
}

.group-label>svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.group[data-collapsible="icon"] .group-label {
    margin-top: -2rem;
    opacity: 0;
}

/* --------------------------------------------------------------
    Card Component
-------------------------------------------------------------- */

.card {
    border-radius: 1rem;
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 0;
    box-shadow: 0 2px 2px 0 rgb(0 0 0 / 0.05);
}

.card-header {
    padding: 1.3rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.card-body {
    padding: 2rem;
}

.interior-card {
    border-radius: 1rem;
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
}

/* Divider for card footers matching header border color */
.card-divider {
    border-top: 1px solid #f1f5f9;
}

/* --------------------------------------------------------------
    Others
-------------------------------------------------------------- */

.img-registro-cte {
    margin-top: 15px;
    margin-bottom: 15px;
    max-width: 30%;
}


/* --------------------------------------------------------------
    Evaluation detail
-------------------------------------------------------------- */

.indicador-valor {
    transition: all 0.3s;
    border: 3px solid #0451E4;
    margin-top: 15px;
}

.valor-uno {
    margin-left: 45%;
    font-size: small;
}

.valor-dos {
    margin-left: 25%;
    font-size: small;
}

.descripcion-valor {
    text-align: end;
    color: white;
    display: inline;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: small;
}

/* --------------------------------------------------------------
    Badges (global)
   - Base visual para chips con utilidades Tailwind de color
-------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 0.375rem; /* md */
    padding-top: 0.25rem;    /* py-1 */
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;    /* px-2 */
    padding-right: 0.5rem;
    font-size: 0.75rem;      /* text-xs */
    line-height: 1rem;       /* leading-4 */
    font-weight: 600;        /* semibold */
}

.badge.pill {
    border-radius: 9999px;
}

.badge > iconify-icon {
    margin-right: 0.25rem; /* mr-1 */
}

/* --------------------------------------------------------------
    Input Groups & Selects
   - Consistencia visual con prefijos y selects custom
-------------------------------------------------------------- */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem; /* rounded-md */
    overflow: hidden;
    background-color: hsl(var(--card));
}

.input-group .addon {
    display: inline-flex;
    align-items: center;
    padding-left: 0.75rem; /* px-3 */
    padding-right: 0.75rem;
    color: #475569; /* text-slate-600 */
    background-color: #f1f5f9; /* bg-slate-100 */
}

.input-group .field {
    flex: 1 1 auto;
    border: 0;
    padding-left: 0.75rem; /* px-3 */
    padding-right: 0.75rem;
    padding-top: 0.5rem;  /* py-2 */
    padding-bottom: 0.5rem;
    min-height: 42px;
    background: transparent;
    outline: none;
}

.input-group .field:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(70,105,250,0.18); /* suave */
}

/* Select con aspecto consistente */
.select-control {
    width: 100%;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem; /* rounded-md */
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    padding-left: 0.75rem; /* px-3 */
    padding-right: 2.25rem; /* espacio para flecha */
    padding-top: 0.5rem;  /* py-2 */
    padding-bottom: 0.5rem;
    min-height: 42px;
    line-height: 1.5;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgb(71,85,105)'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(70,105,250,0.18);
}

/* Input de texto standalone (no input-group) */
.input-control {
    width: 100%;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem; /* rounded-md */
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    padding-left: 0.75rem; /* px-3 */
    padding-right: 0.75rem;
    padding-top: 0.5rem;  /* py-2 */
    padding-bottom: 0.5rem;
    min-height: 42px;
    line-height: 1.5;
}

.input-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(70,105,250,0.18);
}

/* Safari fix para selects dentro de contenedores flex */
@supports (-webkit-touch-callout: none) {
    .select-control {
        background-position: right 0.75rem center;
    }
}
