:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--secondary-color);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.error-message {
    color: var(--error-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
}

.success-message {
    color: var(--success-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 4px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f9f9f9;
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.badge-info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab.active {
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.password-strength {
    margin-top: 5px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    background: #e74c3c;
    transition: all 0.3s;
}

/* Estructura jerárquica */



.tree-item:before {
    content: "";
    position: absolute;
    left: -15px;
    top: 10px;
    width: 10px;
    height: 1px;
    background: #ccc;
}

.tree-item .tree-content {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    background: #f5f5f5;
}

.tree-item .tree-content:hover {
    background: #e0e0e0;
}

/*nuevo css para estructura de arbol */
/* Estructura jerárquica mejorada */
.structure-container {
    display: flex;
    gap: 20px;
}

.structure-tree {
    flex: 1;
    min-width: 0;
}

.structure-charts {
    width: 350px;
    flex-shrink: 0;
}

.chart-placeholder {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
}

.chart-placeholder h3 {
    margin-top: 0;
    color: #333;
}

.fake-chart {
    width: 100%;
    height: 250px;
    background: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* Mejoras al árbol jerárquico */
.tree-view {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.tree-item {
    margin-bottom: 5px;
    position: relative;
}

.tree-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.2s;
}

.tree-node:hover {
    background: #e0e0e0;
}

.tree-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.tree-toggle i {
    width: 20px;
    text-align: center;
    color: #555;
}

.tree-children {
    padding-left: 30px;
    margin-top: 5px;
    display: none;
}

.tree-item.expanded > .tree-children {
    display: block;
}

.tree-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    color: #333;
    background: rgba(0,0,0,0.1);
}

/* Indicador de expandible */
.tree-toggle:after {
    content: '+';
    font-family: monospace;
    font-weight: bold;
    margin-left: 5px;
    color: #666;
}

.tree-item.expanded > .tree-node > .tree-toggle:after {
    content: '-';
}
