.doctrina-manager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 300px);
}

.doctrina-column {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.doctrina-column h4 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
}

/* Contenedor de búsqueda */
.doctrina-search-container {
    position: relative;
    margin-bottom: 15px;
}

.doctrina-search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.doctrina-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.doctrina-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}

.doctrina-search-btn:hover {
    background: #0056b3;
}

.clear-search-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    padding: 5px;
}

.clear-search-btn:hover {
    color: #333;
}

/* Lista de doctrina */
.doctrina-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
}

.doctrina-list.scrollable {
    max-height: 500px;
}

.doctrina-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.doctrina-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.doctrina-item.selected {
    background: #e3f2fd;
    border-color: #2196F3;
}

.doctrina-item.vinculada {
    background: #f0f8ff;
    border-left: 4px solid #28a745;
}

.doctrina-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
}

.doctrina-info {
    padding-right: 30px;
}

.doctrina-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.doctrina-content {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctrina-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.doctrina-date {
    color: #999;
    font-size: 11px;
}

.doctrina-keywords {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
}

.doctrina-actions {
    display: flex;
    gap: 5px;
}

.btn-vincular, .btn-desvincular {
    padding: 4px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-vincular {
    background: #28a745;
    color: white;
}

.btn-vincular:hover {
    background: #218838;
}

.btn-desvincular {
    background: #dc3545;
    color: white;
}

.btn-desvincular:hover {
    background: #c82333;
}

/* Mensajes */
.no-results-message, .empty-message, .loading-message {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-results-message i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .doctrina-manager {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .doctrina-column {
        margin-bottom: 20px;
    }
}