/* ========================================================= */
/* DISPOSITIVOS - HUMIDI-TEC                                */
/* ========================================================= */

.devices-page {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;

    color: var(--text-primary);
}


/* ========================================================= */
/* ENCABEZADO                                                */
/* ========================================================= */

.devices-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.devices-header-copy {
    min-width: 0;
}

.devices-label,
.devices-section-heading > span {
    display: block;

    margin-bottom: 4px;

    color: var(--green-700);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.15px;
}

.devices-header h1 {
    margin: 0;

    color: var(--green-950);

    font-size: 30px;
    font-weight: 850;
    line-height: 1.15;
}

.devices-header p {
    max-width: 740px;

    margin: 6px 0 0;

    color: var(--text-secondary);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}


/* ========================================================= */
/* BOTÓN AGREGAR                                             */
/* ========================================================= */

.devices-primary-button,
.devices-add-button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 8px 15px;

    color: #ffffff;
    background: var(--green-700);

    border: 1px solid var(--green-800);
    border-radius: 9px;

    font: inherit;
    font-size: 12px;
    font-weight: 850;

    cursor: pointer;

    box-shadow:
        0 5px 13px rgba(8, 116, 67, .13);

    transition:
        background-color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.devices-primary-button:hover,
.devices-add-button:hover {
    background: var(--green-800);
    border-color: var(--green-900);

    transform: translateY(-1px);
}

.devices-add-button svg {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;
}


/* ========================================================= */
/* ESTADO DEL SISTEMA                                        */
/* ========================================================= */

.system-status-card {
    min-height: 116px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 18px 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-left: 5px solid var(--green-600);
    border-radius: 14px;

    box-shadow: var(--shadow-small);
}

.system-status-card.attention {
    border-left-color: var(--teal-600);
}

.system-status-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;
}

.system-status-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;
    background: var(--green-700);

    border-radius: 12px;
}

.system-status-icon svg {
    width: 24px;
    height: 24px;
}

.system-status-label {
    display: block;

    margin-bottom: 2px;

    color: var(--green-700);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1px;
}

.system-status-copy h2 {
    margin: 0;

    color: var(--green-950);

    font-size: 20px;
    font-weight: 850;
}

.system-status-copy p {
    margin: 4px 0 0;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}


/* ========================================================= */
/* RESUMEN SISTEMA                                           */
/* ========================================================= */

.system-status-summary {
    display: flex;
    align-items: stretch;

    gap: 9px;

    flex-shrink: 0;
}

.system-summary-item {
    min-width: 115px;
    min-height: 54px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 8px 11px;

    background: var(--green-50);

    border: 1px solid var(--border);
    border-radius: 9px;
}

.system-summary-item span {
    color: var(--text-secondary);

    font-size: 9px;
    font-weight: 700;
}

.system-summary-item strong {
    margin-top: 2px;

    color: var(--green-950);

    font-size: 12px;
    font-weight: 850;
}

.system-refresh-button {
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 12px;

    color: var(--green-700);
    background: var(--surface);

    border: 1px solid var(--green-500);
    border-radius: 9px;

    font: inherit;
    font-size: 10px;
    font-weight: 850;

    cursor: pointer;
}

.system-refresh-button svg {
    width: 16px;
    height: 16px;
}

.system-refresh-button:hover:not(:disabled) {
    color: #ffffff;
    background: var(--green-700);
}

.system-refresh-button:disabled {
    opacity: .55;
    cursor: wait;
}


/* ========================================================= */
/* MENSAJE                                                   */
/* ========================================================= */

.devices-status-message {
    margin-top: 10px;

    padding: 11px 13px;

    color: var(--green-900);
    background: var(--green-100);

    border: 1px solid var(--green-500);
    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;
}

.devices-status-message[hidden] {
    display: none;
}


/* ========================================================= */
/* SECCIÓN                                                   */
/* ========================================================= */

.devices-section {
    margin-top: 28px;
}

.devices-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 12px;
}

.devices-section-heading h2 {
    margin: 0;

    color: var(--green-950);

    font-size: 22px;
    font-weight: 850;
}

.devices-section-heading p {
    margin: 4px 0 0;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
}

.devices-counter {
    min-height: 31px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 11px;

    color: #ffffff;
    background: var(--green-600);

    border-radius: 999px;

    font-size: 10px;
    font-weight: 850;

    white-space: nowrap;
}


/* ========================================================= */
/* RESUMEN DISPOSITIVOS                                      */
/* ========================================================= */

.devices-overview {
    min-height: 50px;

    display: flex;
    align-items: center;

    gap: 15px;

    margin-bottom: 11px;
    padding: 9px 13px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.devices-overview-item {
    display: flex;
    align-items: center;

    gap: 7px;
}

.devices-overview-item strong {
    color: var(--green-950);

    font-size: 16px;
    font-weight: 900;
}

.devices-overview-item > span:last-child {
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;
}

.overview-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    border-radius: 50%;
}

.overview-dot.connected {
    background: var(--green-500);
}

.overview-dot.available {
    background: var(--blue-500);
}

.overview-dot.offline {
    background: var(--text-muted);
}

.devices-overview-divider {
    width: 1px;
    height: 24px;

    background: var(--border);
}


/* ========================================================= */
/* TOOLBAR                                                   */
/* ========================================================= */

.devices-toolbar {
    display: grid;

    grid-template-columns:
        minmax(230px, 1.5fr)
        minmax(150px, .7fr)
        minmax(190px, .9fr)
        auto;

    align-items: end;

    gap: 10px;

    padding: 12px;

    background: var(--green-50);

    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 11px 11px 0 0;
}


/* BUSCADOR */

.devices-search {
    height: 41px;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 0 11px;

    background: var(--surface);

    border: 1px solid var(--green-400);
    border-radius: 8px;
}

.devices-search:focus-within {
    border-color: var(--green-700);

    box-shadow:
        0 0 0 3px rgba(8, 116, 67, .12);
}

.devices-search svg {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    color: var(--text-secondary);
}

.devices-search input {
    width: 100%;
    height: 100%;

    padding: 0;

    color: var(--text-primary);
    background: transparent;

    border: none;
    outline: none;

    font: inherit;
    font-size: 12px;
    font-weight: 650;
}


/* FILTROS */

.devices-filter label {
    display: block;

    margin-bottom: 5px;

    color: var(--green-900);

    font-size: 10px;
    font-weight: 800;
}

.devices-filter select {
    width: 100%;
    height: 41px;

    padding: 6px 31px 6px 10px;

    color: var(--text-primary);
    background: var(--surface);

    border: 1px solid var(--green-400);
    border-radius: 8px;

    font: inherit;
    font-size: 11px;
    font-weight: 700;

    outline: none;
}

.devices-filter select:focus {
    border-color: var(--green-700);

    box-shadow:
        0 0 0 3px rgba(8, 116, 67, .12);
}

.devices-clear-button {
    height: 41px;

    padding: 7px 12px;

    color: var(--green-700);
    background: var(--surface);

    border: 1px solid var(--green-500);
    border-radius: 8px;

    font: inherit;
    font-size: 10px;
    font-weight: 850;

    cursor: pointer;
}

.devices-clear-button:hover {
    color: #ffffff;
    background: var(--green-700);
}


/* ========================================================= */
/* TABLA                                                     */
/* ========================================================= */

.devices-table-wrapper {
    position: relative;

    overflow: auto;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 0 0 11px 11px;

    box-shadow: var(--shadow-small);
}

.devices-table {
    width: 100%;
    min-width: 900px;

    border-collapse: collapse;
}

.devices-table th {
    padding: 11px 13px;

    color: #ffffff;
    background: var(--green-800);

    border-bottom: 1px solid var(--green-950);

    font-size: 11px;
    font-weight: 850;

    text-align: left;
    white-space: nowrap;
}

.devices-table td {
    padding: 13px;

    color: var(--text-primary);

    border-bottom: 1px solid var(--border-soft);

    font-size: 12px;
    font-weight: 600;

    vertical-align: middle;
}

.devices-table tbody tr:last-child td {
    border-bottom: none;
}

.devices-table tbody tr:hover {
    background: var(--green-50);
}


/* ========================================================= */
/* NOMBRE DISPOSITIVO                                        */
/* ========================================================= */

.device-name-cell {
    display: flex;
    align-items: center;

    gap: 10px;
}

.device-table-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: var(--green-700);
    background: var(--green-100);

    border-radius: 8px;
}

.device-table-icon svg {
    width: 17px;
    height: 17px;
}

.device-name-copy {
    display: flex;
    flex-direction: column;
}

.device-name-copy strong {
    color: var(--green-950);

    font-size: 12px;
    font-weight: 850;
}

.device-name-copy small {
    margin-top: 2px;

    color: var(--text-secondary);

    font-size: 9px;
    font-weight: 650;
}


/* ========================================================= */
/* ESTADO                                                    */
/* ========================================================= */

.device-status-badge {
    min-width: 90px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}

.device-status-badge::before {
    content: "";

    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;
}

.device-status-badge.online {
    color: var(--green-800);
    background: var(--green-100);

    border: 1px solid var(--green-400);
}

.device-status-badge.online::before {
    background: var(--green-600);
}

.device-status-badge.offline {
    color: var(--text-secondary);
    background: var(--background);

    border: 1px solid var(--border);
}

.device-status-badge.offline::before {
    background: var(--text-muted);
}


/* ========================================================= */
/* VALORES TABLA                                             */
/* ========================================================= */

.device-table-main-value {
    color: var(--green-950);

    font-size: 11px;
    font-weight: 800;
}

.device-view-button {
    min-height: 33px;

    padding: 5px 11px;

    color: var(--green-700);
    background: var(--surface);

    border: 1px solid var(--green-400);
    border-radius: 7px;

    font: inherit;
    font-size: 10px;
    font-weight: 850;

    cursor: pointer;
}

.device-view-button:hover {
    color: #ffffff;
    background: var(--green-700);
}


/* ========================================================= */
/* VACÍO                                                     */
/* ========================================================= */

.devices-empty {
    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    text-align: center;
}

.devices-empty[hidden] {
    display: none;
}

.devices-empty-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;

    color: #ffffff;
    background: var(--green-700);

    border-radius: 10px;
}

.devices-empty-icon svg {
    width: 21px;
    height: 21px;
}

.devices-empty strong {
    color: var(--green-950);

    font-size: 14px;
    font-weight: 850;
}

.devices-empty p {
    margin: 4px 0 0;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;
}


/* ========================================================= */
/* DIALOG                                                    */
/* ========================================================= */

.device-dialog {
    width: min(
        650px,
        calc(100% - 28px)
    );

    max-height: calc(100vh - 28px);

    padding: 0;

    overflow: auto;

    color: var(--text-primary);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 15px;

    box-shadow:
        0 25px 70px rgba(4, 61, 39, .30);
}

.device-dialog::backdrop {
    background:
        rgba(4, 61, 39, .58);
}


/* ========================================================= */
/* HEADER DIALOG                                             */
/* ========================================================= */

.device-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding: 18px 20px;

    background: var(--green-900);
}

.device-dialog-header > div > span {
    display: block;

    margin-bottom: 3px;

    color: var(--green-400);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1px;
}

.device-dialog-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 22px;
    font-weight: 850;
}

.device-dialog-header p {
    margin: 4px 0 0;

    color: var(--green-100);

    font-size: 13px;
    font-weight: 600;
}

.device-dialog-close {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    color: var(--green-950);
    background: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}


/* ========================================================= */
/* PASOS                                                     */
/* ========================================================= */

.device-wizard-progress {
    display: grid;

    grid-template-columns:
        auto 1fr
        auto 1fr
        auto 1fr
        auto;

    align-items: center;

    gap: 8px;

    padding: 14px 18px;

    background: var(--green-50);

    border-bottom: 1px solid var(--border);
}

.wizard-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 5px;
}

.wizard-progress-step > span {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-secondary);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 50%;

    font-size: 11px;
    font-weight: 850;
}

.wizard-progress-step strong {
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 750;
}

.wizard-progress-step.active > span {
    color: #ffffff;
    background: var(--green-700);

    border-color: var(--green-700);
}

.wizard-progress-step.active strong {
    color: var(--green-900);
}

.wizard-progress-step.completed > span {
    color: #ffffff;
    background: var(--green-500);

    border-color: var(--green-500);
}

.wizard-progress-line {
    height: 2px;

    background: var(--border);
}


/* ========================================================= */
/* CONTENIDO WIZARD                                          */
/* ========================================================= */

.device-wizard-content {
    min-height: 350px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px;
}

.wizard-panel {
    width: 100%;

    text-align: center;
}

.wizard-panel[hidden] {
    display: none;
}

.wizard-icon,
.wizard-success-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 13px;

    color: #ffffff;
    background: var(--green-700);

    border-radius: 14px;
}

.wizard-icon svg,
.wizard-success-icon svg {
    width: 27px;
    height: 27px;
}

.wizard-icon.search {
    background: var(--teal-600);
}

.wizard-icon.name {
    background: var(--green-600);
}

.wizard-step-name {
    display: block;

    margin-bottom: 5px;

    color: var(--green-700);

    font-size: 11px;
    font-weight: 850;
    letter-spacing: 1px;
}

.wizard-panel h3 {
    margin: 0;

    color: var(--green-950);

    font-size: 22px;
    font-weight: 850;
}

.wizard-instruction {
    max-width: 470px;

    margin: 8px auto 0;

    color: var(--text-secondary);

    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}


/* ========================================================= */
/* AYUDA PASO 1                                              */
/* ========================================================= */

.wizard-simple-help {
    max-width: 480px;

    display: flex;
    align-items: center;

    gap: 10px;

    margin: 20px auto 0;
    padding: 12px 14px;

    color: var(--green-900);
    background: var(--green-50);

    border: 1px solid var(--green-100);
    border-radius: 9px;

    text-align: left;
}

.wizard-simple-help svg {
    width: 20px;
    height: 20px;

    flex: 0 0 20px;
}

.wizard-simple-help span {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}


/* ========================================================= */
/* BOTÓN BUSCAR                                              */
/* ========================================================= */

.wizard-main-action {
    min-width: 190px;
    min-height: 44px;

    margin-top: 22px;
    padding: 9px 16px;

    color: #ffffff;
    background: var(--green-700);

    border: 1px solid var(--green-800);
    border-radius: 9px;

    font: inherit;
    font-size: 13px;
    font-weight: 850;

    cursor: pointer;
}

.wizard-main-action:disabled {
    opacity: .6;
    cursor: wait;
}


/* ========================================================= */
/* PASO 2 - DISPOSITIVO ENCONTRADO                           */
/* ========================================================= */

.wizard-found-device {
    width: 100%;
    max-width: 470px;

    margin: 20px auto 0;
    padding: 15px;

    background: var(--green-50);

    border: 1px solid var(--green-500);
    border-radius: 10px;

    text-align: left;
}

.wizard-found-device[hidden] {
    display: none;
}

.wizard-found-device.confirmed {
    border: 2px solid var(--green-600);
}

.wizard-found-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 12px;
}

.wizard-found-label {
    color: var(--green-700);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: .8px;
}

.wizard-found-status {
    padding: 5px 9px;

    color: var(--green-800);
    background: var(--green-100);

    border: 1px solid var(--green-400);
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.wizard-found-device-main {
    display: flex;
    align-items: center;

    gap: 12px;
}

.wizard-found-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;
    background: var(--green-700);

    border-radius: 10px;
}

.wizard-found-icon svg {
    width: 21px;
    height: 21px;
}

.wizard-found-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.wizard-found-copy strong {
    color: var(--green-950);

    font-size: 15px;
    font-weight: 850;
}

.wizard-found-copy span {
    margin-top: 2px;

    color: var(--text-primary);

    font-size: 12px;
    font-weight: 750;
}

.wizard-found-copy small {
    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 650;
}

.wizard-confirm-device {
    width: 100%;
    min-height: 42px;

    margin-top: 14px;
    padding: 8px 12px;

    color: var(--green-700);
    background: #ffffff;

    border: 1px solid var(--green-500);
    border-radius: 8px;

    font: inherit;
    font-size: 12px;
    font-weight: 850;

    cursor: pointer;
}

.wizard-confirm-device:hover:not(:disabled) {
    color: #ffffff;
    background: var(--green-700);
}

.wizard-confirm-device:disabled {
    color: #ffffff;
    background: var(--green-600);

    cursor: default;
}


/* ========================================================= */
/* PASO 3 - CONFIRMADO                                       */
/* ========================================================= */

.wizard-confirmed-summary {
    max-width: 450px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin: 20px auto 0;
    padding: 12px 14px;

    text-align: left;

    background: var(--green-50);

    border: 1px solid var(--green-400);
    border-radius: 9px;
}

.wizard-confirmed-summary > div {
    display: flex;
    flex-direction: column;
}

.wizard-confirmed-summary > div span {
    color: var(--green-700);

    font-size: 9px;
    font-weight: 850;
    letter-spacing: .7px;
}

.wizard-confirmed-summary > div strong {
    margin-top: 2px;

    color: var(--green-950);

    font-size: 14px;
    font-weight: 850;
}

.wizard-confirmed-check {
    padding: 5px 9px;

    color: var(--green-800);
    background: var(--green-100);

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}


/* ========================================================= */
/* CAMPO NOMBRE                                              */
/* ========================================================= */

.wizard-field {
    max-width: 450px;

    margin: 18px auto 0;

    text-align: left;
}

.wizard-field label {
    display: block;

    margin-bottom: 6px;

    color: var(--green-900);

    font-size: 13px;
    font-weight: 800;
}

.wizard-field input {
    width: 100%;
    height: 46px;

    padding: 8px 12px;

    color: var(--text-primary);
    background: var(--surface);

    border: 1px solid var(--green-400);
    border-radius: 9px;

    font: inherit;
    font-size: 14px;
    font-weight: 650;

    outline: none;
}

.wizard-field input:focus {
    border-color: var(--green-700);

    box-shadow:
        0 0 0 3px rgba(8, 116, 67, .12);
}

.wizard-field small {
    display: block;

    margin-top: 5px;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;
}


/* ========================================================= */
/* PASO 4                                                   */
/* ========================================================= */

.wizard-success-icon {
    background: var(--green-600);
}

.wizard-finished-device {
    max-width: 430px;

    display: flex;
    flex-direction: column;

    margin: 20px auto 0;
    padding: 14px;

    background: var(--green-50);

    border: 1px solid var(--green-500);
    border-radius: 9px;
}

.wizard-finished-device span {
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 650;
}

.wizard-finished-device strong {
    margin-top: 3px;

    color: var(--green-950);

    font-size: 17px;
    font-weight: 850;
}

.wizard-finished-device small {
    margin-top: 4px;

    color: var(--green-700);

    font-size: 12px;
    font-weight: 700;
}


/* ========================================================= */
/* ACCIONES WIZARD                                           */
/* ========================================================= */

.device-wizard-actions {
    display: grid;

    grid-template-columns:
        auto 1fr auto;

    gap: 10px;

    padding: 13px 20px;

    background: var(--background);

    border-top: 1px solid var(--border);
}

.wizard-primary-button,
.wizard-secondary-button {
    min-height: 42px;

    padding: 8px 16px;

    border-radius: 9px;

    font: inherit;
    font-size: 13px;
    font-weight: 850;

    cursor: pointer;
}

.wizard-primary-button {
    min-width: 145px;

    color: #ffffff;
    background: var(--green-700);

    border: 1px solid var(--green-800);
}

.wizard-primary-button:hover:not(:disabled) {
    background: var(--green-800);
}

.wizard-primary-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.wizard-secondary-button {
    color: var(--green-700);
    background: var(--surface);

    border: 1px solid var(--green-400);
}


/* ========================================================= */
/* DETALLE                                                   */
/* ========================================================= */

.device-detail-content {
    padding: 18px 20px;
}

.device-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 13px;
}

.device-detail-header > span:last-child {
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 650;
}

.device-detail-summary {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px;
}

.device-detail-summary > div {
    display: flex;
    flex-direction: column;

    padding: 11px;

    background: var(--green-50);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.device-detail-summary span {
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 650;
}

.device-detail-summary strong {
    margin-top: 2px;

    color: var(--green-950);

    font-size: 12px;
    font-weight: 850;
}

.device-detail-plants {
    margin-top: 17px;
}

.device-detail-section-label {
    color: var(--green-700);

    font-size: 10px;
    font-weight: 850;
    letter-spacing: .8px;
}

.detail-plant-row {
    display: grid;

    grid-template-columns:
        100px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 10px;

    margin-top: 7px;
    padding: 10px 11px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.detail-plant-row span {
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 650;
}

.detail-plant-row strong {
    color: var(--green-950);

    font-size: 12px;
    font-weight: 850;
}

.detail-plant-row small {
    color: var(--teal-600);

    font-size: 11px;
    font-weight: 850;
}

.detail-no-plants {
    margin-top: 8px;
    padding: 11px;

    color: var(--text-secondary);
    background: var(--green-50);

    border-radius: 8px;

    font-size: 11px;
    font-weight: 650;
}

.device-detail-actions {
    display: flex;
    justify-content: flex-end;

    padding: 12px 20px;

    background: var(--background);

    border-top: 1px solid var(--border);
}


/* ========================================================= */
/* ACCESIBILIDAD                                             */
/* ========================================================= */

.devices-page :focus-visible,
.device-dialog :focus-visible {
    outline: 3px solid var(--blue-600);
    outline-offset: 3px;
}


/* ========================================================= */
/* RESPONSIVE                                                */
/* ========================================================= */

@media (max-width: 1050px) {

    .system-status-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-status-summary {
        width: 100%;
    }

    .system-summary-item {
        flex: 1;
    }

}


@media (max-width: 850px) {

    .devices-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .devices-toolbar {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .devices-search {
        grid-column:
            1 / -1;
    }

}


@media (max-width: 700px) {

    .system-status-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .system-summary-item {
        width: 100%;
    }

    .devices-overview {
        align-items: flex-start;
        flex-direction: column;

        gap: 8px;
    }

    .devices-overview-divider {
        display: none;
    }

}


@media (max-width: 650px) {

    .devices-header h1 {
        font-size: 27px;
    }

    .devices-add-button {
        width: 100%;
    }

    .devices-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .devices-toolbar {
        grid-template-columns: 1fr;
    }

    .devices-search {
        grid-column: auto;
    }

    .devices-clear-button {
        width: 100%;
    }

    .device-detail-summary {
        grid-template-columns: 1fr;
    }

    .device-wizard-progress {
        gap: 3px;

        padding-left: 10px;
        padding-right: 10px;
    }

    .wizard-progress-step strong {
        font-size: 9px;
    }

    .device-wizard-content {
        min-height: 360px;

        padding:
            24px
            18px;
    }

    .wizard-instruction {
        font-size: 14px;
    }

    .wizard-found-device-main {
        align-items: flex-start;
    }

    .wizard-confirmed-summary {
        align-items: flex-start;
        flex-direction: column;
    }

}


.device-delete-button {
    min-height: 44px;
    padding: 10px 18px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background:
        var(--surface);

    color:
        var(--text-primary);

    font-family:
        Arial, Helvetica, sans-serif;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


.device-delete-button:hover {
    border-color:
        var(--green-600);

    background:
        var(--green-50);

    color:
        var(--green-900);
}


.device-delete-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}