/* dicom-network.css */
/* Estilos modernos e flexíveis integrados ao motor de temas do RadioMatch-Viewer */

/* ==================================================== */
/* Modais Base (Importar & Preferências) */
/* ==================================================== */
.rm-net-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.rm-net-modal {
    background-color: var(--bg-viewer);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-viewer);
    font-family: 'Inter', -apple-system, sans-serif;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Modais Específicos */
.rm-net-modal-import {
    width: 950px;
    height: 650px;
}

.rm-net-modal-prefs {
    width: 850px;
    height: 600px;
}

.rm-net-modal-sub {
    width: 480px;
    background-color: var(--bg-viewer);
}

/* Header comum (Barra de Título) */
.rm-net-header {
    background: var(--bg-side);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-viewer);
    user-select: none;
    backdrop-filter: blur(20px);
}

.rm-net-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.rm-net-close-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rm-net-close-btn:hover {
    background: #f43f5e;
    color: #fff;
    transform: rotate(90deg);
}

/* Layout 2 Colunas (Menu Lateral + Conteúdo) */
/* ==================================================== */
.rm-net-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-viewer);
}

.rm-net-sidebar {
    width: 250px;
    background: var(--bg-side);
    border-right: 1px solid var(--border-viewer);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.rm-net-content {
    flex: 1;
    background: var(--bg-viewer);
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Árvore de Menus / Nav Sidebar */
.rm-sidebar-item {
    padding: 12px 24px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}
.rm-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-viewer);
}
.rm-sidebar-item.active {
    background: rgba(var(--primary-rgb, 96, 165, 250), 0.12);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

/* ==================================================== */
/* Guias (Abas) e Formulários */
/* ==================================================== */
.rm-tab-header {
    display: flex;
    border-bottom: 2px solid var(--border-viewer);
    margin-bottom: 24px;
    gap: 40px;
}

.rm-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 14px 2px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.rm-tab-btn:hover {
    color: var(--text-viewer);
}
.rm-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.rm-tab-panel {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}
.rm-tab-panel.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Inputs, Selects e Label Form Groups */
.rm-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.rm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.rm-form-group label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rm-input, .rm-select {
    background: var(--bg-side);
    border: 1px solid var(--border-viewer);
    color: var(--text-viewer);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    box-sizing: border-box;
}

.rm-input:focus, .rm-select:focus {
    border-color: var(--primary);
    background: var(--bg-viewer);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.rm-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

/* Botões do Formulário */
.rm-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-viewer);
    border: 1px solid var(--border-viewer);
    border-radius: 20px;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rm-btn:hover {
    background: var(--border-viewer);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.rm-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 96, 165, 250), 0.2);
}
.rm-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 15px rgba(var(--primary-rgb, 96, 165, 250), 0.4);
    transform: translateY(-1px);
}

/* Tabela de Resultados Professional */
.rm-table-wrapper {
    border: 1px solid var(--border-viewer);
    border-radius: 10px;
    background: var(--bg-side);
    flex: 1;
    overflow: auto;
    min-height: 250px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.rm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11.5px;
}
.rm-table th {
    background: var(--bg-side);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-viewer);
    z-index: 5;
}
.rm-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-viewer);
    color: var(--text-viewer);
}
.rm-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}
.rm-table tr.selected td {
    background: rgba(var(--primary-rgb, 96, 165, 250), 0.15);
}

.rm-section-box {
    border: 1px solid var(--border-viewer);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.015);
    transition: all 0.2s;
}
.rm-section-box:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(var(--primary-rgb, 96, 165, 250), 0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.rm-section-title {
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--bg-viewer);
    padding: 0 10px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer Modal */
.rm-net-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-side);
    border-top: 1px solid var(--border-viewer);
    gap: 12px;
}

/* Custom Scrollbar for Modal Panels */
.rm-net-content::-webkit-scrollbar,
.rm-table-wrapper::-webkit-scrollbar {
    width: 6px;
}
.rm-net-content::-webkit-scrollbar-thumb,
.rm-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-viewer);
    border-radius: 10px;
}
