/* vistas.css - Estructura de vistas, layouts y paneles principales */

/* Layout Principal */
#app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Sidebar */
aside {
    width: 260px;
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.brand:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

.sidebar-logo-bottom {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-logo-bottom:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}

.brand h1 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--text-main), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    background-color: var(--bg-hover);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(194, 94, 67, 0.15) 0%, rgba(194, 94, 67, 0) 100%);
    border-left: 3px solid var(--primary);
    padding-left: calc(1.25rem - 3px);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-item:hover svg {
    transform: translateX(2px);
}

/* User Info Panel in Sidebar */
.user-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #ffffff;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-app);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    background-color: var(--danger-bg);
}

/* Main Area */
main {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100% - 260px);
    max-width: calc(100% - 260px);
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    main {
        padding: 1.25rem 1.25rem;
    }
}

@media (max-width: 768px) {
    main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
    }
}

/* Secciones */
.app-section {
    display: none;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-section.active {
    display: block;
}

/* Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Custom CSS Bar Chart */
.bar-chart-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.bar-name {
    font-weight: 500;
}

.bar-value {
    color: var(--text-muted);
}

.bar-track {
    height: 10px;
    background-color: var(--bg-input);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top Rooms list */
.room-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.room-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.room-count {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

/* Login Panel Layout */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 1.5rem;
}

.login-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-main);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.login-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 20px rgba(194, 94, 67, 0.4);
}

.login-logo svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

#login-error-msg {
    color: var(--danger);
    background-color: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: none;
    text-align: center;
}

/* Layout for Tareas (Trabajos): Pendientes siempre encima y Completados abajo discreto */
.tasks-columns {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.task-column {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-main);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-column.completed-column {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.05);
    opacity: 0.82;
    transition: opacity 0.2s ease;
}

.task-column.completed-column:hover {
    opacity: 1;
}

.task-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.task-column-header.pending { 
    border-color: var(--warning); 
}

.task-column-header.done { 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
}

.task-column-header.done .task-column-title {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.task-column-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-count-badge {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    min-height: 60px;
}

/* En pantallas anchas se muestran en 2 columnas para aprovechar el espacio */
@media (min-width: 900px) {
    .task-list {
        grid-template-columns: 1fr 1fr;
    }
}

/* Pendientes en "masonry": filas de 1px y cada ficha ocupa tantas como mida (span calculado en JS),
   de modo que las fichas cortas se apilan na columna do lado dunha ficha longa */
.task-list.task-list-masonry {
    grid-auto-rows: 1px;
    row-gap: 0;
    align-items: start;
}

.task-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.task-item.completed {
    background-color: rgba(255, 255, 255, 0.015);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    opacity: 0.85;
}

.task-item-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    color: var(--text-color);
}

/* Completadas: compactas, unha soa liña */
.task-item.completed {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
}

.task-item.completed:hover {
    transform: none;
}

.task-item.completed .task-item-desc {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
}

.task-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .task-item-date {
        display: none;
    }
}

/* Título / descripción más gris en tareas completadas */
.task-item.completed .task-item-desc {
    color: var(--text-muted) !important;
    font-weight: 400;
}

.task-item.completed .task-device-link {
    color: var(--text-muted);
}

body.light-theme .task-column.completed-column {
    background-color: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .task-column-header.done {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .task-item.completed {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.task-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-device-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.task-device-link:hover {
    text-decoration: underline;
}

.task-actions {
    display: flex;
    gap: 0.35rem;
}

/* Bloque plegable de datos técnicos no formulario de tarefa */
.task-tech-details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
}

.task-tech-details > summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.task-tech-details[open] > summary {
    margin-bottom: 0.75rem;
}

/* UNIFIED INVENTARIO STYLING */
.inventario-grupos-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.location-group {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-main);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.location-group.flat-ip-group {
    overflow: hidden;
}

.location-group:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.location-title {
    display: flex;
    align-items: center;
    color: var(--text-main);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.location-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

.arrow-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.location-body {
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease, padding 0.3s ease;
}

.location-group.flat-ip-group .location-body {
    overflow: hidden;
    max-height: none;
    overflow-x: hidden;
}

.location-body.collapsed {
    max-height: 0;
    opacity: 0;
    border-bottom: none;
}

.location-header + .location-body.collapsed {
    border-top: none;
}

.location-header:hover .arrow-icon {
    color: var(--text-main);
}

.location-body.collapsed ~ .location-header .arrow-icon {
    transform: rotate(-90deg);
}

/* =========================================================
   ESTILOS COMPACTOS E RESPONSIVOS PARA TÁBOAS DE INVENTARIO
   ========================================================= */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.inventario-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: auto;
}

.inventario-table th,
.data-table th {
    padding: 0.55rem 0.65rem !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.inventario-table td,
.data-table td {
    padding: 0.45rem 0.65rem !important;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
}

/* Columna IP: ancho xusto */
.inventario-table .col-ip {
    width: 85px;
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
}

/* Columna Dispositivo */
.inventario-table .col-device {
    width: 140px;
    min-width: 110px;
}

.inventario-table .col-device > div:first-child {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Columna Espazo (na vista IP flat) */
.inventario-table .col-aula {
    width: 120px;
    min-width: 90px;
    font-size: 0.85rem;
}

.inventario-table .col-aula > div {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Columna Detalles: expande de xeito equilibrado e limita a 2 liñas limpas */
.inventario-table .col-details {
    width: auto;
    min-width: 170px;
}

.inventario-table .details-text {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: normal;
}

/* Columna SO */
.inventario-table .col-so {
    width: 140px;
    min-width: 105px;
    font-size: 0.84rem;
    line-height: 1.3;
}

/* Columna Tipo / Badges: axustada á dereita */
.inventario-table .col-type {
    width: 95px;
    white-space: nowrap;
    text-align: right;
}

.inventario-table .col-type > div {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    justify-content: flex-end;
}

/* Micro-badges de dispositivo en modo móbil (ocultos en escritorio) */
.mobile-device-badges {
    display: none !important;
}

/* En canto a pantalla colle modo móbil / estreito (<= 768px), ocultar a columna Tipo para dar espazo limpo */
@media (max-width: 768px) {
    .inventario-table th.col-type,
    .inventario-table td.col-type {
        display: none !important;
    }

    .mobile-device-badges {
        display: flex !important;
        gap: 0.25rem;
        align-items: center;
        margin-top: 0.25rem;
        flex-wrap: wrap;
    }

    .mobile-device-badges .badge {
        font-size: 0.65rem !important;
        padding: 0.1rem 0.35rem !important;
        line-height: 1.2 !important;
        border-radius: 4px !important;
    }

    .inventario-table .col-details {
        min-width: 100px;
    }

    .inventario-table .col-device {
        min-width: 95px;
    }

    .inventario-table th,
    .inventario-table td {
        padding: 0.4rem 0.45rem !important;
    }
}

@media (max-width: 640px) {
    .inventario-table th.col-so,
    .inventario-table td.col-so {
        display: none !important;
    }
}

/* =========================================================
   CONTROL ÚNICO DESPLEGABLE CON BUSCA INTEGRADA (COMBOBOX)
   ========================================================= */
.combobox-wrapper {
    position: relative;
    width: 100%;
}

.combobox-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.combobox-icon-search {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.combobox-input {
    width: 100%;
    padding-left: 2.2rem !important;
    padding-right: 3.4rem !important;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    text-overflow: ellipsis;
}

.combobox-input:focus {
    cursor: text;
}

.combobox-btn-clear {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    width: 22px;
    height: 22px;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: color 0.15s ease, background 0.15s ease;
}

.combobox-btn-clear:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

.combobox-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 2;
}

.combobox-wrapper.open .combobox-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary);
}

.combobox-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #1f1f23;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1050;
    padding: 0.35rem 0;
}

body.light-theme .combobox-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}

.combobox-group-header {
    padding: 0.5rem 0.85rem 0.25rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(24, 24, 27, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 2;
}

body.light-theme .combobox-group-header {
    background: #f8fafc;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.combobox-item {
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.12s ease, color 0.12s ease;
    user-select: none;
}

.combobox-item:hover,
.combobox-item.highlighted {
    background-color: rgba(194, 94, 67, 0.18);
    color: var(--primary);
}

body.light-theme .combobox-item:hover,
body.light-theme .combobox-item.highlighted {
    background-color: rgba(194, 94, 67, 0.1);
    color: var(--primary);
}

.combobox-item.selected {
    background-color: rgba(194, 94, 67, 0.25);
    color: var(--primary);
    font-weight: 600;
}

.combobox-item.empty-option {
    color: var(--text-muted);
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.25rem;
}

.combobox-item-badge {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    margin-left: 0.5rem;
    flex-shrink: 0;
    font-weight: 600;
}

body.light-theme .combobox-item-badge {
    background: rgba(0, 0, 0, 0.05);
}

.combobox-no-results {
    padding: 1.25rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Agrupación compacta de dous campos a metade de ancho */
.form-group-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    min-width: 0;
}

.form-group-dual .form-group {
    margin: 0;
    min-width: 0;
}

.form-group-dual .form-control {
    min-width: 0;
    padding: 0.65rem 0.55rem;
}

.form-group-dual .form-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@media (max-width: 420px) {
    .form-group-dual {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}


